One-way ANOVA tests whether three or more group means differ by more than random variation. It answers a single question — “are at least two of these group means different?” — without saying which ones. Use it instead of running many t-tests, which would inflate your false-positive rate. A significant result (p < α) means at least one group differs; follow up with a post-hoc test such as Tukey's HSD to find which pairs. ANOVA assumes independent groups, roughly normal residuals, and similar variances. It also reports η², Levene's test, Welch's ANOVA and Tukey HSD comparisons. Results here match SciPy's f_oneway and tukey_hsd and are validated to full precision.

When to use one-way ANOVA

Reach for ANOVA when you have one categorical factor with three or more levels (groups) and a numeric outcome — for example, comparing test scores across three teaching methods, or yield across four fertilizers. With exactly two groups, a t-test is equivalent and simpler. With two factors (e.g. method and school), you need two-way ANOVA.

The key reason to use ANOVA rather than several pairwise t-tests is error control: each t-test at α = 0.05 carries a 5% false-positive risk, and those risks compound. ANOVA gives one omnibus test at your chosen α.

Assumptions, and how to check them

Worked example

Three study methods give scores of 12, 14, 13, 15, 18, 20, 17, 19, and 24, 22, 26, 25. The group means (13.5, 18.5, 24.25) are far apart relative to the within-group spread, so ANOVA returns a large F and a tiny p-value — strong evidence that at least one method differs. A post-hoc Tukey test would then show all three pairs differ. Paste the data above to see F, df, and the full table.

Common mistakes

If assumptions fail

With unequal variances, use Welch's ANOVA. If residuals are badly non-normal and samples are small, use the non-parametric Kruskal–Wallis test. For the computation and validation details, see the methodology page, and for choosing among tests the which-test wizard.

Guide: One-Way ANOVA

ANOVA (Analysis of Variance) tests whether the means of three or more independent groups are significantly different. It partitions the total variability in the data into variation due to group differences and variation within groups.

Despite the name, ANOVA tests differences in means, not variances. It works by comparing how much the group means vary (between-group variance) to how much the data varies within each group (within-group variance).

Running multiple t-tests inflates the Type I error rate (false positive rate). With 3 groups, you would run 3 t-tests. At α = 0.05 each, the overall chance of at least one false positive becomes approximately 1 − (0.95)³ ≈ 14%.

ANOVA controls the overall Type I error at α by testing all group differences simultaneously in a single test.

The F-statistic is the ratio of between-group variance to within-group variance. A large F means the group means vary much more than the data within groups — evidence of a real difference.

The p-value tells you the probability of observing an F this large (or larger) by chance if all group means were equal. If p < 0.05, at least one pair of group means differs significantly.

A significant ANOVA only tells you that at least one group mean differs — not which groups differ. To find out, run a post-hoc test:

  • Tukey's HSD: Most commonly used; controls family-wise error rate while maximising power
  • Bonferroni correction: Divide α by the number of comparisons — very conservative
  • Scheffé's test: Most flexible; suitable for complex contrasts

This calculator runs Tukey’s HSD automatically and shows every pairwise comparison with an adjusted p-value and confidence interval (the Tukey–Kramer version when group sizes differ).

  • Normality: Data within each group should be approximately normally distributed (robust with n > 30 per group)
  • Homoscedasticity: The variances of all groups should be approximately equal (check with Levene's test)
  • Independence: Observations must be independent — both within and between groups

If normality is seriously violated, use the Kruskal-Wallis test (non-parametric alternative to one-way ANOVA).