One-Way ANOVA Calculator

One-way ANOVA tests whether several group means could all have come from the same population. Paste each group's raw values into its own box — commas, spaces or new lines all work — and this calculator builds the complete ANOVA table: sums of squares, degrees of freedom, mean squares, the F statistic, an exact p-value from the F distribution, the critical F at your alpha, and eta-squared as an effect size. It also reports each group's mean, standard deviation and sum of squares so you can see where the variation sits.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Group 1 valuesRaw observations separated by commas, spaces or line breaks. At least two values.82, 85, 88, 91, 79
Group 2 valuesThe second group's raw observations. Groups need not be the same size.90, 94, 89, 96, 91
Group 3 valuesLeave blank if you only have two groups.78, 82, 80, 85, 75
Group 4 valuesOptional fourth group.
Group 5 valuesOptional fifth group.
Significance level (α)Sets the critical F value and the reject-or-not decision.0.05

It returns

  • F statistic — The ratio of between-group variance to within-group variance.
  • p-value
  • Decision at your alpha
  • Critical F
  • df between groups
  • df within groups
  • Eta squared (η²) — Share of the total sum of squares explained by group membership.

The formula

F=SSB/(k1)SSW/(Nk)
η2=SSBSST

In plain text: F = MSB / MSW = (SSB/(k−1)) / (SSW/(N−k))

  • SSBBetween-groups sum of squares: Σ nᵢ(x̄ᵢ − x̄)²
  • SSWWithin-groups sum of squares: ΣΣ(x − x̄ᵢ)²
  • kNumber of groups (count)
  • NTotal number of observations across all groups (count)
  • FTest statistic, compared against F(k−1, N−k)

SSB + SSW = SST exactly, and (k−1) + (N−k) = N−1. That partition of both the variation and the degrees of freedom is the whole idea behind analysis of variance.

Updated Category Hypothesis Tests & Statistical Power Verified against published test cases Reading time 9 min

What analysis of variance compares

Despite the name, ANOVA is a test about means. It compares three or more group averages by asking a question about variation: is the spread between the group means larger than you would expect given the spread within the groups?

Picture three teaching methods with test scores. If the three class averages differ by 12 points while scores inside each class scatter by 30, the class averages are unremarkable — you would expect that much separation from random assignment alone. If the averages differ by 12 points while scores inside each class scatter by 3, something is separating the groups. ANOVA formalises exactly that comparison, and the F statistic is the ratio of the two variances.

The null hypothesis is that every group was drawn from the same population, so all the population means are equal. The alternative is simply that they are not all equal — it does not say which one differs, or in which direction. That is the central limitation of ANOVA: a significant F tells you the means are not all the same, and nothing more. Identifying which pairs differ requires a post-hoc procedure such as Tukey's HSD, run after the F test rejects.

The obvious alternative — running a t-test on every pair — fails because of multiplicity. With four groups there are six pairwise comparisons, and if each runs at α = 0.05 the chance of at least one false positive rises to roughly 1 − 0.95⁶ = 0.265 when all the nulls are true. That figure treats the six comparisons as independent, which they are not — they share groups — but the direction and the rough size of the inflation are real. ANOVA answers the overall question with a single test at a single alpha.

How the sums of squares partition

Take every observation's deviation from the grand mean and square it; add them all up and you have the total sum of squares, SST. The insight behind ANOVA is that SST splits exactly into two pieces with no remainder.

SSB, the between-groups sum of squares, is Σnᵢ(x̄ᵢ − x̄)² — each group's squared distance from the grand mean, weighted by how many observations that group contains. It captures variation explained by which group an observation belongs to.

SSW, the within-groups sum of squares, is ΣΣ(x − x̄ᵢ)² — each observation's squared distance from its own group mean. It captures everything group membership does not explain, and it is the pooled error term.

The degrees of freedom split the same way: k − 1 for between, N − k for within, adding to N − 1 for the total. Dividing each sum of squares by its degrees of freedom gives a mean square, which is a variance estimate. Under H₀ both MSB and MSW estimate the same population variance, so their ratio should sit near 1. When the group means genuinely differ, MSB picks up that separation while MSW does not, so F climbs.

