CalcOpenly

One-way ANOVA calculator

One-way ANOVA calculator: the F statistic, p-value, sums of squares, mean squares and η² for two or more groups, with the full ANOVA table.

Updated Checked against 4 worked examples

One group per line; separate values with spaces or commas. Groups may have different sizes.
Try
p-value
p-value: 0.003248
Shown to up to 6 decimal places, half-up
Decision
Reject H₀
F statistic
9.591107
df between groups
2
df within groups
12
Sum of squares between
27.897333
Sum of squares within
17.452
Mean square between
13.948667
Mean square within
1.454333
η² (share of variance explained)
0.6152
Critical F
3.8853

Reject H₀ at α = 0.05. If all group means were equal, a result at least this extreme would turn up with probability 0.0032. The p-value is not the probability that H₀ is true, and a significant result says nothing about how large or important the effect is. Group membership accounts for 61.5% of the total variation (η²). ANOVA does not say which groups differ — follow up with a post-hoc comparison such as Tukey's HSD.

p-value area under F(2, 12)

00.250.50.7510246810FDensityF = 9.591critical 3.885

Group means

Group 1 (n = 5)5.34Group 2 (n = 5)7.72Group 3 (n = 5)8.56
ANOVA table (3 rows)
SourceSSdfMSFp-value
Between groups27.8973213.94879.59110.0032
Within groups17.452121.4543——
Total45.349314———
How it's calculated S
  1. Hypotheses

    H0:μ1=⋯=μ3,H1:at least one mean differsH_0: \mu_1 = \dots = \mu_{3},\quad H_1: \text{at least one mean differs}
  2. Group means and grand mean

    xˉi=(5.34, 7.72, 8.56),xˉ=7.206667,N=15\bar x_i = (5.34,\ 7.72,\ 8.56),\quad \bar x = 7.206667,\quad N = 15
  3. Between-group sum of squares

    SSB=∑ni(xˉi−xˉ)2=27.897333SS_B = \sum n_i(\bar x_i - \bar x)^2 = 27.897333
  4. Within-group sum of squares

    SSW=∑i∑j(xij−xˉi)2=17.452SS_W = \sum_i \sum_j (x_{ij} - \bar x_i)^2 = 17.452
  5. Mean squares and F

    F=27.897333/217.452/12=13.9486671.454333=9.591107F = \frac{27.897333/2}{17.452/12} = \frac{13.948667}{1.454333} = 9.591107
  6. p-value

    p=P(F2, 12≥9.591107)=0.0032482226p = P(F_{2,\,12} \ge 9.591107) = 0.0032482226

    Critical F at α = 0.05 is 3.8853.

About the one-way ANOVA calculator

One-way analysis of variance (ANOVA) tests whether two or more independent groups share the same mean. It splits the total variation into a between-group sum of squares and a within-group sum of squares, divides each by its degrees of freedom (k − 1 and N − k) to get mean squares, and takes their ratio as the F statistic. The p-value is the area of the F distribution beyond that F.

Typical uses are comparing crop yields under three fertilisers, exam scores across teaching methods or response times across product versions. The default data, the NIST e-Handbook example with three groups of five, give F = 9.59 on 2 and 12 degrees of freedom and p = 0.0032, so at α = 0.05 the three means are not all equal.

The test assumes independent observations, roughly normal data in each group and similar group variances. A significant F says that at least one mean differs, not which one.

Worked examples

NIST e-Handbook example, 3 groups of 5 (defaults)

Groups
6.9 5.4 5.8 4.6 4.0 8.3 6.8 7.8 9.2 6.5 8.0 10.5 8.1 6.9 9.3
Significance level α
0.05
Sum of squares between
27.897
Sum of squares within
17.452
F statistic
9.59
df between groups
2
df within groups
12
p-value
0.003248

Checked against: NIST/SEMATECH e-Handbook §7.4.3.3 ANOVA table (SS 27.897 / 17.452, F = 9.59); p = (12/(12 + 2F))⁶ by A&S 26.6.4 in Python

Unequal group sizes

Groups
23 25 21 22 28 30 27 26 29 24 26 25
Significance level α
0.05
F statistic
13.5
df between groups
2
df within groups
9
p-value
0.001953
η² (share of variance explained)
0.75

