Written by Dackohn; last reviewed November 2026.
A two-way ANOVA tests two factors at once and asks three questions: does A matter, does B matter, and does the effect of one depend on the other? The third question is the interaction. In the example below, fertiliser adds 1.5 under low watering but 4.75 under high watering: F(1, 12) = 16.35, p = .002.
The example
Plant growth with two levels of fertiliser (none, added) and two of watering (low, high), with 4 plants in each of the 4 combinations.
| Cell means | Low water | High water | Average |
|---|---|---|---|
| No fertiliser | 5.00 | 8.00 | 6.50 |
| Fertiliser | 6.50 | 12.75 | 9.63 |
| Average | 5.75 | 10.38 |
Main effects
A main effect compares the averages of one factor, ignoring the other. Fertilised plants average 9.63 against 6.50, and well-watered plants average 10.38 against 5.75.
The interaction
An interaction means the effect of one factor depends on the other. Fertiliser adds 1.5 under low watering (5.00 to 6.50), but 4.75 under high watering (8.00 to 12.75). Fertiliser helps most when plants have enough water.
The ANOVA table
| Source | SS | df | F | p | Partial η² |
|---|---|---|---|---|---|
| Fertiliser | 39.06 | 1 | 60.48 | < .001 | .83 |
| Watering | 85.56 | 1 | 132.48 | < .001 | .92 |
| Interaction | 10.56 | 1 | 16.35 | .002 | .58 |
| Error | 7.75 | 12 |
Each factor has (levels − 1) df, the interaction has the product of those, and the error has N − (number of cells) = 16 − 4 = 12.
Reading an interaction plot
Plot the cell means with one factor on the x-axis and one line per level of the other.
- Parallel lines: no interaction.
- Lines that diverge or converge: the effect grows or shrinks.
- Lines that cross: the effect reverses, so main effects alone can badly mislead.
How to interpret the results
- Check the interaction first.
- If it is significant, describe the simple effects: the effect of one factor at each level of the other.
- If not, interpret the main effects directly, using post-hoc tests for factors with three or more levels.
Assumptions
- Independent observations. Repeated measures on the same subjects need a different analysis.
- Roughly normal residuals within each cell.
- Similar variances across cells, which matters most with unequal cell sizes.
Why not two separate one-way ANOVAs?
Separate analyses cannot detect an interaction, and they leave more unexplained variation in the error term, so they have less power.
Try it yourself
Two-Way ANOVA Calculator →Main effects, the interaction and a plot from your data. One-Way ANOVA Calculator →For a single factor, with Tukey post-hoc tests.Frequently asked questions
What is the difference between one-way and two-way ANOVA?
One-way ANOVA has one factor. Two-way ANOVA has two, and it can also test their interaction.
What does a significant interaction mean?
The effect of one factor depends on the level of the other.
Can I interpret main effects when the interaction is significant?
With care. If the effect reverses across levels, the main effect can mislead, so describe the simple effects.
Related reading: ANOVA vs t-test · Effect size explained · The Friedman test
Sources & further reading: NIST/SEMATECH e-Handbook of Statistical Methods · OpenStax Introductory Statistics. How we compute & validate: methodology. Written & reviewed by Dackohn; last reviewed August 2026.