ANOVA Calculator (One-Way)
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Compare the means of two to four groups. Enter each group's size, mean and sample standard deviation; leave the size at 0 for an unused group.
Result
P-value
Grand mean
- Sum of squares between groups (SSB)
- Sum of squares within groups (SSW)
- Degrees of freedom between (k − 1)
- Degrees of freedom within (N − k)
- Mean square between (MSB)
- Mean square within (MSW)
- F statistic
- Eta squared (η², share of variance between groups)
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Group 1 size (n): enter 0 or more.
- Group 1 mean: enter a number.
- Group 1 standard deviation (sample): enter 0 or more.
- Group 2 size (n): enter 0 or more.
- Group 2 mean: enter a number.
- Group 2 standard deviation (sample): enter 0 or more.
- Group 3 size (n, 0 if unused): enter 0 or more.
- Group 3 mean: enter a number.
- Group 3 standard deviation (sample): enter 0 or more.
- Group 4 size (n, 0 if unused): enter 0 or more. Optional, under “Group 4”.
- Group 4 mean: enter a number. Optional, under “Group 4”.
- Group 4 standard deviation (sample): enter 0 or more. Optional, under “Group 4”.
- Read the result: P-value; the panel also shows Grand mean, Sum of squares between groups (SSB), Sum of squares within groups (SSW), Degrees of freedom between (k − 1), Degrees of freedom within (N − k), Mean square between (MSB), Mean square within (MSW), F statistic and Eta squared (η², share of variance between groups).
How this calculator works
One-way analysis of variance (Fisher): grand mean = Σ nᵢ x̄ᵢ ÷ N; SSB = Σ nᵢ (x̄ᵢ − grand mean)²; SSW = Σ (nᵢ − 1) sᵢ², where sᵢ is the sample standard deviation of group i.
MSB = SSB ÷ (k − 1), MSW = SSW ÷ (N − k), F = MSB ÷ MSW, with k groups and N observations in all. The p-value is the right tail of the F distribution with (k − 1, N − k) degrees of freedom, computed with the regularized incomplete beta function.
Eta squared = SSB ÷ (SSB + SSW). The test assumes independent observations, roughly normal data in each group and similar variances. A small p-value says at least one mean differs, not which one: follow up with a post-hoc test such as Tukey's.
Worked example
| Group 1 size (n) | 10 |
|---|---|
| Group 1 mean | 24.5 |
| Group 1 standard deviation (sample) | 3.2 |
| Group 2 size (n) | 10 |
| Group 2 mean | 27.1 |
| Group 2 standard deviation (sample) | 2.9 |
| Group 3 size (n, 0 if unused) | 10 |
| Group 3 mean | 22.8 |
| Group 3 standard deviation (sample) | 3.5 |
| Group 4 size (n, 0 if unused) | 0 |
| Group 4 mean | 0 |
| Group 4 standard deviation (sample) | 0 |
| Grand mean | 24.8 |
|---|---|
| Sum of squares between groups (SSB) | 93.8 |
| Sum of squares within groups (SSW) | 278.1 |
| Degrees of freedom between (k − 1) | 2 |
| Degrees of freedom within (N − k) | 27 |
| Mean square between (MSB) | 46.9 |
| Mean square within (MSW) | 10.3 |
| F statistic | 4.5534 |
| P-value | 0.0198 |
| Eta squared (η², share of variance between groups) | 0.2522 |
Frequently asked questions
Can I use ANOVA for two groups?
Yes. With two groups, F equals the square of the pooled two-sample t statistic and the p-values match.
What is a two-way ANOVA?
It tests two factors and their interaction at once and needs the raw data of every cell. This calculator handles one factor from group summaries.
What if the variances are very different?
Welch's ANOVA is more reliable in that case; this calculator uses the classic F test that pools the variances.