ANOVA Calculator
A one-way analysis of variance for up to five groups. Paste each group as a list of numbers and the calculator returns the F statistic, the degrees of freedom, the p-value, eta-squared, and the full SS / df / MS table.
F statistic
F(2, 12) = 20.7878787879, p = 1.26e-4
- Group 1 — n=5, mean
- 6.6
- Group 2 — n=5, mean
- 10.4
- Group 3 — n=5, mean
- 6.8
- Grand mean
- 7.9333333333
- SS between (treatment)
- 45.7333333333
- SS within (error)
- 13.2
- SS total
- 58.9333333333
- df between / within / total
- 2 / 12 / 14
- MS between
- 22.8666666667
- MS within
- 1.1
- p-value
- 1.26e-4
- Eta-squared (η²)
- 0.7760
Reject the null hypothesis at α = 0.01 — strong evidence that at least one group mean differs. One-way ANOVA assumes the groups are independent samples from approximately normal populations with similar variances; with k=3 groups and N=15 observations the F-test compares between-group variance (MS between) to within-group variance (MS within).
How to use this calculator
Type or paste your data into the Group 1, Group 2, and Group 3 boxes — separate values with commas, spaces, tabs, or new lines. Groups 4 and 5 are optional; leave them blank if you have only two or three groups. The calculator runs a one-way ANOVA: the headline shows the F statistic with its two degrees of freedom and the right-tailed p-value, the breakdown shows each group mean, the grand mean, the sum-of-squares decomposition (between, within, total), the degrees of freedom, the mean squares, and eta-squared as an effect size. Decimals and negatives are fine. Unrecognised tokens are ignored and reported.
How the calculation works
One-way ANOVA tests the null hypothesis that several population means are all equal against the alternative that at least one differs. The total variation in the combined dataset is split into two pieces: SS between (treatment), Σ nᵢ (x̄ᵢ − x̄)², measures how far each group mean sits from the grand mean weighted by the group size; SS within (error), Σ Σ (xᵢⱼ − x̄ᵢ)², measures how much each observation deviates from its own group mean. Dividing by their degrees of freedom (k − 1 and N − k) gives the two mean squares, and their ratio F = MS between ÷ MS within follows an F-distribution with (k − 1, N − k) degrees of freedom under the null. The p-value is the right tail of that distribution: P(F_{k−1, N−k} ≥ observed). The calculator also reports eta-squared (η² = SS between ÷ SS total), the proportion of total variance explained by group membership — a common effect-size measure.
Worked example
Take three groups: Group 1 = (5, 6, 7, 8, 7), Group 2 = (9, 10, 11, 10, 12), Group 3 = (6, 7, 6, 8, 7). Each group has n = 5 for N = 15 observations and k = 3 groups. Group means: x̄₁ = 6.6, x̄₂ = 10.4, x̄₃ = 6.8; grand mean x̄ = 7.933. SS between = 5·(6.6 − 7.933)² + 5·(10.4 − 7.933)² + 5·(6.8 − 7.933)² ≈ 45.733. SS within = 5.2 + 5.2 + 2.8 = 13.2. Degrees of freedom: df_between = 3 − 1 = 2, df_within = 15 − 3 = 12. Mean squares: MS_between = 45.733 ÷ 2 ≈ 22.867, MS_within = 13.2 ÷ 12 = 1.10. F = 22.867 ÷ 1.10 ≈ 20.79 on (2, 12) df, which gives p ≈ 0.00014 — well past the 0.01 threshold, so we reject the null and conclude at least one group mean differs.
Frequently asked questions
What is ANOVA actually testing?
A one-way ANOVA tests one null hypothesis: that the population means of all the groups are equal (μ₁ = μ₂ = … = μ_k). The alternative is that at least one mean differs from the rest — ANOVA does not say which one, just that they are not all the same. If you want to know which specific pair of groups differs, you follow up a significant ANOVA with post-hoc comparisons (Tukey HSD, Bonferroni-adjusted t-tests, Scheffé's method, etc.). With only two groups a one-way ANOVA is mathematically equivalent to a two-sample t-test with pooled variance: F = t², and the p-values are identical.
Why not just run several t-tests instead?
Running pairwise t-tests across all pairs of groups inflates the family-wise type-I error rate. With α = 0.05 and three groups you have three pairwise comparisons and the chance of at least one false positive climbs from 5% to roughly 14%; with five groups (ten pairs) it climbs to about 40%. A single ANOVA controls the overall α at the chosen level, and is more powerful than the union of pairwise t-tests when the assumptions hold. Once ANOVA rejects, the post-hoc procedures handle the multiplicity problem for you.
What assumptions does one-way ANOVA make?
Three: (1) the observations within each group are an independent random sample from the corresponding population; (2) those populations are approximately normally distributed; and (3) the populations have equal variances (homoscedasticity). The F-test is fairly robust to moderate departures from normality, especially with reasonably equal sample sizes, because of the central limit theorem. It is less robust to unequal variances when sample sizes are also unequal. If the equal-variance assumption is badly violated, use Welch's ANOVA (the heteroscedastic variant); if the normality assumption is badly violated, use the non-parametric Kruskal–Wallis test on the ranks of the data instead.
What is eta-squared and how do I interpret it?
Eta-squared (η²) is the proportion of total variance in the combined dataset that is attributable to differences between the group means: η² = SS between ÷ SS total. It runs from 0 (all variation is within-group noise) to 1 (all variation is between-group differences). Cohen's rough benchmarks for behavioural sciences are 0.01 = small, 0.06 = medium, 0.14 = large, but the right benchmark depends heavily on the field. Eta-squared is the descriptive analogue to R² in regression. It is biased upward in small samples — for inferential use, adjusted measures like omega-squared (ω²) are slightly less biased.
What is the difference between MS between and MS within?
MS within (also called MS error or MS residual) estimates the underlying population variance σ² from the variation of observations around their own group means. It is an unbiased estimate of σ² whether the null hypothesis is true or false — group membership has no influence on within-group spread. MS between (also called MS treatment) also estimates σ² when the null is true, but is inflated by the genuine variability of group means when the null is false. So under H₀ the ratio MS between ÷ MS within hovers around 1; under H₁ it grows. Large F values are evidence against H₀, and the F-distribution with (k − 1, N − k) df tells you exactly how large is "large enough".
What is the difference between one-way and two-way ANOVA?
One-way ANOVA has one categorical factor with several levels (the groups). Two-way ANOVA has two categorical factors crossed with each other — for example, drug (A, B, C) crossed with sex (male, female) — and tests three things: the main effect of the first factor, the main effect of the second factor, and the interaction between them. The interaction term asks whether the effect of one factor depends on the level of the other. This calculator handles only the one-way case. For two-way designs, repeated measures, or random/mixed-effects models you need a dedicated statistics package (R's aov / lm, Python's statsmodels, JASP, etc.).