gizmobench

One-Way ANOVA Calculator

Most ANOVA calculators print an F and a p and hide the arithmetic that produced them. This one prints the table. The groups 5, 6, 7 and 8, 9, 10 and 11, 12, 13 have means of 6, 9 and 12 around a grand mean of 9, which gives 54 between groups on 2 degrees of freedom, 6 within on 6, a total of 60 on 8, mean squares of 27.0 and 1.0, F 27.00 and p = 0.001000, and every one of those numbers is on screen where it can be checked line by line. The sums of squares are exact: your digits are read as the decimals you typed rather than as the nearest double, and the table is built in whole-number arithmetic, so between plus within is the total to the last digit. Three groups a billion away from zero still come out at 0.54, 0.06 and 0.6, where the textbook shortcut in doubles returns a within-group sum of squares of -1024, which a sum of squares cannot be. The p-value is the upper tail of the F distribution, computed directly rather than as one minus a cumulative, and measured against an 80-digit reference to within 1e-12 across 11,880 combinations of degrees of freedom and F, so a far tail such as 1.4922e-200 keeps its digits instead of collapsing to 0.

3 groupsIndependentF test
A   5  6  7   mean  6
B   8  9 10   mean  9
C  11 12 13   mean 12
        grand mean  9

source   SS  df    MS      F
between  54   2  27.0  27.00
within    6   6   1.0
total    60   8

p = 0.001000
assumes independent groups and equal variances
F
27.00
df
2 and 6
p
0.001000
Groups
3

9 values in 3 groups, 2 and 6 degrees of freedom. The mean squares are 27.0 between and 1.0 within.

The sums of squares are exact: your values are read as the decimals you typed rather than as the nearest double, and the table is built in whole-number arithmetic, so between (54) plus within (6) is the total (60) to the last digit. The p-value is the upper tail of the F distribution on 2 and 6 degrees of freedom, evaluated directly rather than as one minus a cumulative, and measured against an 80-digit reference to within 1e-12. The design is balanced: 3 values in each of the 3 groups. Eta squared is 0.9, the between-group share of the total sum of squares. It describes this sample and estimates nothing about a population. The table reads your groups as independent samples of one measurement each, and the F ratio assumes similar spread in every group. It runs no post-hoc test, so it names no pair of groups.

Your groups

One group per line. A line may start with a name and a colon, as in Control: 5 6 7, and lines may be different lengths: unequal group sizes are ordinary here.

Layout
Values can be separated by spaces, commas or tabs. Nothing you type leaves the browser.

Group summary

The count, the mean, the sample standard deviation and the sum of squares inside each group. The means and the sums of squares are exact; the standard deviation is the square root of an exact variance.

GroupnMeanSDSum of squares
A3612
B3912
C31212

Worked cases

The three data sets this page was built against. Every figure here is computed by the same code as the answer above, so the cases and the tool can never disagree.

  • [1,2,3] against [4,5,6]two groups
    F 13.50, df 1 and 4, p = 0.021312
  • The three groups aboveone-way ANOVA
    F 27.00, df 2 and 6, p = 0.001000
  • Every value identicalno variation within groups
    F undefined, said so, not reported as 0
Accuracy. The ANOVA table is exact arithmetic on the groups you paste, and every sum of squares is printed, so between plus within adds to the total on screen and you can check it. The p-value is the upper tail of the F distribution at the stated degrees of freedom. The classical assumptions of independent groups and equal variances are named beside the table. It runs no post-hoc test and draws no conclusion about which group differs.

Common questions

How do you calculate a one-way ANOVA?
Take each group's mean, then the grand mean of everything. The between-group sum of squares adds up each group's size times the squared distance from its mean to the grand mean, and the within-group sum of squares adds up the squared distance from every value to its own group mean. For 5, 6, 7 and 8, 9, 10 and 11, 12, 13 the means are 6, 9 and 12 around a grand mean of 9, which gives 54 between on 2 degrees of freedom, 6 within on 6 and a total of 60 on 8. Dividing each sum of squares by its own degrees of freedom gives mean squares of 27.0 and 1.0, their ratio is F 27.00, and the p-value at those degrees of freedom is 0.001000. All of it is on the stage, so the working can be checked instead of taken on trust.
What are df1 and df2 in an ANOVA table?
df1 is the number of groups minus 1 and df2 is the number of values minus the number of groups, so three groups of three values give 2 and 6, which add up to 8, one less than the nine values. The F ratio needs both, because it compares the between-group mean square on df1 with the within-group mean square on df2, and the same F means different things on different pairs. This page prints both beside F, and it refuses rather than answering when df2 would be 0, which is what happens when every group holds a single value.
What does the p-value from an ANOVA mean?
It is the probability of an F ratio at least as large as yours when the groups are samples from populations with the same mean. It describes these values against that model, and nothing else. This page prints the number and stops there: it sets no cut-off, passes no verdict, and offers no reading of what the number means for your study.
Can I use it for only two groups?
Yes. The groups 1, 2, 3 against 4, 5, 6 give 13.5 between on 1 degree of freedom, 4 within on 4, F 13.50 and p = 0.021312. With two groups the F ratio is the square of the two-sample t statistic computed on the same data with a pooled variance, and the p-value is the same one, so this agrees with a pooled t-test rather than competing with it.
Can the groups have different numbers of values?
Yes. One-way ANOVA takes unequal group sizes as they are, and each group enters the between-group sum of squares weighted by its own size. The groups 2 and 4 against 3, 5 and 7 have a grand mean of 4.2, 4.8 between on 1 degree of freedom, 10 within on 3, F 1.44 and p = 0.316262. In the rows layout a line is a group, so lines of different lengths are ordinary. In the columns layout a short column is simply a smaller group, and an empty cell is a gap rather than a zero.
Why does it say F is undefined?
Because the within-group mean square is 0 and F would divide by it. Groups of 0.1, 0.1, 0.1 and 0.7, 0.7, 0.7 have no variation inside them at all, so the within-group sum of squares is exactly 0: the page says undefined, still prints the between-group sum of squares of 0.54, and reports no p-value. Run the same six values through the textbook shortcut in doubles and the within-group sum of squares comes out at about 2e-16 rather than 0, which turns into an F of about 1e16. The arithmetic here is exact, so a zero is a zero and the page can say so.
Which group is the different one?
This page does not answer that, and neither does the F ratio: F is one number for the whole comparison. Naming a pair needs a post-hoc procedure, which is a separate decision with its own assumptions, and none is run here. What the page does give you is the group summary under the table, with the count, the mean, the sample standard deviation and the sum of squares for each group, which is where a difference shows itself.
Does this assume equal variances?
Yes. The classical F ratio pools the within-group variation into a single mean square, which assumes the groups have a similar spread, and it assumes the observations are independent of one another. Both assumptions are printed under the table rather than left implicit, and the group summary prints each group's standard deviation so you can see how far apart the spreads are. The page computes that classical test only: it does not compute the Welch variant, and it makes no repeated-measures adjustment.
How much data can I paste?
Up to 10,000 values in up to 100 groups. More than that is refused with both numbers rather than trimmed to fit, so you always know what was read. The stage shows the first ten values of each group and says when it is showing part, while the Copy button carries every value, the whole table and the assumptions. Nothing you paste leaves the browser.
How do I paste a table out of a spreadsheet?
Switch the layout to columns and paste. A first row of text is read as the group names, cells can be separated by tabs, commas or spaces, and columns of different lengths are read as groups of different sizes. The one thing the page will not guess at is a thousands separator: 1,000 could be a single value or two values when a comma also separates cells, so it asks instead of choosing.
Why does my software give a slightly different p-value?
Usually one of two things. The first is rounding: a p worked out from an F that was rounded to two decimals before it was used is a different p from one worked out from the full ratio. The second is how the tail was computed. A p-value taken as one minus a cumulative distribution loses its digits once that cumulative rounds to 1, which is how an F of 13.5 on 99 and 9,998 degrees of freedom comes back as 0 from some libraries when the tail is 1.4922e-200. The tail here is computed directly and was measured against an 80-digit reference to within 1e-12 across 11,880 combinations.

The ANOVA table is exact arithmetic on the groups you paste, and every sum of squares is printed, so between plus within adds to the total on screen and you can check it. The p-value is the upper tail of the F distribution at the stated degrees of freedom. The classical assumptions of independent groups and equal variances are named beside the table. It runs no post-hoc test and draws no conclusion about which group differs.