Statistics

ANOVA Calculator

Perform one-way ANOVA to compare means across multiple groups

Last reviewed: How we build & verify
F-Statistic
P-value
Significance (alpha=0.05)
df (between)
df (within)
SS Between
SS Within
MS Between
MS Within

How it works

Analysis of variance tests whether three or more group means differ by more than sampling noise would explain. It compares the spread between the group means against the spread within each group, and reports that comparison as an F statistic with a p-value.

Formula
SS_between = Σ nⱼ(x̄ⱼ − x̄)²
SS_within = Σ Σ (xᵢⱼ − x̄ⱼ)²
F = (SS_between / (k − 1)) / (SS_within / (N − k))
Variables
  • knumber of groups being compared
  • Ntotal observations across all groups
  • nⱼ, x̄ⱼsize and mean of group j
  • grand mean of every observation
  • MSmean square: a sum of squares divided by its degrees of freedom
Worked example
Inputs: Three groups of four: 5, 7, 6, 6 | 8, 9, 7, 8 | 11, 9, 10, 10
  1. Group means are 6, 8, 10; grand mean is 8
  2. SS_between = 4(6 − 8)² + 4(8 − 8)² + 4(10 − 8)² = 16 + 0 + 16 = 32
  3. Each group has a within-group sum of squares of 2, so SS_within = 6
  4. Degrees of freedom: k − 1 = 2 between, N − k = 9 within
  5. MS_between = 32 / 2 = 16, MS_within = 6 / 9 = 0.6667
  6. F = 16 / 0.6667 = 24
Result: F(2, 9) = 24, p ≈ 0.00025, far past the 5% critical value of 4.26
Notes
  • A significant F says at least one group differs, and nothing about which one. Follow it with Tukey HSD or a similar post-hoc test; running a separate t-test on every pair inflates the false-positive rate.
  • Two-way ANOVA splits the between-groups variation into a main effect for each factor plus an interaction term. Read the interaction first, because when factors interact the main effects on their own can point in a misleading direction.
  • The test assumes roughly equal variances across groups. A Levene test flags violations, and Welch ANOVA is the usual fix when group sizes are unequal too.
  • F says nothing about effect size. Eta-squared, SS_between / SS_total, is 32 / 38 = 0.84 here, so group membership accounts for 84% of the total variation.

Most Searched Today

Frequently Asked Questions

Anova Calculator runs right in the browser tab you already have open. No install, no account, no cost.

Anova Calculator follows the standard method used in textbooks and technical references for this calculation, and we show the formula or approach on the page itself so you can check the working rather than trust a black box. Found an edge case that breaks it? Use the feedback button in the bottom-right corner.

ANOVA Calculator | ExaCalc