F cannot be negative, and its distribution is right-skewed with two separate degrees-of-freedom parameters. Only the upper tail is used: the p-value is the area beyond your F. You can look up the same tail area for any F with the p-value calculator.

Worked example: three teaching methods, five students each

Fifteen students are randomly assigned to three methods and sit the same test. Method A scores 82, 85, 88, 91, 79; method B scores 90, 94, 89, 96, 91; method C scores 78, 82, 80, 85, 75. These are the calculator's default values.

  1. Group means. A: 425/5 = 85. B: 460/5 = 92. C: 400/5 = 80.
  2. Grand mean. 1,285 / 15 = 85.6667.
  3. SSB. 5[(85−85.6667)² + (92−85.6667)² + (80−85.6667)²] = 5[0.4444 + 40.1111 + 32.1111] = 5 × 72.6667 = 363.3333.
  4. SSW. Group A deviations from 85 are −3, 0, 3, 6, −6, squaring and summing to 90. Group B gives 34, group C gives 58. SSW = 90 + 34 + 58 = 182.
  5. Degrees of freedom. Between: 3 − 1 = 2. Within: 15 − 3 = 12.
  6. Mean squares. MSB = 363.3333/2 = 181.6667. MSW = 182/12 = 15.1667.
  7. F. 181.6667 / 15.1667 = 11.978.
  8. Compare. The critical F(2, 12) at α = 0.05 is 3.885. Since 11.978 > 3.885, reject H₀.
  9. Effect size. SST = 363.3333 + 182 = 545.3333, so η² = 363.3333/545.3333 = 0.666 — two thirds of the variation in scores is associated with which method a student received.

The F test has established that the three methods do not all produce the same mean. It has not established that B beats A, or that A beats C. Those are three separate pairwise questions, and answering them without inflating the error rate needs Tukey's HSD or an equivalent adjusted comparison.

Reading the ANOVA table

Check F against its critical value, or equivalently the p-value against alpha — the two comparisons always agree, because the critical value is defined as the F whose upper tail area equals alpha. An F near 1 means the between-group spread is about what within-group noise alone would produce.

Then read eta-squared, because F on its own confounds effect size with sample size. η² is the share of total sum of squares attributable to group membership, so it runs from 0 to 1 and answers “how much” rather than “whether”. It is a descriptive statistic for the sample and is biased upward as an estimate of the population value, particularly with small groups; omega-squared corrects that bias and is preferred in published work.

Look at the group summaries before drawing any conclusion. A significant F driven by one extreme group with three observations tells a different story from one driven by an even ordering across five balanced groups. The group standard deviations also let you check the equal-variance assumption directly: this test pools all the within-group variation into one error term, which is only fair if the groups really do share a common variance.

Finally, remember what the design permits. ANOVA on randomly assigned groups supports a causal reading; ANOVA on groups that already existed — departments, countries, self-selected users — supports only an associational one, exactly as with correlation.

Critical values of F at α = 0.05

Upper 5% points of the F distribution. Read the column for your between-groups df (k − 1) and the row for your within-groups df (N − k).
df withindf between = 12345
56.615.795.415.195.05
104.964.103.713.483.33
124.753.893.493.263.11
204.353.493.102.872.71
304.173.322.922.692.53
604.003.152.762.532.37

Standard published F table. With one between-groups degree of freedom, F equals the square of the corresponding two-tailed t: 4.75 at df within = 12 is 2.179².

Assumptions and common errors

  • Independence. Every observation must be independent of every other, both within and across groups. Repeated measures on the same subject need repeated-measures ANOVA, not this test.
  • Equal variances. The pooled error term assumes the groups share a variance. As a working rule, a largest-to-smallest variance ratio beyond about 4 is a problem, especially with unequal group sizes; Welch's ANOVA relaxes the assumption.
  • Approximate normality within groups. ANOVA is fairly robust to mild departures, but heavy skew or outliers at small group sizes distort both F and the p-value.
  • Reading a significant F as identifying the biggest group. It does not. Follow with a post-hoc test that controls the family-wise error rate.
  • Running ANOVA on two groups and reporting it as something different from a t-test. With k = 2, F equals t² exactly and the p-values are identical.
  • Dropping outliers to reach significance. Removing points changes both the mean and the error term, and doing it after seeing the result invalidates the p-value entirely.

