Copperplate
Statistics guide

One-Way vs Two-Way ANOVA: When to Use Each, with a Worked Example

Both tests compare group means. A one-way ANOVA uses one grouping factor; a two-way ANOVA uses two and can test whether they interact. Here is how to choose, run in SPSS and report each one.

Statistics8 min readUpdated Copperplate editorial team

In brief

  • Use a one-way ANOVA for one categorical factor with three or more independent groups and one continuous outcome.
  • Use a two-way ANOVA for two categorical factors; it tests two main effects and their interaction.
  • Both assume independent observations, roughly normal residuals and similar group variances.
  • A significant interaction means the effect of one factor depends on the level of the other, so interpret simple effects first.
  • Report F with both degrees of freedom, the exact p value and an effect size such as eta squared or partial eta squared.

One-way vs two-way ANOVA: the short answer

The difference between one-way and two-way ANOVA is the number of independent variables (factors). A one-way ANOVA tests whether the means of three or more groups defined by one factor differ. A two-way ANOVA tests the effects of two factors on one continuous outcome at the same time, plus their interaction.

FeatureOne-way ANOVATwo-way ANOVA
Factors (independent variables)One, with 2 or more levelsTwo, each with 2 or more levels
Dependent variableOne continuous variableOne continuous variable
Null hypotheses testedOne: all group means are equalThree: no main effect of A, no main effect of B, no A × B interaction
Interaction effectNot possibleTested directly
Example questionDo exam scores differ by study technique?Do exam scores differ by technique and course format, and does the technique effect depend on format?
SPSS menuAnalyze > Compare Means > One-Way ANOVAAnalyze > General Linear Model > Univariate

If you have only two groups and one factor, a one-way ANOVA gives the same p value as an independent-samples t-test (F equals t squared).

What is a one-way ANOVA?

A one-way analysis of variance (ANOVA) compares the means of k independent groups. Its null hypothesis is that all population means are equal (H0: μ1 = μ2 = ... = μk); the alternative is that at least one mean differs.

One-way ANOVA formula

The test splits the total variation into variation between groups and variation within groups:

  • SS_between = Σ n_j (mean_j - grand mean)^2, with df = k - 1
  • SS_within = Σ Σ (x_ij - mean_j)^2, with df = N - k
  • MS = SS / df
  • F = MS_between / MS_within

If the group means are far apart relative to the spread inside each group, F is large and p is small. The effect size is eta squared: η² = SS_between / SS_total.

When to use a one-way ANOVA

  • One categorical independent variable (for example, three teaching methods).
  • One continuous dependent variable measured on an interval or ratio scale.
  • Different participants in each group (for the same participants measured repeatedly, use repeated-measures ANOVA).

What is a two-way ANOVA?

Always plot the cell means before reading the F table. Non-parallel lines tell you where to look.

A two-way (two-factor) ANOVA examines two categorical independent variables together. In a 3 × 2 design, for example, Factor A has three levels and Factor B has two, giving six cells. It answers three questions:

  1. Main effect of A: Do the means differ across levels of A, averaging over B?
  2. Main effect of B: Do the means differ across levels of B, averaging over A?
  3. A × B interaction: Does the effect of A change depending on the level of B?

A two-way ANOVA has two practical advantages over running two separate one-way ANOVAs. It tests the interaction, and it removes the variance explained by the second factor from the error term, which usually gives more statistical power. You will see this in the worked example below.

Interaction effects explained

An interaction exists when the lines on a means (profile) plot are not parallel. Imagine a new study technique that raises scores by 9 points in face-to-face classes but by only 1 point online. Saying that the technique works by an average of 5 points would hide the real pattern. When the interaction is significant, interpret the simple effects (the effect of one factor at each level of the other) before, or instead of, the main effects.

SPSS Help

Running an ANOVA in SPSS? Check your assumptions, post hoc tests and APA write-up with a statistician who explains every table.

See how it works

ANOVA assumptions and what to do if they fail

One-way and two-way between-subjects ANOVA share the same assumptions.

AssumptionHow to checkIf violated
Independence of observationsDesign: each participant appears in one cell onlyUse repeated-measures or mixed models
Normality of residuals within groupsQ-Q plot of residuals; Shapiro-Wilk with small samplesANOVA is fairly robust with similar, moderate group sizes; consider transformation or Kruskal-Wallis (one-way only)
Homogeneity of varianceLevene's test; compare group SDsOne-way: report Welch's F and use Games-Howell post hoc tests. Two-way: aim for equal cell sizes, consider robust standard errors
No extreme outliersBoxplots, standardized residuals beyond ±3Check for data entry errors; report sensitivity analyses