Checked against: Sums of squares with Python fractions (SSB 62.25, SSW 20.75); A&S 26.6.4 for d₁ = 2 gives p = (9/(9 + 2F))^4.5 = 4^−4.5 = 1/512

Two groups equals the pooled t-test

Groups
12 15 11 14 13 16 17 14 18 16 19 15
Significance level α
0.05
F statistic
7.714286
df within groups
10
p-value
0.019536

Checked against: F = t² for two groups; pooled t from Python fractions, two-sided p from the A&S 26.7.4 closed form with ν = 10

Edge case: identical group means

Groups
1 2 3 2 1 3 3 2 1
Significance level α
0.05
F statistic
0
p-value
1
Decision
Fail to reject H₀

Checked against: Every group mean is 2, so SS between = 0 and F = 0

Questions

What does the p-value in ANOVA mean?

It is the probability of an F statistic at least as large as the one observed if every group mean were equal. With the default data p = 0.0032: equal means would produce F ≥ 9.59 in about 3 samples out of 1,000. It is not the probability that the null hypothesis is true, and a small p-value does not say how large the differences are; η² measures that.

How do you interpret the F statistic?

F is the between-group mean square divided by the within-group mean square. Equal population means give F values near 1; larger values point to real differences. How large is large enough depends on the degrees of freedom: with 2 and 12 df the 5% critical value is 3.885, so F = 9.59 is significant at α = 0.05 and F = 3 would not be.

What are the assumptions of one-way ANOVA?

Independent observations, a roughly normal distribution in each group, and equal population variances. The F test tolerates moderate non-normality when groups are of similar size. Moore and McCabe's rule of thumb accepts the equal-variance assumption if the largest group standard deviation is less than twice the smallest; otherwise use Welch's ANOVA, and for clearly non-normal data the Kruskal–Wallis test.

How do you find which groups differ after ANOVA?

Run a post-hoc test. Tukey's honestly significant difference (HSD) compares every pair while holding the family-wise error rate at α; the Bonferroni method tests each of the m pairs at α/m, which is 0.05/3 ≈ 0.0167 for three groups. Separate t-tests at 0.05 on every pair push the chance of at least one false positive well above 5%, towards 1 − 0.95³ ≈ 14% for three comparisons.

What is a good eta squared value?

η² is the between-group sum of squares divided by the total sum of squares: the share of variation explained by group membership. Cohen (1988) proposed 0.01, 0.06 and 0.14 as small, medium and large effects. The default data give 27.897/45.349 = 0.615, a very large effect. η² overstates the population effect in small samples; ω² corrects for that bias.

How accurate is the one-way ANOVA calculator?

Accuracy depends on your inputs and the method's assumptions. Decimal arithmetic uses 50 significant digits, but estimates, numerical methods and source data can be less precise; the displayed rounding does not remove those limits. It is checked against 4 worked examples whose answers come from independent sources; for example, “NIST e-Handbook example, 3 groups of 5 (defaults)” is checked against NIST/SEMATECH e-Handbook §7.4.3.3 ANOVA table (SS 27.897 / 17.452, F = 9.59); p = (12/(12 + 2F))⁶ by A&S 26.6.4 in Python.

Where does the method come from?

NIST/SEMATECH e-Handbook of Statistical Methods, §7.4.3 Are the means equal? (one-way ANOVA and worked example); Abramowitz & Stegun, Handbook of Mathematical Functions, §26.6 (F distribution).

About this calculator

F=SSB/(k−1)SSW/(N−k),SSB=∑ini(xˉi−xˉ)2,SSW=∑i∑j(xij−xˉi)2F = \frac{SS_B/(k-1)}{SS_W/(N-k)},\quad SS_B = \sum_i n_i(\bar x_i - \bar x)^2,\quad SS_W = \sum_i\sum_j (x_{ij} - \bar x_i)^2

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods, §7.4.3 Are the means equal? (one-way ANOVA and worked example)
  2. Abramowitz & Stegun, Handbook of Mathematical Functions, §26.6 (F distribution)

Checked against references

4 worked examples with independently sourced answers ship with this calculator. They run in the test suite; you can run them here too.

Related calculators

Allow optional Google Analytics to measure page visits? Calculators work either way. Privacy and choices

Optional analytics: off.