ANOVA Calculator: One-Way ANOVA Table, F, p-Value and Effect Size
By FindMySum · Last reviewed
An ANOVA calculator tests whether three or more groups have the same mean. Analysis of variance does it with one number, the F statistic, which compares how far apart the group means are with how much the values vary inside each group. This calculator runs a one-way ANOVA for 2 to 10 groups and gives the full ANOVA table, the p-value and critical F, two effect sizes, Welch's ANOVA for unequal variances, the Brown–Forsythe test of equal variances, and Tukey HSD or Bonferroni comparisons of every pair of groups. Paste one group per line, with an optional name before a colon.
The idea behind ANOVA
Imagine three fertilisers tested on five plots each. Yields vary from plot to plot even with the same fertiliser: that is the within-group variation, the noise. The three fertiliser averages also differ: that is the between-group variation. If the fertilisers made no difference, the averages would differ only by about as much as noise predicts. ANOVA turns this into a ratio:
F = (variation between groups) ÷ (variation within groups).
An F near 1 is what you expect when all means are equal. A large F says the group means are further apart than chance explains.
Worked example with the default data
| Group | Values | Mean |
|---|---|---|
| Fertiliser A | 20, 21, 23, 19, 22 | 21 |
| Fertiliser B | 25, 27, 24, 26, 28 | 26 |
| Fertiliser C | 22, 24, 21, 23, 25 | 23 |
The grand mean of all 15 values is 23.333.
- Between groups: SSB = Σ nᵢ(x̄ᵢ − x̄)² = 5(21 − 23.333)² + 5(26 − 23.333)² + 5(23 − 23.333)² = 63.333, with k − 1 = 2 degrees of freedom, so MSB = 31.667.
- Within groups: add the squared deviations from each group's own mean. Each group contributes 10, so SSW = 30, with N − k = 12 degrees of freedom, so MSW = 2.5.
- F = 31.667 ÷ 2.5 = 12.667.
- p-value: the chance of F(2, 12) ≥ 12.667 is 0.0011. The critical value at α = 0.05 is 3.885, and 12.667 is far beyond it.
So the fertilisers do not all give the same yield. The effect is large: η² = 63.333 ÷ 93.333 = 0.68, meaning 68% of the variation in yield is explained by fertiliser.
The ANOVA table
| Source | SS | df | MS | F | p |
|---|---|---|---|---|---|
| Between groups | 63.333 | 2 | 31.667 | 12.667 | 0.0011 |
| Within groups | 30 | 12 | 2.5 | ||
| Total | 93.333 | 14 |
This is the layout of Excel's Analysis ToolPak and of R's summary(aov()). SS between plus SS within always equals the total, and so do the degrees of freedom.
Which groups differ?
A significant F says at least one mean differs. To find which, the calculator compares every pair, by default with Tukey's honestly significant difference (HSD). Each difference in means is divided by √(MSW ÷ 2 × (1/nᵢ + 1/nⱼ)) to give a studentized range q, and its p-value comes from the studentized range distribution for k groups and N − k degrees of freedom: the distribution of the largest gap among k means, so the error rate holds across all the pairs at once. With equal group sizes, any two means further apart than the HSD, q(1 − α) × √(MSW ÷ n), differ. In the example q(0.95; 3, 12) = 3.773 and the HSD is 3.773 × √(2.5 ÷ 5) = 2.67: B differs from A (p = 0.0008) and from C (p = 0.028), while A and C, 2 apart, do not (p = 0.15). With unequal group sizes the same formula is used pair by pair (the Tukey–Kramer form).
The other choice is Bonferroni: a t-test for each pair on the pooled variance, with each p-value multiplied by the number of pairs. It works for any collection of tests but is more conservative, so for comparing every pair the NIST/SEMATECH e-Handbook and Montgomery's textbook prefer Tukey, which is why it is the default. In the example Bonferroni gives adjusted p-values below 0.001, 0.033 and 0.21 for the same three pairs.
Checking the assumptions
ANOVA assumes independent observations, approximately normal data in each group, and equal variances. The calculator helps with the third.
- Brown–Forsythe test: a one-way ANOVA on the absolute deviations of each value from its group's median. A small p-value means the spreads differ. It is the robust version of Levene's test and the default in R's
car::leveneTestand scipy'slevene. - Welch's ANOVA: weights each group by nᵢ ÷ sᵢ² and adjusts the denominator degrees of freedom. It stays accurate when variances differ and loses very little when they don't, so it is a sound default, particularly with unequal group sizes.
Effect sizes
The p-value depends on sample size: a tiny difference becomes significant with enough data. Effect sizes describe how big the difference is.
- η² (eta squared) = SSB ÷ SST, the share of total variation explained by the groups.
- ω² (omega squared) = (SSB − (k − 1)·MSW) ÷ (SST + MSW), a less biased estimate of the population effect. It is smaller than η² and can be slightly negative when there is no effect.
Common rough guides are 0.01 small, 0.06 medium and 0.14 large, though what counts as large depends on the field.
Common mistakes
- Running many t-tests instead of ANOVA. Each test adds a chance of a false positive; ten tests at α = 0.05 give about a 40% chance of at least one.
- Using ANOVA on paired or repeated data. The same people measured three times are not independent groups; use repeated-measures ANOVA.
- Ignoring unequal variances. Look at the Brown–Forsythe result, and report Welch's F when it is significant.
- Reporting only p. Give F with both degrees of freedom, p, and an effect size.
Related calculators
Use the t-test calculator for two groups, the chi-square calculator for counts in categories, the standard deviation calculator to describe each group's spread, and the critical value calculator for F critical values at any α.
More questions
What does a significant ANOVA result tell me?
Only that the group means are not all equal. It does not say which groups differ, by how much, or whether the difference matters in practice. Follow it with pairwise comparisons for the which, the group means and their differences for the how much, and an effect size such as ω² for practical importance.
Can I use ANOVA with groups of different sizes?
Yes. The formulas weight each group by its size. Unequal sizes do make ANOVA more sensitive to unequal variances: if the smaller groups have the larger variances, the classic F test rejects too often. Check the Brown–Forsythe test and use Welch's ANOVA when in doubt.
What should I do if my data are not normal?
With 15 or more values per group, ANOVA is usually robust to moderate non-normality because group means are close to normal by the central limit theorem. For small, strongly skewed or ordinal data, use the Kruskal–Wallis test, which compares ranks instead of means.
What is the difference between one-way and two-way ANOVA?
One-way ANOVA has a single factor, such as fertiliser type. Two-way ANOVA has two factors at once, such as fertiliser and watering level, and can test whether they interact. This calculator handles one factor; a two-factor design needs a cell for every combination and a different table.
How do I report an ANOVA result?
APA style gives the F statistic with both degrees of freedom, the p-value and an effect size, for example: F(2, 12) = 12.67, p = .001, ω² = .61. Add the group means and standard deviations in a table, and say which post-hoc test you used for the pairwise comparisons.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.4.3 Are the means equal? (one-way ANOVA)
- Welch, B. L. (1951). On the comparison of several mean values: an alternative approach. Biometrika 38, 330–336
- R documentation: oneway.test (Test for Equal Means in a One-Way Layout)
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.4.7.1 Tukey's method and 7.4.7.4 comparison of the Scheffé, Bonferroni and Tukey methods
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.