Unequal group sizes make the homogeneity assumption more important. With unbalanced two-way designs, SPSS uses Type III sums of squares by default, which is the usual choice when an interaction term is in the model.

Worked example: one-way and two-way ANOVA on the same data

Thirty students were randomly assigned to one of three study techniques (rereading, practice testing, concept mapping) and to one of two course formats (online, in person), with 5 students per cell. The outcome is an exam score out of 100.

Cell means (SD), n = 5 per cell

TechniqueOnlineIn personTechnique mean
Rereading63.0 (3.2)67.0 (2.6)65.0
Practice testing80.0 (3.8)81.0 (3.4)80.5
Concept mapping66.0 (3.7)75.0 (2.6)70.5
Format mean69.774.372.0

One-way ANOVA table (technique only)

SourceSSdfMSFp
Between groups1235.002617.5033.41<.001
Within groups499.002718.48
Total1734.0029

Eta squared = 1235 / 1734 = .71. Levene's test was not significant, F(2, 27) = 1.96, p = .161.

Two-way ANOVA table (technique × format)

SourceSSdfMSFpPartial η²
Technique1235.002617.5058.35<.001.83
Format163.331163.3315.43<.001.39
Technique × Format81.67240.833.86.035.24
Error254.002410.58
Corrected total1734.0029

Check the arithmetic: 1235.00 + 163.33 + 81.67 + 254.00 = 1734.00. The one-way error term (499) contained the format and interaction variation (163.33 + 81.67 + 254.00). Moving them out of the error term cut the mean square error from 18.48 to 10.58, so the technique F rose from 33.41 to 58.35.

Interpreting the interaction

The interaction is significant, so we test simple effects of format within each technique (pooled error, df = 1, 24). In-person students scored 9 points higher with concept mapping, F(1, 24) = 19.13, p < .001; 4 points higher with rereading, F(1, 24) = 3.78, p = .064; and 1 point higher with practice testing, F(1, 24) = 0.24, p = .631. Practice testing worked well in both formats; concept mapping depended on the format.

Copy-ready APA results template
One-way ANOVA
A one-way ANOVA showed that [DV] [differed/did not differ] across [factor] groups, F([df between], [df within]) = [F], p = [p], η² = [value]. [Post hoc test] comparisons indicated that [group A] (M = [mean], SD = [SD]) scored [higher/lower] than [group B] (M = [mean], SD = [SD]), p = [p].

Two-way ANOVA
A [levels A] × [levels B] between-subjects ANOVA showed [a significant/no significant] main effect of [factor A], F([df], [df error]) = [F], p = [p], partial η² = [value], [a significant/no significant] main effect of [factor B], F([df], [df error]) = [F], p = [p], partial η² = [value], and [a significant/no significant] [A] × [B] interaction, F([df], [df error]) = [F], p = [p], partial η² = [value]. [If significant: Simple effects showed that ...]

Post hoc tests after ANOVA

A significant F tells you that at least one mean differs, not which ones. Post hoc tests compare pairs while controlling the familywise error rate.

  • Tukey HSD: the standard choice for all pairwise comparisons with equal variances.
  • Games-Howell: use when variances or group sizes are unequal.
  • Bonferroni: simple and conservative; good for a small set of planned comparisons.
  • Scheffé: very conservative; suited to complex contrasts.
  • Dunnett: compares each group with a single control group.

Tukey HSD for technique (one-way model)

  • Practice testing vs rereading: difference = 15.5, p < .001
  • Practice testing vs concept mapping: difference = 10.0, p < .001
  • Concept mapping vs rereading: difference = 5.5, p = .021

In a two-way design with a significant interaction, main-effect post hoc tests can mislead, because they average over the other factor. Report simple effects (with a Bonferroni adjustment) instead.

How to run one-way and two-way ANOVA in SPSS

One-way ANOVA in SPSS

  1. Go to Analyze > Compare Means > One-Way ANOVA.
  2. Move the outcome to Dependent List and the grouping variable to Factor.
  3. Click Post Hoc and tick Tukey (and Games-Howell as a backup if variances may differ).
  4. Click Options and tick Descriptive, Homogeneity of variance test, Welch and Means plot.
  5. In version 27 and later, tick Estimate effect size for overall tests to get eta squared. Click OK.

