Skip to content

Two-Way ANOVA Calculator

Estimate the effects of two categorical factors on a numeric outcome at once, including whether the two factors interact, using a balanced design with an equal number of replicates in every cell.

Each line is one level of Factor A. Within a line, semicolon-separated groups are Factor B levels, and each group's comma-separated numbers are its replicate values. Every cell needs the same number of replicates (2 or more) for this balanced-design calculator.

What this answers

This calculator answers three questions at once: does Factor A affect the outcome, does Factor B affect the outcome, and do the two factors interact, meaning Factor A's effect depends on which level of Factor B you are looking at (and vice versa)?

How it is calculated

Total variability is decomposed into a Factor A main effect, a Factor B main effect, an A-by-B interaction, and leftover error, each with its own sum of squares and F test against the error term. This calculator requires a balanced design (an equal number of replicate observations in every cell) since balanced and unbalanced factorial designs need genuinely different sum-of-squares decompositions; an unbalanced design is out of scope here.

Worked example

For a 2 by 2 design where Factor A adds a consistent effect and Factor B adds a separate consistent effect, with no interaction between them, the resulting sums of squares split cleanly between the two main effects, leaving a small interaction sum of squares reflecting only the noise between replicates, exactly reflecting the additive structure of the example data.

Assumption audit

Calculated from your data: the sum of squares for each main effect and the interaction, their F statistics and p-values, and whether every cell has the same replicate count (required for this balanced-design calculator).
Evidence to review: the interaction p-value before interpreting either main effect in isolation; if the interaction is significant, a main effect's average impact can be misleading because the true effect of one factor genuinely depends on the other.
You must verify: that your design is genuinely factorial (every combination of Factor A and Factor B levels was actually observed) and that observations within each cell are independent replicates, not repeated measures on the same units.

What this result does not mean

A significant main effect in the presence of a significant interaction should be interpreted cautiously, since an interaction means the "average" effect of one factor can obscure very different effects at different levels of the other factor; examine the cell means directly in that situation rather than relying on the main effect alone.

Limitations

This calculator only supports a balanced design with equal cell sizes; an unbalanced design with unequal replicate counts per cell requires a Type II or Type III sum-of-squares approach this calculator does not implement.