Two-Way ANOVA Calculator — Free Online Tool | StatsUnlock

Two-Way ANOVA Calculator — Free Online Tool | StatsUnlock

Two-Way ANOVA Calculator

Test the effects of two categorical factors and their interaction on a continuous outcome. Get F-statistics, p-values, partial η² effect sizes, interaction plot, Tukey HSD post-hoc, and five APA-ready reporting templates — free, no software needed.

2 FactorsMain Effects InteractionPartial η² Omega-squaredTukey HSD Levene's TestAPA 7thFree Tool
📊 Enter Your Data
Factor A levels (rows):
Factor B levels (columns):
Cell data (comma-separated values per cell — minimum 2 per cell):
Each cell = one Factor A × Factor B combination. Minimum 2 observations per cell required.

Upload a CSV/Excel with three columns: Factor A (text), Factor B (text), and Response (numeric). Each row is one observation.

Supports .csv, .txt, .xlsx, .xls — headers detected automatically.
⚙️ Test Configuration
Applied to significant main effects with 3+ levels
🔢 Technical Notes & Formulas

Two-Way ANOVA Formulas (Type III SS)

Model: Y_ijk = μ + α_i + β_j + (αβ)_ij + ε_ijk Grand Mean: x̄... = Σ Y_ijk / N SS_A = Σ_i n_i. (x̄_i. − x̄...)² df_A = a−1 SS_B = Σ_j n_.j (x̄_.j − x̄...)² df_B = b−1 SS_AB = Σ_ij n_ij (x̄_ij−x̄_i.−x̄_.j+x̄...)² df_AB = (a−1)(b−1) SS_E = Σ_ijk (Y_ijk − x̄_ij)² df_E = N−ab SS_T = SS_A + SS_B + SS_AB + SS_E df_T = N−1 MS = SS / df F = MS_effect / MS_E η² = SS_effect / SS_T η²p = SS_effect / (SS_effect + SS_E) ω² = (SS_effect − df_effect × MS_E) / (SS_T + MS_E) a = # Factor A levels, b = # Factor B levels, N = total n n_ij = cell n, n_i. = row marginal n, n_.j = col marginal n
  • Type III SS: Orthogonal partitioning — works correctly for balanced and unbalanced designs (SPSS default).
  • Interaction priority: Check A×B first. If significant, interpret simple main effects rather than overall main effects.
  • Partial η²p: Preferred in factorial designs. η²p values can sum to >1 across effects — this is expected.
  • ω²: Less biased than η²; recommended for publication especially with small samples.
🎯 When to Use Two-Way ANOVA

Two-way ANOVA tests: main effect of Factor A, main effect of Factor B, AND their interaction — simultaneously, in one analysis.

Decision Checklist

  • Exactly two categorical independent variables
  • Continuous dependent variable (interval or ratio scale)
  • Independent observations within and across all cells
  • Want to test for an interaction effect
  • Subjects appear in more than one cell → Mixed/Repeated-Measures ANOVA
  • More than two factors → Three-Way ANOVA / MANOVA
  • Severely non-normal small cells → Aligned Rank Transform ANOVA

Real-World Examples

📚 Education

Exam scores by teaching method (lecture, flipped, online) AND class size (small, large) — does the best method depend on class size?

🏥 Clinical

Pain reduction by drug type (A, B, C) AND dose level (low, high) — does the optimal dose differ between drugs?

🌱 Agriculture

Plant height by fertiliser type AND watering frequency — does the optimal fertiliser depend on irrigation level?

🧠 Psychology

Test scores by gender AND study method — does the most effective method differ for male vs female students?

1 categorical factor → One-Way ANOVA 2 categorical factors (between-subjects) → TWO-WAY ANOVA (this tool) 2+ factors, some within-subjects → Mixed-Design ANOVA 3+ factors → Three-Way ANOVA / MANOVA Covariate to control → ANCOVA
📘 How to Use This Calculator
1
Choose a sample dataset to see a live worked example pre-loaded.
2
Name your factors in the Factor A and Factor B name fields.
3
Edit level names — click the green label inputs and type. Add or remove levels with + / − buttons (2–4 per factor).
4
Enter cell data — each cell = one Factor A × Factor B combination. Enter all observations as comma-separated numbers (min 2 per cell).
5
Upload a CSV/Excel using the Upload tab: three columns — Factor A labels, Factor B labels, numeric response. Each row is one observation.
6
Set α and post-hoc method, then click Run Two-Way ANOVA.
7
Check the interaction first — if A×B is significant, interpret simple main effects, not overall main effects.
8
Inspect the interaction plot — non-parallel lines indicate an interaction.
9
Read the Interpretation section — six panels cover each effect, effect sizes, assumptions, and limitations.
10
Export as Download Doc (.txt) or Download PDF for a full A4 report.
❓ Frequently Asked Questions
What is two-way ANOVA and when should I use it?