Where one-way ANOVA sits among the alternatives

With exactly two groups, use the two-sample t-test calculator: it gives the same answer, plus a signed difference and a confidence interval that ANOVA does not report. With one group against a fixed reference value, use the one-sample t-test calculator.

When the equal-variance assumption fails badly, Welch's ANOVA adjusts the degrees of freedom in the same way the Welch t-test does. When the data are ordinal or heavily skewed, the Kruskal-Wallis test ranks the observations and tests the ranks instead. When you have two grouping factors at once — method and school, dose and sex — you need two-way ANOVA, which also estimates the interaction between them.

For the effect size on its own, or to convert between effect-size measures when planning a study, see the Cohen's d calculator and the statistical power calculator. Analysis of variance was developed by R. A. Fisher at Rothamsted in the 1920s for agricultural field trials, which is why the vocabulary of treatments, blocks and plots still runs through the subject.

Frequently asked questions

How many groups do I need for ANOVA?

At least two, though the method earns its keep from three upward. With two groups the F test is algebraically identical to a two-sample t-test with equal variances assumed, and F = t². Above two groups ANOVA becomes genuinely useful, because it answers the overall question with one test instead of several pairwise ones that would inflate the false-positive rate.

What does a significant F actually tell me?

That the group means are not all equal — nothing more specific. It does not tell you which group differs, how many differ, or in which direction. To answer that, run a post-hoc procedure such as Tukey's HSD that controls the family-wise error rate across all the pairwise comparisons, and do it only after the omnibus F rejects.

Do the groups need to be the same size?

No. The formulas weight each group's contribution to SSB by its own n, so unequal sizes are handled correctly. Balanced designs are still preferable: they maximise power for a given total sample, and they make the F test far more tolerant of unequal variances. With badly unbalanced groups and unequal variances, use Welch's ANOVA instead.

What is eta-squared and what counts as large?

Eta-squared is SSB/SST, the share of total variation associated with group membership, running from 0 to 1. Cohen's conventional benchmarks for this family of measures put roughly 0.01 as small, 0.06 as medium and 0.14 as large, but they are rules of thumb rather than facts about your field. Note that η² is biased upward in small samples; omega-squared is the bias-corrected version.

Can F be less than 1?

Yes, and it means the between-group mean square came out smaller than the within-group mean square — the group means are closer together than random noise alone would typically produce. That is unremarkable and never significant, since only the upper tail of the F distribution is used. An F very close to zero across many groups can occasionally hint at data that has been rounded, averaged or otherwise pre-processed.

Why not just run t-tests on every pair?

Because the error rates multiply. With four groups there are six pairwise tests; if every null is true and each test runs at α = 0.05, the probability of at least one false positive is about 1 − 0.95⁶ = 0.265 — approximate, because the six comparisons share groups and are not independent. ANOVA asks the overall question once at your chosen alpha, and post-hoc procedures then make the pairwise comparisons with an explicit correction.

What if my group variances are very different?

The pooled error term stops being fair, and the F test's real error rate drifts from the stated alpha — badly so when the larger variances sit in the smaller groups. This calculator flags a largest-to-smallest variance ratio above 4. The fixes are Welch's ANOVA, which does not pool, a variance-stabilising transformation such as logs, or the rank-based Kruskal-Wallis test.

How do I enter my data?

Paste each group's raw values into its own box, separated by commas, spaces or line breaks — any mixture works, and non-numeric text is ignored. Use two, three, four or five boxes as needed; empty boxes are skipped, and a box with fewer than two numbers is treated as absent. The group summaries table repeats each group's n, mean and standard deviation so you can confirm the data parsed the way you expected.

References