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)
Formula (LaTeX) + variables + units
','\
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
- PMI = private mortgage insurance (monthly) (currency)
- NIST — Weights and measures — nist.gov · Accessed 2026-01-19
https://www.nist.gov/pml/weights-and-measures - FTC — Consumer advice — consumer.ftc.gov · Accessed 2026-01-19
https://consumer.ftc.gov/
Last code update: 2026-01-19
- Initial audit spec draft generated from HTML extraction (review required).
- Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
- Confirm sources are authoritative and relevant to the calculator methodology.