How to run a one-way ANOVA in Google Sheets

Google Sheets has no ANOVA function, but you can build the complete ANOVA table with a few formulas. Here is the method, step by step, with a worked example and the APA write-up.

Updated 2026-09-28·4 min read
Quick answer

Google Sheets has no ANOVA function. Compute the sums of squares with DEVSQ, divide by the degrees of freedom to get the mean squares, then F = MS between / MS within and p = F.DIST.RT(F, df between, df within). If p < 0.05, at least one group mean is different.

When to use a one-way ANOVA

Use it to compare the means of three or more independent groups on one numeric variable: scores under three teaching methods, sales in four regions, yield with five fertilisers. Comparing the groups two by two with t-tests instead raises the chance of a false positive with every extra test.

The example data

Thirty-six students were split into three groups of twelve, each taught with a different method. Scores are in columns A, B and C, rows 2 to 13, with the group names in row 1.

GroupScoresMean
Method A72, 75, 68, 80, 77, 74, 69, 81, 73, 76, 70, 7874.42
Method B78, 82, 75, 85, 80, 79, 77, 88, 81, 83, 76, 8480.67
Method C70, 72, 66, 74, 71, 69, 68, 75, 70, 73, 67, 7270.58

Step by step

1. Total variation

DEVSQ returns the sum of squared deviations from the mean. Applied to all the data at once, it gives the total sum of squares:

=DEVSQ(A2:C13)

Result: SS total = 1070.22.

2. Variation within the groups

=DEVSQ(A2:A13)+DEVSQ(B2:B13)+DEVSQ(C2:C13)

Result: SS within = 448.50.

3. Variation between the groups

SS between = SS total − SS within = 621.72.

4. Degrees of freedom

df between = number of groups − 1 = 2. df within = =COUNT(A2:C13)-3 = 33.

5. Mean squares, F and p

MS between = 621.72 / 2 = 310.86. MS within = 448.50 / 33 = 13.59. F = 310.86 / 13.59 = 22.87. Then:

=F.DIST.RT(22.87, 2, 33)

Result: p = 5.9 × 10−7, so p < .001. The critical value is =F.INV.RT(0.05, 2, 33) = 3.28, and 22.87 is far above it.

6. Effect size

Eta squared = SS between / SS total = 621.72 / 1070.22 = η² = 0.58: the teaching method accounts for 58% of the variation in scores. Common benchmarks are 0.01 small, 0.06 medium and 0.14 large.

The finished ANOVA table

This is the same layout as the classic “Anova: Single Factor” output:

Source of variationSSdfMSFP-valueF crit
Between groups621.722310.8622.87< .0013.28
Within groups448.503313.59
Total1070.2235
Do it in one click with ExplainStats

Select your data, click Run: full results table, assumption checks, a plain-language interpretation and an APA line, free in Google Sheets.

Get ExplainStats free

Which groups are different? Post-hoc tests

The ANOVA says that at least one mean differs, not which one. A post-hoc test compares every pair while keeping the overall error rate at 5%. For this example, Tukey HSD gives:

ComparisonDifferencep (Tukey)
Method B − Method A6.25< .001
Method A − Method C3.83.041
Method B − Method C10.08< .001

Google Sheets cannot compute Tukey p-values with formulas, because it has no function for the studentized range distribution. ExplainStats adds Tukey HSD automatically when the ANOVA is significant, or Games-Howell when variances are unequal.

Check the assumptions

  • Independent groups: each person appears in one group only. For repeated measures on the same people, use a repeated-measures design or the Friedman test.
  • Normality in each group: test each group with a Shapiro-Wilk test. Here p = .92, .98 and .98, so normality is plausible.
  • Equal variances: the standard deviations are 4.21, 3.92 and 2.78. A Brown-Forsythe test gives p = .32, so equal variances are plausible. If they were not, Welch's ANOVA would be the right choice.

If normality clearly fails with small groups, use the Kruskal-Wallis test instead.

How to report it (APA style)

A one-way ANOVA showed a significant effect of teaching method on exam scores, F(2, 33) = 22.87, p < .001, η² = .58. Tukey HSD comparisons showed that Method B (M = 80.67) scored higher than Method A (M = 74.42, p < .001) and Method C (M = 70.58, p < .001), and that Method A scored higher than Method C (p = .041).

Frequently asked questions

Does Google Sheets have an ANOVA function?

No. There is no built-in ANOVA function or menu in Google Sheets. You can build the table with DEVSQ, COUNT and F.DIST.RT, or use an add-on.

What does F crit mean in an ANOVA table?

F crit is the critical value of F at the chosen significance level, =F.INV.RT(0.05, df between, df within). If F is larger than F crit, the result is significant; this is the same decision as p < 0.05.

Can the groups have different sizes?

Yes. COUNT and DEVSQ ignore empty cells, so the formulas in this guide work with unequal group sizes. The degrees of freedom within are the total number of values minus the number of groups.

How do I know which groups differ?

A significant ANOVA only tells you that at least one mean differs. Use a post-hoc test such as Tukey HSD (equal variances) or Games-Howell (unequal variances) to find which pairs differ.

Do it in one click with ExplainStats

Select your data, click Run: full results table, assumption checks, a plain-language interpretation and an APA line, free in Google Sheets.

Get ExplainStats free