ANOVA Calculator
This ANOVA calculator tests whether the means of three or more groups differ by more than random chance. Enter your group data and it returns the F-statistic, degrees of freedom, and p-value. Use a t-test when you compare two groups. Use ANOVA when you have three or more, because running multiple t-tests inflates your chance of a false positive.
Enter values separated by commas, spaces, or new lines. You can paste directly from Excel.
Reject H₀. There is a statistically significant difference between group means (F(2, 12) = 22.587, p = < 0.0001).
| Source | df | SS | MS | F | p-value |
|---|---|---|---|---|---|
| Between groups | 2 | 112.9333 | 56.4667 | 22.5867 | < 0.0001 |
| Within groups | 12 | 30.0000 | 2.5000 | — | — |
| Total | 14 | 142.9333 | — | — | — |
| Group | n | Mean | SD | Min | Max |
|---|---|---|---|---|---|
| Diet A | 5 | 10.0000 | 1.5811 | 8 | 12 |
| Diet B | 5 | 5.6000 | 1.1402 | 4 | 7 |
| Diet C | 5 | 12.2000 | 1.9235 | 10 | 15 |
large effect — η² = 0.7901
Largest difference shown first. For post-hoc pairwise significance testing, use Tukey HSD.
Created by William Davis
Last updated: May 17, 2026
What Is ANOVA and When Do You Need It?
When you have three or more groups and want to know if their averages are genuinely different, a simple eyeball comparison won't cut it. Small differences in means can show up just from random chance, and a t-test calculator only handles two groups at a time. ANOVA, short for Analysis of Variance, solves this. It tests all your groups simultaneously and tells you whether the differences you see are statistically real or just noise.
One-way ANOVA applies when you have one categorical grouping variable (like diet type, treatment method, or geographic region) and one continuous outcome you're measuring (like weight loss, test scores, or revenue). You're asking a single question: does the group a person or item belongs to predict the outcome?
ANOVA tests the null hypothesis that all group means are equal (H₀: μ₁ = μ₂ = ... = μ₉). The alternative is that at least one group mean differs from the others. A significant result tells you that a difference exists, not which specific pairs are different. For that, you'd follow up with a post-hoc test like Tukey HSD.
The ANOVA Formula
The F-statistic is the core output of ANOVA. It's a ratio of two variance estimates:
F = MSB / MSW
Where:
- F = the F-statistic, the value you compare against the critical threshold
- MSB = Mean Square Between groups (how much variance is explained by the group factor)
- MSW = Mean Square Within groups (variance due to random differences inside each group)
To calculate MSB and MSW, you first need the sums of squares:
SSB = Σ nᵢ (x̄ᵢ − x̄)²
SSW = Σᵢ Σⱼ (xᵢⱼ − x̄ᵢ)²
Then divide by degrees of freedom:
- MSB = SSB / (k − 1), where k is the number of groups
- MSW = SSW / (N − k), where N is the total number of observations
Variable key:
- nᵢ = number of observations in group i
- x̄ᵢ = mean of group i
- x̄ = grand mean across all observations
- xᵢⱼ = individual observation j within group i
- k = number of groups
- N = total sample size
A large F means between-group variance is much bigger than within-group variance. That's the signal you're looking for. When F is close to 1, the group differences are no larger than the random scatter you'd expect by chance.
Step-by-Step Example: Comparing Three Diets
A nutritionist wants to know whether three different diets produce different average weight loss after 8 weeks. She recruits 15 participants, 5 per diet group.
Calculate SSB (Between-Group Sum of Squares)
Calculate SSW (Within-Group Sum of Squares)
Compute F-Statistic
Check Significance
At α = 0.05, the critical F-value for df(2, 12) is 3.89. Since 19.93 is well above that threshold, the p-value comes out to approximately 0.0002.
At least one diet produces significantly different weight loss than the others.
η² = SSB / SST = 112.91 / 146.91 = 0.769
That's a large effect. About 77% of the total variation in weight loss is explained by diet type alone.
How to Read Your Results
The calculator gives you several outputs. Here's what each one means practically:
- F-statistic: Higher values mean bigger group differences relative to within-group noise. An F near 1 suggests no meaningful group effect.
- p-value: The probability of observing your F (or larger) if the null hypothesis were true. Below your chosen α means you reject H₀.
- Critical F: The threshold at your α level. If your F exceeds this, the result is significant.
- η² (eta-squared): Effect size, ranging from 0 to 1. Values below 0.01 are negligible, 0.01–0.06 are small, 0.06–0.14 are medium, and anything above 0.14 is large.
- Cohen's f: An alternative effect size. f = 0.10 is small, 0.25 is medium, 0.40 is large.
- Pairwise differences: Ranked list of absolute mean differences between every pair of groups. This guides your post-hoc analysis after a significant result.
A non-significant result doesn't prove the groups are identical. It just means your data doesn't provide enough evidence to reject the null at your chosen threshold. Small sample sizes reduce power and can hide real effects.
How to Use This Calculator
You don't need to set anything up. Just follow these steps:
- Set your significance level. Pick 0.01, 0.05, or 0.10 from the segment control, or type a custom value. Most analyses use 0.05.
- Enter your group data. Each group has its own text area. Type values separated by commas, spaces, or line breaks. You can paste a column directly from Excel or Google Sheets.
- Name your groups. Click the group name field and replace "Group 1" with something descriptive like "Control" or "Treatment A." This makes the output much easier to read.
- Add or remove groups. Click "Add Group" to include more groups (up to 10). Remove any group with the trash icon. You need at least 2 groups with at least 2 values each.
- Read the results. Results update automatically as you type. No submit button. The verdict card, key statistics, ANOVA table, group summary, effect size gauge, and pairwise differences all populate instantly.
Click "Load Example" to see the three-diet scenario above pre-filled, which is a good way to get familiar with the output format before entering your own data.
Assumptions of One-Way ANOVA
ANOVA produces reliable results when your data meets three conditions. Knowing these helps you decide whether ANOVA is the right tool or whether you need an alternative.
Independence: Observations must be independent of each other, both within groups and across them. If the same person or unit appears in multiple groups (like a before/after design), you need a repeated-measures ANOVA instead.
Normality: The data within each group should be roughly normally distributed. With larger samples (n > 30 per group), ANOVA is robust to mild violations of this because of the central limit theorem.
Homogeneity of variance: The variance across groups should be similar. If one group's standard deviation is more than three times another's, consider Welch's ANOVA, which doesn't assume equal variances. Levene's test can formally check this.
When your data is heavily skewed or ordinal and you can't meet these assumptions with small samples, the Kruskal-Wallis test is the nonparametric equivalent of one-way ANOVA.
Frequently Asked Questions
What's the minimum sample size for ANOVA?
The hard minimum is 2 observations per group, but that gives you very little statistical power. Aim for at least 5 per group to get stable variance estimates, and 20+ per group for reliable inference. If you need to determine sample size in advance, a power analysis using your expected effect size and α will give you the target n.
Can I use ANOVA with only two groups?
Yes. With exactly two groups, one-way ANOVA and a two-tailed independent-samples t-test produce identical p-values (F = t²). Use whichever you prefer, though ANOVA scales naturally when you add more groups later.
My result is significant. Which specific groups differ?
ANOVA tells you at least one pair of means is different, but it doesn't identify which pairs. Run a post-hoc test to find out. Tukey HSD is the standard choice for comparing all pairs while controlling the family-wise error rate. The pairwise differences section in this calculator ranks pairs by mean difference, which helps you prioritize where to look.
What if my groups have unequal sample sizes?
Unequal group sizes (called an unbalanced design) are handled correctly by this calculator. The formulas weight each group's contribution by its own n. ANOVA with unequal groups is valid as long as the variance homogeneity assumption still holds. If it doesn't, Welch's ANOVA is the safer option.
Can I test more than one factor with this tool?
This calculator runs one-way ANOVA, which covers a single grouping factor. If you have two categorical factors (like diet type and exercise level) and want to test both their main effects and their interaction, you need two-way ANOVA, which is a separate analysis.
What does a very small p-value actually mean?
A tiny p-value (like 0.0001) means your data would be extremely unlikely if all group means were equal. It's strong evidence against H₀. But statistical significance doesn't equal practical significance. Always check the effect size (η²) to understand how much of the real-world variation the group factor actually explains.