ANOVA Calculator

ANOVA Calculator

Run a one-way analysis of variance on two to six groups to test whether their means differ, with the full ANOVA table, F statistic, p-value and effect size.

F = MS between ÷ MS within

Enter the values for every group

What is ANOVA?

Analysis of variance (ANOVA) tests whether three or more group means are all equal, using a single test instead of many pairwise ones. It compares how far the group means sit from each other with how much values vary inside each group.

If the groups differ only by chance, the spread between their means should be about what the within-group spread predicts. The F statistic is the ratio of the two; values well above 1 suggest real differences.

A significant ANOVA says at least one mean differs, not which. Follow-up (post hoc) comparisons such as Tukey's test find the specific pairs.

One-Way ANOVA Formula

As given in the NIST/SEMATECH e-Handbook, section 7.4.3. See Sources.

1. Split the variation

SS between = Σ nᵢ (x̄ᵢ − x̄)²
SS within = Σ Σ (x − x̄ᵢ)²

2. Average by degrees of freedom

MS between = SS between ÷ (k − 1) · MS within = SS within ÷ (N − k)

3. F, p and effect size

F = MS between ÷ MS within, p = P(F(k − 1, N − k) ≥ F)
η² = SS between ÷ SS total

Worked Example: Three Teaching Methods

Given:
Test scores under method A 82, 85, 88, 75, 90, B 78, 74, 80, 72, 76 and C 90, 92, 85, 88, 95.
Step 1:
Means:
A 84 · B 76 · C 90 · overall 83.33
Step 2:
Sums of squares:
between 493.33 (df 2) · within 236 (df 12)
Step 3:
F:
(493.33 ÷ 2) ÷ (236 ÷ 12) = 246.67 ÷ 19.67 = 12.54
Result:
F(2, 12) = 12.54, p = 0.0011

Strong evidence the methods differ, and η² = 0.68 says method explains about two-thirds of the variation in scores. Method B looks weakest, but a post hoc test is needed to confirm which pairs differ.

The ANOVA Table for the Teaching Methods

The standard layout most software prints. SS and df add up down the columns.

ANOVA table for the worked example
SourceSSdfMSF
Between493.332246.6712.54
Within2361219.67
Total729.3314

Common ANOVA Mistakes

  • Running t-tests on every pair instead. Three groups means three tests and a higher false-positive rate. ANOVA first, then a corrected post hoc test.
  • Concluding which group is different. A significant F only says the means aren't all equal.
  • Using it for repeated measures. If the same people appear in every group, use repeated-measures ANOVA; this version assumes independent groups.
  • Ignoring very unequal spreads. When group SDs differ a lot and group sizes differ too, Welch's ANOVA is safer.

ANOVA FAQs

Why is it called analysis of variance when it tests means?

Because it compares two estimates of variance, one from between the group means and one from within groups, to judge whether the means differ.

Can I use ANOVA with two groups?

Yes. With two groups, F equals t² from a pooled t-test and gives the same p-value.

What are the assumptions?

Independent observations, roughly normal data within each group, and similar spreads across groups.

What is η²?

Eta squared, the share of total variation explained by group membership. Around 0.01 is small, 0.06 medium and 0.14 large by Cohen’s guide.

What post hoc test should I use?

Tukey’s HSD for all pairs with equal-ish group sizes, or Bonferroni-corrected t-tests for a few planned comparisons.

Do the groups need the same size?

No. Unequal sizes are fine, though the test is more sensitive to unequal variances when sizes differ.

What if my data aren’t normal?

With moderate group sizes ANOVA holds up well. For small, skewed samples, the Kruskal–Wallis test is the rank-based alternative.

How do I run ANOVA in Excel?

Use the Data Analysis ToolPak’s “Anova: Single Factor”, with each group in its own column.

Sources

Related Tools