How to use the ANOVA calculator
- Enter each group on its own line, starting with a name and a colon if you like, or choose “Groups in columns” and paste columns from a spreadsheet with their names in the first row.
- If you only have each group’s size, mean and standard deviation, choose “Summary stats” and enter one group per line.
- The F test, ANOVA table, chart, Tukey comparisons and steps update as you type. Change α to test at another level.
What one-way ANOVA tests
One-way analysis of variance (ANOVA) asks whether the means of several independent groups are all the same. In OpenStax’s words, “The null hypothesis is simply that all the group population means are the same. The alternative hypothesis is that at least one pair of means is different.” “One-way” means there is a single factor, such as the treatment, the brand or the class, that splits the values into groups.
Why not run a t test on every pair? With four groups there are six pairs, and each test at α = 0.05 has its own 5% chance of a false alarm. Together, the chance that at least one of them goes off by luck is far above 5%: about 1 − 0.95⁶ ≈ 26% if the tests were independent. ANOVA answers the overall question with a single test at the level you choose.
The ANOVA table
ANOVA splits the total variation into two parts. The between-groups sum of squares measures how far the group means sit from the grand mean, and the within-groups sum of squares measures the spread of the values around their own group mean. Dividing each by its degrees of freedom (k − 1 between groups and N − k within, for k groups and N values) gives two mean squares, and F is their ratio. NIST’s handbook explains why that works: when the null hypothesis is true, “the two mean squares estimate the same quantity (error variance), and should be of approximately equal magnitude. In other words, their ratio should be close to 1.” The p-value is the area to the right of F under the F distribution.
A worked example
The starting data come from the NIST/SEMATECH e-Handbook of Statistical Methods: four treatments, each replicated five times. The group means are 5.34, 7.72, 8.56 and 5.5, and the grand mean is 6.78. The between-groups sum of squares is 5 × ((5.34 − 6.78)² + (7.72 − 6.78)² + (8.56 − 6.78)² + (5.5 − 6.78)²) = 38.82, and the within-groups sum of squares is 21.292. So the mean squares are 12.94 on 3 degrees of freedom and 1.331 on 16, and F = 9.724, which matches NIST’s table. The p-value is 0.0006845, so at the 5% level the four treatment means are not all equal.
Not every set of groups differs. OpenStax’s example of mean grades in four sororities, with five members sampled from each, gives F(3, 16) = 2.23, p = 0.1241. At the 1% level they used, or at 5%, there is no evidence of a difference. Paste their numbers to see it.
Which groups differ: Tukey’s HSD
A significant F says that at least two means differ, but not which. Tukey’s honestly significant difference (HSD) method compares every pair at once. NIST describes it as applying “simultaneously to the set of all pairwise comparisons,” with a confidence coefficient of exactly 1 − α when the groups are the same size. Each interval is the difference in means ± q × √(MS within / n), where q comes from the studentized range distribution; here q = 4.0461 for 4 means and 16 degrees of freedom.
For the NIST data, the interval for μ₂ − μ₁ runs from 0.29 to 4.47, as in the handbook, so treatment 2 has the higher mean. The intervals for μ₁ − μ₄ (−2.25 to 1.93) and μ₂ − μ₃ (−2.93 to 1.25) include 0, so those pairs aren’t significantly different, and the other four pairs are. When the groups have different sizes, the calculator uses the Tukey–Kramer version, which works out the standard error for each pair; NIST notes the method is then conservative.
Assumptions
OpenStax lists five basic assumptions: “Each population from which a sample is taken is assumed to be normal. All samples are randomly selected and independent. The populations are assumed to have equal standard deviations (or variances). The factor is a categorical variable. The response is a numerical variable.” With small groups, look at each group for strong skew or outliers before trusting the p-value.
When the spreads differ: Welch’s ANOVA
If the groups look unequally spread, check the equal-variance assumption. The calculator does it with Levene’s test in the form NIST recommends, based on each value’s distance from its group median, which NIST says “provides good robustness against many types of non-normal data while retaining good power.” This median version is often called the Brown–Forsythe test. It also reports Welch’s ANOVA, which weights each group by n / s² and doesn’t assume equal variances. For the NIST data, Welch’s F is 8.073 (df 3 and 8.8374), p = 0.006672.
Effect size
With large groups, even tiny differences in means become significant, so it helps to know how large the effect is. Eta squared, η² = SS between / SS total, is the share of all the variation that lies between the groups: 0.6458 for the NIST data. Omega squared, ω² = (SS between − (k − 1) × MS within) / (SS total + MS within), first takes away (k − 1) × MS within, the between-groups variation you would expect from chance alone, so it is a little smaller: 0.5668 here.
ANOVA from means and standard deviations
Published papers often give only each group’s size, mean and standard deviation. That is enough for the whole F test, because the within-groups sum of squares is Σ (nᵢ − 1)sᵢ², and also for Welch’s ANOVA and Tukey’s comparisons. Choose “Summary stats” and enter one group per line. Only the Brown–Forsythe check needs the individual values.
In Excel or R
In Excel, the Analysis ToolPak’s “Anova: Single Factor” tool performs, in Microsoft’s words, “a simple analysis of variance on data for two or more samples,” but it doesn’t compare the pairs. In R, aov fits the model, summary shows the ANOVA table, TukeyHSD compares the pairs and oneway.test runs Welch’s ANOVA. The calculator writes the exact R code for your raw data under the result.
Your data stays on your device
Everything is worked out in your browser. Nothing you type or paste is sent anywhere or stored.
Frequently asked questions
How do I paste groups from Excel or Google Sheets?
Choose “Groups in columns”, select your columns with their names in the first row, copy them and paste into the box. Empty cells are skipped, so the groups can have different sizes.
Can I use means and standard deviations instead of raw data?
Yes. Choose “Summary stats” and enter one group per line: a name if you like, then the group size, mean and standard deviation. The F test, Welch’s test and Tukey comparisons are exactly the same; only the Brown–Forsythe check needs the raw values.
The F test is significant. Which groups differ?
A significant F only says that at least two means differ. The Tukey table compares every pair while keeping the overall error rate at α, and the pairs in bold are the ones that differ.
Can I run ANOVA on just two groups?
Yes. With two groups, one-way ANOVA gives the same p-value as the pooled two-sample t test, and F is the square of t.
What if the groups have different spreads?
Look at Welch’s F, which doesn’t assume equal variances. The calculator also runs the Brown–Forsythe test on raw data and points to Welch’s result when the variances look different.
Is my data uploaded?
No. Everything is worked out in your browser and nothing you type is sent anywhere or stored.