Two-Way ANOVA (factorial A × B)
VerifiedANOVA
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Tests the individual and combined effects of TWO categorical independent variables on a continuous DV.
Reports three F-tests: Factor A main effect, Factor B main effect, and the A×B interaction. The interaction tests whether Factor A's effect DEPENDS on the level of Factor B. Effect sizes per term as η²p / ω²p; engine auto-handles Type-III SS for unbalanced cells, Levene + Shapiro diagnostics, and routes to nonparametric ART or robust trimmed-means variants when assumptions fail.
Worked example
Do drug dose and sex jointly affect reaction time — and does dose work differently by sex?
80 participants crossed by Dose (low/high) × Sex (male/female); a two-way ANOVA on reaction time (ms), with the interaction as the headline.
A significant Dose × Sex interaction, F(1, 76) = 14.53, p < .001, partial η² = .16, showed the dose effect was stronger in men than women.
A two-way ANOVA revealed a significant Dose × Sex interaction, F(1, 76) = 14.53, p < .001, partial η² = .16.
Try it yourself: Load this ready-made sample and follow the run above.
When to use it
- Factorial design (A × B fully crossed)A researcher studies the effect of diet (low-fat, Mediterranean, keto) and exercise (sedentary, active) on weight loss.
- Independent 2-factor observational designIs exam performance related to both gender (male/female) and class year (freshman/sophomore/junior/senior)?
When NOT to — use instead
- Single factorUse one-way ANOVA for a single categorical predictor. → One-Way ANOVA (3+ groups)
- Within-subjects designTwo-way ANOVA assumes independent observations per cell. → Two-Way RM-ANOVA (2 within factors)
- One between + one within (mixed)Use mixed (split-plot) ANOVA for between×within designs. → Two-Way Mixed ANOVA (1 between \u00d7 1 within)
- Need to control for continuous covariateFor factorial + continuous covariate use two-way ANCOVA. → Two-Way ANCOVA (factorial + covariate)
Hypotheses
Parameter tested: set of cell means {μ_{ij}} and their marginal/interaction decomposition
Assumptions (and what to do if they fail)
Check: Inspect per-cell boxplots in the cell-grid figure; flag points beyond the whiskers.
If violated: Outliers within a cell can inflate the within-cell variance and distort F-tests, especially in small cells.
Check: Shapiro-Wilk on residuals; inspect the residual Q-Q plot.
If violated: Severely non-normal residuals threaten the F-test's nominal Type I error rate, especially with unbalanced designs and small cells.
Check: Levene's test on the cell partition.
If violated: Unequal variances inflate Type I error, especially with unbalanced cell counts.
Check: max_cell_n / min_cell_n ≤ 1.5 → effectively balanced.
If violated: Unbalanced designs inflate the influence of cell-size differences and make the SS decomposition order-dependent.
Ready to run a Two-Way ANOVA (factorial A × B) on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →