An ANOVA calculator runs a one-way analysis of variance to see whether the means of three or more groups differ. Enter the values of each group on its own line, and you get the sums of squares between and within the groups, the degrees of freedom, the F statistic, the p-value and the critical value. You can also turn an F statistic into a p-value, or compare two variances with an F-test. It runs in your browser.
How to use the ANOVA calculator
- Choose one-way ANOVA, p-value of F or two variances.
- Enter the groups, one per line, or the F statistic and its degrees of freedom.
- Press Calculate.
The formulas
The Wikipedia article on one-way analysis of variance gives the F ratio as F = MSB ÷ MSW, the mean square between groups divided by the mean square within groups, where each mean square is a sum of squares divided by its degrees of freedom.[1] The sum of squares between groups adds, for every group, the size of the group times the squared gap between the group mean and the grand mean. The sum of squares within groups adds the squared gaps of all the values from their own group means. The degrees of freedom are k − 1 between the k groups and N − k within.[2] The calculator works all of these out.
The worked example from the page
The page's example has three groups of six values: 6, 8, 4, 5, 3 and 4 with a mean of 5; 8, 12, 9, 11, 6 and 8 with a mean of 9; and 13, 9, 11, 8, 7 and 12 with a mean of 10. The grand mean is 8. The sum of squares between the groups is 84 with 2 degrees of freedom, so the mean square is 42. The sum of squares within the groups is 68 with 15 degrees of freedom, so the mean square is about 4.5. The F ratio is about 9.3, the critical value of F for 2 and 15 degrees of freedom at the 5 percent level is 3.68, and the result is significant, with a p-value of 0.002.[1] Paste the three lines into the calculator and it gives F = 9.265, a critical value of 3.682 and a p-value of about 0.002.
The assumptions
The pages state that the observations are independent, that the residuals are normally distributed or nearly so, and that the groups have equal variances, which is called homoscedasticity.[2] The one-way article says that the method is relatively robust to departures from normality, that a generalization of Welch's t-test can be used if the variances are not known to be equal, and that the Kruskal–Wallis test is the choice for ordinal data.[1] Check these before you rely on the p-value.
Two groups: F and t
With only two groups, the F test is the same as the t-test. The article states that F = t², and that the two tests are equivalent when there are two means.[1] For the values 1, 2, 3 and 4, 5, 6, the calculator gives F = 13.5, which is the square of the t statistic of 3.67 for the same data. For three or more groups, ANOVA avoids the extra false positives that come from running many t-tests.
What a significant result means
A p-value below your level says that at least one group mean differs from the others. It does not say which one. A post-hoc test, such as Tukey's, compares the pairs of groups. The calculator also shows η², the share of the total variation that lies between the groups, which is the sum of squares between divided by the total. This is our own addition. For the page's example it is 84 ÷ 152, which is about 55 percent.
The p-value of an F statistic
If you already have an F statistic, for example from a report, enter it with its two degrees of freedom to get the p-value, which is the upper tail of the F distribution, and the critical value for your significance level. The one-way page notes that a computer is normally used to find the p-value from F.[1] With F = 9.2647 and 2 and 15 degrees of freedom, the p-value is about 0.002.
Comparing two variances
The third mode divides one sample variance by another and gives the F statistic with n₁ − 1 and n₂ − 1 degrees of freedom, with the upper-tail and two-tailed p-values. The pages that we read do not describe this test, so it comes from the standard theory and is shown as an extra. For variances of 2.5 and 1 with 11 values each, F = 2.5 and the upper-tail p-value is about 0.08.
Entering your data
Type each group on one line, with its values separated by spaces or commas, and use as many groups as you have, up to 50. Groups may have different sizes. Every value counts as one observation. If your data is in a spreadsheet, copy a row for each group and paste it in. Check that no value is missing or typed as text.
Common mistakes
- Running many t-tests. Use ANOVA for three or more groups.
- Reading F as which group differs. Use a post-hoc test.
- Ignoring unequal variances. Use Welch's version if they differ.
- Entering a group on two lines. Each line is one group.
What next
Use this often? Add ANOVA to your Home screen.
Frequently asked questions
What is an ANOVA calculator?
A tool that runs a one-way analysis of variance to test whether the means of several groups differ, giving the F statistic and p-value.
How is the F statistic calculated?
F = MSB ÷ MSW, the mean square between groups divided by the mean square within groups.
What does a significant ANOVA mean?
That at least one group mean differs from the others. It does not say which, so use a post-hoc test.
What are the degrees of freedom?
k − 1 between the k groups and N − k within, where N is the total number of values.
How is ANOVA related to the t-test?
For two groups, F = t² and the two tests give the same p-value.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.