Skip to content

One-Way ANOVA Calculator

Compare 2 to 8 group means: sums of squares, F statistic, p-value, ANOVA table and eta squared.

Your details

Input

One value per observation, separated by spaces, semicolons or new lines.

0.05 means 5 %.

Results update as you type

F statistic

9.5911

p-value
0.0032
Decision at level α
Reject H₀
Degrees of freedom between (k − 1)
2
Degrees of freedom within (N − k)
12
Sum of squares between (SSB)
27.8973
Sum of squares within (SSW)
17.452
Mean square between (MSB)
13.9487
Mean square within (MSW)
1.4543
Critical value F*
3.8853
Effect size η² (eta squared)
0.6152
Effect size ω² (omega squared)
0.5339
Grand mean
7.206667

p = 0.0032 ≤ α = 0.05: at least one group mean differs from the others. A post-hoc test (Tukey, Bonferroni) tells which.

Step-by-step solution
  1. Group 1: n = 5, x̄ = 5.34, s = 1.117139
  2. Group 2: n = 5, x̄ = 7.72, s = 1.103177
  3. Group 3: n = 5, x̄ = 8.56, s = 1.377679
  4. x̄ = Σnᵢx̄ᵢ / N = 7.206667 (N = 15)
  5. SSB = Σ nᵢ(x̄ᵢ − x̄)² = 27.897333 ; SSW = Σ (nᵢ − 1)sᵢ² = 17.452
  6. MSB = 27.897333 / 2 = 13.948667 ; MSW = 17.452 / 12 = 1.454333
  7. F = MSB / MSW = 9.5911 ; p = P(F(2, 12) ≥ 9.5911) = 0.0032

ANOVA table

Analysis of variance (ANOVA) answers one question: are the means of several groups all equal, or does at least one of them differ by more than chance would explain? Running a t-test on every pair of groups inflates the risk of a false alarm — with five groups there are ten pairs, and the chance of at least one spurious "significant" result at 5 % climbs to about 40 %. One-way ANOVA tests all groups at once with a single F test.

The idea, due to Ronald Fisher, is to split the total variability of the data into two parts: the spread between the group means and the spread within each group. If the groups truly share one mean, both parts estimate the same background noise and their ratio, FF, stays near 1. A large FF means the group means are further apart than the noise inside the groups can explain.

Enter 2 to 8 groups either as raw data or as summary statistics (size, mean, standard deviation). The calculator returns the full ANOVA table — sums of squares, degrees of freedom, mean squares — with the FF statistic, its exact p-value from the F distribution, the critical value at your significance level, and two effect sizes, eta squared (η2\eta^2) and omega squared (ω2\omega^2).

How to use this calculator

  1. Choose Raw data or Summary (n, mean, SD).
  2. Raw data: pick the number of groups and type the observations of each group, separated by spaces or new lines. Groups may have different sizes.
  3. Summary: enter one row per group with its size, mean and sample standard deviation (divisor n−1n - 1). Add rows for up to 8 groups.
  4. Set the significance level α (0.05 by default).
  5. Read FF, the p-value and the decision. The table under the result is the standard ANOVA table, and the steps show each intermediate quantity.

The formula

With kk groups, group sizes nin_i, group means xˉi\bar x_i, sample standard deviations sis_i, total size N=∑niN = \sum n_i and grand mean xˉ=∑nixˉi/N\bar x = \sum n_i \bar x_i / N:

SSB=∑i=1kni(xˉi−xˉ)2SSW=∑i=1k(ni−1)si2SST=SSB+SSWSS_B = \sum_{i=1}^{k} n_i(\bar x_i - \bar x)^2 \qquad SS_W = \sum_{i=1}^{k} (n_i - 1)s_i^2 \qquad SS_T = SS_B + SS_W
MSB=SSBk−1MSW=SSWN−kF=MSBMSWMS_B = \frac{SS_B}{k - 1} \qquad MS_W = \frac{SS_W}{N - k} \qquad F = \frac{MS_B}{MS_W}

