Skip to content
ToolMug

Use ↑ ↓ to move, Enter to open, Esc to close.

Two-Way ANOVA Calculator

When two grouping factors such as teaching method and gender affect one outcome, a two-way ANOVA tests each main effect and their interaction. Paste the data as three columns (factor A, factor B, value); unequal group sizes are fine.

Runs in your browser — nothing you enter is uploaded

Three columns in long format: factor A, factor B, value. One row per observation, with names in the first row.

ANOVA table

SourceSum of squaresdfMean squareFpPartial η²
A27213.513.50.00080.692
B60.5160.560.55.01e-60.834
A × B1326.56.50.01220.52
Error12121
Total112.517

Type III sums of squares, as SPSS reports by default; unequal cell sizes are fine.

Report as · AF(2, 12) = 13.50, p < .001, ηp² = .69
Report as · BF(1, 12) = 60.50, p < .001, ηp² = .83
Report as · A × BF(2, 12) = 6.50, p = .012, ηp² = .52

Cell means of Y (SD, n)

A \ Bb1b2
a15 (1, 3)7 (1, 3)
a26 (1, 3)9 (1, 3)
a36 (1, 3)12 (1, 3)

Rows are levels of the first factor, columns of the second.

a1a2a3b1b2
Interaction plot: lines that aren’t parallel suggest an interaction

Matches SPSS Univariate GLM (Type III) and R with sum-to-zero contrasts. Assumes independent observations and roughly equal variances; check cell means and the interaction plot before the main effects.

Is this tool working for you?

How to use

  1. Arrange the data in three columns, the level of factor A, the level of factor B and the value, one observation per row, with names in the first row.
  2. Start with the interaction row. p < 0.05 means the effect of one factor depends on the other.
  3. If the interaction is significant, interpret it with the cell means and the interaction plot; otherwise report the main effects.
  4. Copy the APA lines for each effect.

Options explained

Type III sums of squares
Each effect is tested after adjusting for the others, so the order doesn't matter even with unequal cell sizes. It is the SPSS Univariate default.
Partial η²
Effect SS ÷ (effect SS + error SS), the share of variance explained after removing the other effects. About 0.01, 0.06 and 0.14 are small, medium and large.
One value per cell
The interaction can't be estimated, so the calculator fits the main-effects model (two-way ANOVA without replication).

Worked example

The sample has factor A with three levels (a1, a2, a3) and factor B with two (b1, b2), three values per cell.

Source SS df F p Partial η²
A 27.0 2 13.50 0.0008 0.69
B 60.5 1 60.50 < 0.001 0.83
A × B 13.0 2 6.50 0.012 0.52
Error 12.0 12

Cell means:

A \ B b1 b2
a1 5 7
a2 6 9
a3 6 12

The interaction is significant (p = 0.012): b2 is 2 points above b1 at a1 but 6 points above at a3, and the lines on the interaction plot spread apart to the right. So the effect of B has to be described separately for each level of A.

APA style: A × B interaction, F(2, 12) = 6.50, p = .012, ηp² = .52.

Frequently asked questions

My data are a grid in Excel (rows A, columns B). How do I convert it?

Convert to long format first, one value per row with its A and B levels in the first two columns. In Excel, Power Query's "Unpivot" does this.

What does a significant interaction mean?

The effect of one factor changes with the level of the other, for example a new method raises boys' scores by 10 points but girls' by only 2. Describe the effect separately rather than reporting a single main effect.

Does it match SPSS and R?

It matches SPSS (General Linear Model → Univariate), which uses Type III by default. R's aov() uses Type I, which differs with unequal cell sizes; use car::Anova(type = 3) with sum-to-zero contrasts to match.

Can I use it for repeated measures?

No. Observations are assumed independent. Repeated measurements on the same people need a repeated-measures ANOVA.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools