How do I run a one-way ANOVA?
Enter the values of each group. The ANOVA calculator builds the one-way ANOVA table (sums of squares, degrees of freedom and mean squares) and tests whether the group means are equal with the F statistic and its p-value.
- F statistic
- 9.59111
F(2, 12) = 9.59111, p = 0.00324822.
- p-value
- 0.00324822
- Decision
- Reject equal means: p < α = 5%
- Critical F
- 3.88529
- Sum of squares between (SST)
- 27.897333
- Sum of squares within (SSE)
- 17.452
- Total sum of squares
- 45.349333
- df between
- 2
- df within
- 12
- Mean square between (MST)
- 13.948667
- Mean square within (MSE)
- 1.454333
- Group means
- Group 1: 5.34; Group 2: 7.72; Group 3: 8.56
- Grand mean
- 7.206667
- Groups (k)
- 3
- Values (N)
- 15
F statistic: 9.59111. F(2, 12) = 9.59111, p = 0.00324822.
How to calculate
Runs a one-way ANOVA on 2 to 6 groups of numbers: the sums of squares, degrees of freedom, mean squares, F statistic, p-value and the critical F at your significance level.
Example with the default inputs (Group 1 [6.9, 5.4, 5.8, 4.6, 4], Group 2 [8.3, 6.8, 7.8, 9.2, 6.5], Group 3 [8, 10.5, 8.1, 6.9, 9.3], Significance level (α) 5%): F(2, 12) = 9.59111, p = 0.00324822.
Method: F = [SST ÷ (k − 1)] ÷ [SSE ÷ (N − k)]; p = P(F(k − 1, N − k) ≥ F).
- The groups are independent random samples from normal populations with the same variance.
- Empty groups are left out; ANOVA needs at least 2 groups and more values than groups.
- The test asks whether all group means are equal; it does not say which ones differ.
Worked examples
Each example is checked against the calculator on every build.
- Group 1 6.9, 5.4, 5.8, 4.6, 4, Group 2 8.3, 6.8, 7.8, 9.2, 6.5, Group 3 8, 10.5, 8.1, 6.9, 9.3, Significance level (α) 5% gives F statistic 9.591107, p-value 0.003248, Critical F 3.885294, Sum of squares between (SST) 27.897333, Sum of squares within (SSE) 17.452, df between 2, df within 12.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.4.3.3 The ANOVA table and tests of hypotheses about means (resistor data at three temperatures: SST 27.897, SSE 17.452, df 2 and 12, F = 9.59, p = 0.00325), https://www.itl.nist.gov/div898/handbook/prc/section4/prc433.htm (retrieved 2026-10-02); NIST/SEMATECH e-Handbook of Statistical Methods, §7.4.3.4 One-way ANOVA calculations (SST = Σ Tᵢ² ÷ nᵢ − CM, SSE = SS(Total) − SST, MST = SST ÷ (k − 1), MSE = SSE ÷ (N − k), F = MST ÷ MSE), https://www.itl.nist.gov/div898/handbook/prc/section4/prc434.htm (retrieved 2026-10-02)
- Group 1 6.9, 5.4, 5.8, 4.6, 4, Group 2 8.3, 6.8, 7.8, 9.2, 6.5, Group 3 8, 10.5, 8.1, 6.9, 9.3, Significance level (α) 5% gives F statistic 9.59, p-value 0.00325, Critical F 3.89.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.4.3.3 The ANOVA table and tests of hypotheses about means (resistor data at three temperatures: SST 27.897, SSE 17.452, df 2 and 12, F = 9.59, p = 0.00325), https://www.itl.nist.gov/div898/handbook/prc/section4/prc433.htm (retrieved 2026-10-02) (rounded to 3 significant digits, so tolerance 2e-3)
- Group 1 1, 2, 3, Group 2 4, 5, 6, Significance level (α) 5% gives F statistic 13.5, p-value 0.021312, Sum of squares between (SST) 13.5, Sum of squares within (SSE) 4, Mean square within (MSE) 1, df between 1, df within 4, Group means Group 1: 2; Group 2: 5, Grand mean 3.5.Source: NIST/SEMATECH e-Handbook of Statistical Methods, §7.4.3.4 One-way ANOVA calculations (SST = Σ Tᵢ² ÷ nᵢ − CM, SSE = SS(Total) − SST, MST = SST ÷ (k − 1), MSE = SSE ÷ (N − k), F = MST ÷ MSE), https://www.itl.nist.gov/div898/handbook/prc/section4/prc434.htm (retrieved 2026-10-02)
How it works
For k groups, where group i has nᵢ values with mean x̄ᵢ, N = n₁ + … + nₖ values in all and grand mean x̄:
- Sum of squares between (treatments) SST = Σ nᵢ (x̄ᵢ − x̄)²
- Sum of squares within (error) SSE = Σᵢ Σⱼ (xᵢⱼ − x̄ᵢ)²
- Total = SST + SSE = Σ (xᵢⱼ − x̄)²
- Degrees of freedom: k − 1 between, N − k within
- Mean squares: MST = SST ÷ (k − 1), MSE = SSE ÷ (N − k)
- F = MST ÷ MSE
- p-value = the upper-tail area of the F distribution with k − 1 and N − k degrees of freedom beyond F
- Critical F = the F value whose upper-tail area is α; reject equal means when p < α
The sums of squares use the deviations from each mean (two passes), not the shortcut Σx² − CM, which loses digits. All values are first divided by a power of two near the largest |x|, which changes no digit, so squares of very large or very small values do not overflow; F does not depend on that scale.
Rules
- Groups 1 and 2 need at least one value each; groups 3 to 6 are optional, and empty ones are left out. Each group holds up to 1,000 values.
- There must be more values than groups (N > k).
- When every value equals its group mean (SSE = 0), F is not defined and there is no answer.
- α is from 0.001% to 50% (default 5%).
- A sum of squares or mean square past the double range is left out; F and p are still shown.
Output format. F, p and the critical F to 6 significant digits. Group means read "Group 1: 5.34; Group 2: 7.72", numbered as typed (an empty group 3 leaves "Group 1 …; Group 2 …; Group 4 …"), each to 6 significant digits with a true minus sign. The decision reads "Reject equal means: p < α = 5%" or "Do not reject equal means: p ≥ α = 5%".
Worked examples by hand
NIST’s resistor data. Group 1: 6.9, 5.4, 5.8, 4.6, 4.0 (mean 5.34); group 2: 8.3, 6.8, 7.8, 9.2, 6.5 (mean 7.72); group 3: 8.0, 10.5, 8.1, 6.9, 9.3 (mean 8.56). Grand mean 108.1 ÷ 15 = 7.206667. SST = 5 × (1.866667² + 0.513333² + 1.353333²) = 27.897333; SSE = 4.992 + 4.868 + 7.592 = 17.452. MST = 27.897333 ÷ 2 = 13.948667; MSE = 17.452 ÷ 12 = 1.454333. F = 9.5911, p = 0.00325 with 2 and 12 degrees of freedom; the critical F at 5% is 3.885, so reject equal means.
1, 2, 3 against 4, 5, 6. Means 2 and 5, grand mean 3.5. SST = 3 × 1.5² + 3 × 1.5² = 13.5; SSE = (1 + 0 + 1) + (1 + 0 + 1) = 4. With 1 and 4 degrees of freedom, MST = 13.5, MSE = 1, so F = 13.5.
Other questions people ask
What does a one-way ANOVA test?
Whether the means of two or more groups are all equal. It compares the variation between the group means with the variation within the groups. A large F, and a small p-value, says that at least one mean differs.
How is the F statistic calculated?
F = MST ÷ MSE. MST is the between-group sum of squares divided by k − 1, and MSE is the within-group sum of squares divided by N − k, for k groups and N values in all.
How do I read the p-value?
It is the chance of an F at least this large if all the means were equal. When it is below your significance level α (often 5%), reject equal means. For NIST’s resistor data, F = 9.59 and p = 0.00325, so the three temperatures differ.
What are the degrees of freedom in ANOVA?
Between groups: k − 1. Within groups: N − k. Total: N − 1. With 3 groups of 5 values, that is 2, 12 and 14.
Can the groups have different sizes?
Yes. Each group mean is weighted by its size in the between-group sum of squares. The test is most robust to unequal variances when the groups are about the same size.
Does ANOVA tell me which groups differ?
No. A significant F says that not all means are equal. To find which pairs differ, follow up with a multiple-comparison method, such as Tukey’s, or with planned contrasts.
What are the assumptions of ANOVA?
Independent random samples, each from a normal population, with equal variances. With two groups, the one-way ANOVA F equals the square of the pooled two-sample t statistic.