Two-way ANOVA tests the effects of two categorical factors and their interaction on one continuous outcome simultaneously. Use it when you have two grouping variables and want to know: (1) Does Factor A matter? (2) Does Factor B matter? (3) Does the effect of A depend on the level of B (interaction)? It is more efficient than two separate one-way ANOVAs and is the only test that reveals interaction effects.

What is an interaction effect and why does it matter?

An interaction means the effect of Factor A changes depending on the level of Factor B. For example, a drug may work well at high doses but not low doses — and this dose effect may differ between drugs. Interactions are the unique contribution of two-way ANOVA. If the interaction is significant, the factors do not act independently and must be interpreted together using simple main effects analysis.

Should I interpret main effects when the interaction is significant?

When the interaction is significant, overall main effects can be misleading — they average the effect of A across all B levels, which may mask important differences. Best practice: if the interaction is significant, decompose it into simple main effects (the effect of A at each specific level of B). Main effects are most interpretable when the interaction is non-significant.

What is partial eta-squared (η²p) and why is it preferred?

Partial eta-squared (η²p) = SS_effect / (SS_effect + SS_error). It measures each effect's unique proportion of variance after removing all other effects. In factorial designs, η²p is preferred over η² because it isolates each effect's contribution. Cohen's benchmarks: small = 0.01, medium = 0.06, large = 0.14. Note: η²p values for all effects can sum to more than 1.0 — this is normal in multi-factor designs.

What are the assumptions of two-way ANOVA?

(1) Independence: each observation belongs to exactly one cell with no influence on others. (2) Normality: the DV should be approximately normally distributed within each cell; for n ≥ 15 per cell, CLT applies. (3) Homogeneity of variances: cell variances should be similar — check with Levene's test. (4) No extreme outliers. If variances are unequal, interpret with caution.

How do I report two-way ANOVA results in APA 7th edition?

For each effect: "A [significant/non-significant] main effect of [Factor] was found, F(df_effect, df_error) = ___, p [</=] ___, η²p = ___." For interaction: "A significant [A] × [B] interaction, F(df_AB, df_error) = ___, p [</=] ___, η²p = ___." Always report all three F-tests; report η²p (not η²) in factorial designs; italicise F, p, η. Run the analysis above for five auto-filled reporting templates.

What is a balanced vs unbalanced factorial design?

Balanced = equal n in every cell. It is simpler and maximises power. Unbalanced = unequal cell sizes (requires Type III SS, which this calculator uses by default). Severely unequal cells reduce power and increase sensitivity to assumption violations. Always report n per cell in your Methods section.

Can I use this for a 2×2, 2×3, or 3×3 design?

Yes. This calculator handles any fully crossed design with 2–4 levels per factor (up to 4×4). Enter data directly in the cell grid or upload a long-format dataset. The tool automatically computes the appropriate df, SS, MS, F, p-values, and effect sizes for any combination of levels.

📚 References
  1. Fisher, R. A. (1925). Statistical methods for research workers. Oliver and Boyd.
  2. Tukey, J. W. (1949). Comparing individual means in the analysis of variance. Biometrics, 5(2), 99–114.
  3. Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum.
  4. APA. (2020). Publication manual (7th ed.). doi.org/10.1037/0000165-000
  5. Field, A. (2018). Discovering statistics using IBM SPSS (5th ed.). SAGE.
  6. Maxwell, S. E., & Delaney, H. D. (2004). Designing experiments and analyzing data (2nd ed.). Lawrence Erlbaum.
  7. Levene, H. (1960). Robust tests for equality of variances. In Olkin (Ed.), Contributions to probability and statistics. Stanford UP.
  8. Lakens, D. (2013). Calculating and reporting effect sizes. Frontiers in Psychology, 4, 863.
  9. Howell, D. C. (2012). Statistical methods for psychology (8th ed.). Cengage.
  10. R Core Team. (2024). R: A language and environment for statistical computing. R-project.org

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
Next Post

© 2026 STATS UNLOCK . statsunlock.com –  All Rights Reserved.