Calculators
Home › Calculators › Two-Way ANOVA

Two-Way ANOVA Calculator

Two crossed factors, three F tests, one interaction read first.

Run the two-way ANOVA

Blocks are Factor A levels; lines inside a block are Factor B cells.

Quick answer: Balanced 2x2 with 3 per cell: SSA 75, SSB 27, SSAB 3, SSE 8, totalling SST 113 exactly. Interaction p = 0.122: main effects can be read at face value.

Two factors, three questions

A two-way ANOVA crosses two factors and asks three questions of the data: does factor A shift the response (averaged over B)? Does factor B shift it (averaged over A)? And does the effect of one factor change across the levels of the other, the interaction? The sums of squares partition exactly into those three effects plus error when the design is balanced, equal numbers in every cell, which is why this calculator requires a balanced grid: balance keeps the three questions statistically independent, so no effect borrows another's credit.

Worked example

Revision method (A) by time of day (B), three students per cell, cell means 5, 7, 9, 13. SSA = 75, SSB = 27, SSAB = 3, SSE = 8, summing exactly to SST = 113. The F ratios on error df 8: FA = 75.00, FB = 27.00, FAB = 3.00 (p ≈ 0.122). The interaction is small: method A2 beats A1 by 4 points in the morning and by 6 in the evening, a mild wobble on top of two clear main effects.

Read the interaction first

The order of reading matters. If the interaction is significant, the main effects are averages over a pattern that changes, and describing them plainly can mislead: a factor that helps at one level of the other factor and hurts at another averages to "no effect" while being anything but. So the result block above leads with the interaction verdict, then the table. When the interaction is not significant, as in the example, main effects can be read more or less at face value, and some analysts refit without the interaction term to give the main effects more error degrees of freedom.

Watch out

Feeding unbalanced data into a balanced-design calculator. With unequal cell sizes the SS partition is no longer unique (the Type I/II/III sums of squares debate), and software answers depend on the type chosen. This tool refuses unbalanced grids rather than quietly picking one; for messy real designs, use R's aov or car::Anova and state the type.

Frequently asked questions

What does an interaction mean in plain terms?

The effect of one factor depends on the level of the other. Plotted, the lines for one factor across the other's levels are not parallel.

Why must the data be balanced here?

Equal cell sizes make the three effects independent and the sums of squares add up exactly: SSA + SSB + SSAB + SSE = SST. Unbalanced designs need a stated SS type instead.

What comes after a significant two-way ANOVA?

Simple-effects analysis: test one factor separately at each level of the other, with a multiple-comparison correction. That is where the interaction's story gets told.