Two-Way ANOVA Calculator

Analyze the effect of two categorical factors on one numeric variable, including their interaction. This tool assumes a balanced two-way ANOVA without repeated measures: every A×B combination has the same number of replications.

ANOVA table

Source SS df MS F p-value
Factor A
Factor B
Interaction A × B
Error (Within)
Total

Formulas used

Let a = levels of A, b = levels of B, r = replications per cell, N = a × b × r.

Grand mean: \( \bar{Y} = \frac{1}{N} \sum_{i=1}^a \sum_{j=1}^b \sum_{k=1}^r Y_{ijk} \)

SSA: \( SS_A = br \sum_{i=1}^a (\bar{Y}_{i..} - \bar{Y})^2 \)

SSB: \( SS_B = ar \sum_{j=1}^b (\bar{Y}_{.j.} - \bar{Y})^2 \)

SSAB: \( SS_{AB} = r \sum_{i=1}^a \sum_{j=1}^b (\bar{Y}_{ij.} - \bar{Y}_{i..} - \bar{Y}_{.j.} + \bar{Y})^2 \)

SSE: \( SSE = \sum_{i=1}^a \sum_{j=1}^b \sum_{k=1}^r (Y_{ijk} - \bar{Y}_{ij.})^2 \)

df: dfA=a−1, dfB=b−1, dfAB=(a−1)(b−1), dfE=ab(r−1), dfT=N−1

Interpretation

Look first at the interaction p-value. If A×B is significant, the effect of A depends on B (and vice versa). In that case, interpret simple effects or plot the cell means. If interaction is not significant, you may interpret main effects directly.

Assumptions

  • Independent observations
  • Normality within each cell
  • Homogeneity of variances
  • Balanced design (this tool)