Under H0H_0 (all population means equal) FF follows an F distribution with k−1k - 1 and N−kN - k degrees of freedom. The p-value is the upper tail P(Fk−1, N−k≥F)P(F_{k-1,\,N-k} \ge F), computed with the regularized incomplete beta function: P=I(N−k)/((N−k)+(k−1)F)(N−k2,k−12)P = I_{(N-k)/((N-k) + (k-1)F)}\big(\tfrac{N-k}{2}, \tfrac{k-1}{2}\big).

Effect sizes: η2=SSB/SST\eta^2 = SS_B / SS_T (share of the total variation explained by the groups) and ω2=SSB−(k−1)MSWSST+MSW\omega^2 = \dfrac{SS_B - (k-1)MS_W}{SS_T + MS_W}, a less biased estimate for the population.

Worked example

NIST example (the raw-data default): three treatment levels with five observations each. The group means are 5.34, 7.72 and 8.56, and the grand mean is 7.2067.

  • SSB=5(5.34−7.2067)2+5(7.72−7.2067)2+5(8.56−7.2067)2=27.897SS_B = 5(5.34 - 7.2067)^2 + 5(7.72 - 7.2067)^2 + 5(8.56 - 7.2067)^2 = 27.897
  • SSW=17.452SS_W = 17.452 (sum of the squared deviations inside each group)
  • MSB=27.897/2=13.949MS_B = 27.897 / 2 = 13.949 and MSW=17.452/12=1.454MS_W = 17.452 / 12 = 1.454
  • F=13.949/1.454=9.59F = 13.949 / 1.454 = 9.59 with 2 and 12 degrees of freedom

The p-value is 0.0032, far below 0.05 (the critical value is $F^* = 3.89$), so the treatment means are not all equal. η2=0.615\eta^2 = 0.615: the treatments explain about 62 % of the variation.

Summary-statistics default (OpenStax Example 13.4, bean plants grown in three media, n = 5 each, means 24.2, 25.4 and 24.4): F=0.134F = 0.134, p = 0.876. The differences between media are well within the noise.

Reading the ANOVA table

Source SS df MS F
Between groups SSBSS_B k−1k - 1 SSB/(k−1)SS_B/(k-1) MSB/MSWMS_B/MS_W
Within groups SSWSS_W N−kN - k SSW/(N−k)SS_W/(N-k)
Total SSTSS_T N−1N - 1

The within mean square MSWMS_W is the pooled variance of the groups: it estimates the noise whether or not H0H_0 is true. The between mean square only estimates that same noise when the population means are equal; real differences between means inflate it. The degrees of freedom add up (k−1+N−k=N−1k - 1 + N - k = N - 1), and so do the sums of squares. To check the degrees of freedom on their own, see the degrees of freedom calculator.

Assumptions and what to do next

One-way ANOVA assumes independent observations, roughly normal data within each group and similar variances across groups. It is fairly robust to mild non-normality, especially with equal group sizes; a common rule of thumb tolerates a largest-to-smallest standard deviation ratio up to about 2. With very unequal variances, Welch's ANOVA is safer; with strongly skewed small samples, the Kruskal–Wallis test is the usual non-parametric alternative.

A significant F only says that some difference exists. To find which groups differ, run a post-hoc procedure such as Tukey's HSD or pairwise t-tests with a Bonferroni correction. With exactly two groups, one-way ANOVA is equivalent to the pooled two-sample t-test: F=t2F = t^2 and the p-values are identical.

Frequently asked questions

What does the F statistic mean in ANOVA?

F is the ratio of the variance between group means to the variance within groups. Values near 1 are what chance alone produces; the larger F is, the stronger the evidence that the group means differ.

Why not just run several t-tests?

Each test carries its own risk of a false positive, and the risks add up. ANOVA tests all means in one step at the chosen α, then post-hoc tests with adjusted thresholds locate the differences.

Can the groups have different sizes?

Yes. The formulas weight each group by its size. Balanced designs are more robust to unequal variances, but unbalanced data are handled exactly.

What is a good eta squared?

Cohen’s rough benchmarks are 0.01 small, 0.06 medium and 0.14 large. Eta squared overstates the population effect in small samples; omega squared corrects for that bias.

Can I use summary statistics instead of raw data?

Yes. One-way ANOVA only needs each group’s size, mean and sample standard deviation, so results from a paper or report can be re-analysed directly.

Sources

Last updated:

More Statistics calculators

People also use