Two-way ANOVA in SPSS

  1. Go to Analyze > General Linear Model > Univariate.
  2. Move the outcome to Dependent Variable and both factors to Fixed Factor(s).
  3. Click Plots, put one factor on Horizontal Axis and the other on Separate Lines, then Add.
  4. Click Post Hoc for any factor with three or more levels and tick Tukey.
  5. Click Options and tick Descriptive statistics, Estimates of effect size and Homogeneity tests.
  6. For simple effects, click Paste and add a COMPARE subcommand, as below, then run the syntax.

UNIANOVA score BY technique format
/METHOD=SSTYPE(3)
/PLOT=PROFILE(technique*format)
/POSTHOC=technique(TUKEY)
/EMMEANS=TABLES(technique*format) COMPARE(format) ADJ(BONFERRONI)
/PRINT=ETASQ DESCRIPTIVE HOMOGENEITY
/DESIGN=technique format technique*format.

If the output does not match what you expected, our SPSS help service can review your setup and output with you and explain each table so you can report it confidently.

How to report ANOVA results in APA style

APA 7 italicizes statistical symbols (F, p, M, SD), reports F and effect sizes to two decimals, drops the leading zero for p and η², and writes very small p values as p < .001. Give both degrees of freedom in parentheses.

One-way ANOVA, APA 7

A one-way ANOVA showed that exam scores differed by study technique, F(2, 27) = 33.41, p < .001, η² = .71. Tukey HSD tests indicated that practice testing (M = 80.5, SD = 3.4) produced higher scores than concept mapping (M = 70.5, SD = 5.6), p < .001, and rereading (M = 65.0, SD = 3.5), p < .001. Concept mapping also outperformed rereading, p = .021.

Two-way ANOVA, APA 7

A 3 × 2 between-subjects ANOVA revealed significant main effects of technique, F(2, 24) = 58.35, p < .001, partial η² = .83, and format, F(1, 24) = 15.43, p < .001, partial η² = .39, qualified by a significant Technique × Format interaction, F(2, 24) = 3.86, p = .035, partial η² = .24. Simple effects showed that the in-person advantage was significant for concept mapping (p < .001) but not for rereading (p = .064) or practice testing (p = .631).

For the table itself, follow our APA table format guide. To build a model with continuous predictors instead of groups, see the regression equation guide, or book statistics tutoring to work through your own design.

Sources and further reading

  1. NIST/SEMATECH e-Handbook of Statistical Methods: 7.4.3 Are the means equal? (ANOVA)
  2. IBM SPSS Statistics: One-Way analysis of variance
  3. IBM SPSS Statistics: Using GLM Univariate to perform a two-factor analysis of variance
  4. APA Style numbers and statistics guide (7th ed.)
FAQ

Frequently asked questions

When should I use a one-way ANOVA instead of a two-way ANOVA?

Use a one-way ANOVA when your design has a single categorical independent variable and one continuous outcome, such as comparing scores across three treatment groups. Use a two-way ANOVA when you manipulated or measured two categorical factors and want to know their separate effects and whether they interact.

What is the difference between a 1 way ANOVA and a 2 way ANOVA?

A 1 way ANOVA has one factor and tests one null hypothesis about group means. A 2 way ANOVA has two factors and tests three hypotheses: a main effect for each factor and their interaction. The two-way model also removes variance explained by the second factor from the error term, which often increases power.

Can I run a two-way ANOVA with unequal group sizes?

Yes. Unbalanced designs are common. Use Type III sums of squares (the SPSS default) when the model includes an interaction, check Levene's test carefully because unequal variances matter more with unequal cell sizes, and report the cell sizes in your descriptive table.

What does a significant interaction mean in a two-way ANOVA?

It means the effect of one factor differs depending on the level of the other factor. On a means plot, the lines are not parallel. Interpret the simple effects, for example the effect of format within each technique, rather than relying on the main effects alone.

What is the effect size for ANOVA?

For a one-way ANOVA, report eta squared (SS between divided by SS total). For two-way designs, SPSS reports partial eta squared, which is the factor's SS divided by the factor's SS plus error SS. Omega squared is a less biased alternative for small samples. Conventional benchmarks are roughly .01 small, .06 medium and .14 large.

Contact us

Want an expert to
read it with you?

If you are working on this right now, an editor can review your draft and explain every change. Start with a quote for spss help.

Need a full quote with your file? Use the quote form
WhatsApp