Skip to main content
v2026.11,858 entries · CC-BY 4.0

ANOVA in Excel: One-Way ANOVA With the Data Analysis ToolPak

Run a one-way ANOVA in Excel with the Analysis ToolPak, check the p-value with F.DIST.RT, and add the post hoc and effect size it omits.

Written and maintained by CASRAI Editorial Board

Last updated

To run ANOVA in Excel, turn on the Analysis ToolPak add-in, arrange each group in its own column, and choose Data > Data Analysis > Anova: Single Factor. The ToolPak output gives the F statistic and a p-value; this guide runs one worked example from start to finish, shows how to check the p-value with a worksheet function, and adds a post hoc follow-up and an effect size computed by hand.

What an ANOVA in Excel is used for in research

One-way analysis of variance (the "excel anova" or "anova test excel" most researchers search for) asks whether the means of three or more independent groups differ by more than their within-group scatter would predict. A single F test replaces a string of pairwise t-tests. For the underlying logic, hypotheses and notation, see the dictionary entry ANOVA (analysis of variance) and the guide on the research hypothesis in ANOVA procedures; this page covers only the Excel mechanics.

Check three assumptions before you trust the result: observations are independent, each group is roughly normal, and group variances are similar. The SciPy documentation for the same one-way test lists these three assumptions: independent samples, normally distributed populations, and equal population standard deviations. The guide on a normality test in Excel covers the second; comparing the group variances in the output table covers the third informally.

Install or access: load the Analysis ToolPak

The ANOVA command lives in the Analysis ToolPak, which is an add-in that is not switched on by default. Microsoft’s instructions (checked 2026-10-29) apply to Excel for Microsoft 365, Excel 2024 and Excel 2021, on Windows and Mac.

Windows

  1. Select the File tab, select Options, then select the Add-Ins category.
  2. In the Manage box, select Excel Add-ins, then select Go.
  3. In the Add-Ins box, check Analysis ToolPak, then select OK.

If Analysis ToolPak is not listed, select Browse to find it. If Excel says it is not installed, select Yes to install it.

Mac

  1. Select the Tools menu, then select Excel Add-ins.
  2. Check Analysis ToolPak and select OK.
  3. Quit and restart Excel.

Once the add-in is loaded, the Data Analysis command appears on the Data tab.

Step-by-step: run a one-way ANOVA with the Data Analysis ToolPak

The example below is a small illustrative dataset, not real study data. Three groups of five scores sit in columns A to C with the group name in row 1:

A B C
12 16 13
14 18 12
11 15 14
13 17 11
15 19 15
  1. Put each group in its own column (or row) with a label above it. Keep the range free of text and blank cells.
  2. Select Data > Data Analysis, choose Anova: Single Factor, and select OK.
  3. Set the input range to A1:C6, tell Excel the groups are in columns, and tick the option that says the first row holds labels.
  4. Set alpha to the significance level you fixed before looking at the data (0.05 is the usual choice).
  5. Choose where the results go, then select OK.

Output and how to read it

The results come in two blocks: a summary of each group and an ANOVA table. For the example, the figures are as follows. Group means are 13, 17 and 13, each group variance is 2.5, and the ANOVA table has these entries:

Source of variation SS df MS F P-value F crit
Between groups 53.33 2 26.67 10.67 0.0022 3.89
Within groups 30.00 12 2.50
Total 83.33 14

The decision rule is the one you set in advance: the result is significant at your alpha when the P-value is below alpha, or equivalently when F exceeds F crit. Here 10.67 is larger than 3.89 and 0.0022 is below 0.05, so the null hypothesis that all three population means are equal is rejected. MS is SS divided by its df, and F is MS between divided by MS within; the guide to the sum of squares formula and the F table explain each column.

Check the p-value with F.DIST.RT

Microsoft documents F.DIST.RT(x, deg_freedom1, deg_freedom2) as the right-tailed F probability, where x is the value to evaluate, deg_freedom1 is the numerator degrees of freedom and deg_freedom2 is the denominator degrees of freedom. In any empty cell, =F.DIST.RT(10.6667, 2, 12) returns about 0.0022, matching the ToolPak P-value. The same value comes from SciPy’s f_oneway, which performs a one-way ANOVA, on these data (F = 10.667, p = 0.00218), which is a useful cross-check if you also use Python.

Follow up with post hoc tests and an effect size

A significant F says that at least one mean differs, not which one. Run the follow-up comparison separately; the comparison of Bonferroni and Tukey corrections and the page on planned comparisons and post hoc tests help you choose.

Compute an effect size too: eta squared from the table as SS between divided by SS total: 53.33 / 83.33 = 0.64, so group membership accounts for about 64% of the variance in these scores. See eta squared and partial eta squared for when the two differ.

A reporting sentence for the example: "A one-way ANOVA showed a significant effect of group, F(2, 12) = 10.67, p = .002, η² = .64."

Troubleshooting

  • No Data Analysis button on the Data tab. The add-in is not loaded. Repeat the loading steps above; on Mac, quit and restart Excel afterwards.
  • Analysis ToolPak is missing from the Add-Ins list. Select Browse to locate it, and select Yes if Excel offers to install it.
  • F.DIST.RT returns #NUM!. Per Microsoft, this occurs when x is negative or either degrees-of-freedom argument is below 1. Non-numeric arguments give #VALUE!, and non-integer degrees of freedom are truncated.

Free alternatives

If you need post hoc tests and effect sizes in one run, scripted tools are easier to reproduce than the ToolPak. Python’s SciPy runs the same one-way test with scipy.stats.f_oneway, as in the cross-check above; see the SciPy statistics guide. Other packages are covered in the guides to ANOVA in Minitab and ANOVA in SAS.

Frequently asked questions

How do I do an ANOVA in Excel?

Load the Analysis ToolPak, arrange each group in its own column with a label, then choose Data > Data Analysis > Anova: Single Factor, set the input range and alpha, and pick an output location.

Where is the Data Analysis button in Excel?

On the Data tab, but only after the Analysis ToolPak add-in is loaded. Microsoft’s loading steps are given above.

Does Excel give post hoc tests after ANOVA?

The ANOVA table shown above contains only the F test. A significant F says that at least one mean differs, so a separate post hoc comparison is needed to find which.

How do I find the p-value for an ANOVA in Excel?

Read the P-value column of the ANOVA table, or compute it with =F.DIST.RT(F, df_between, df_within).

Is analysis of variance in Excel the same as in SPSS or R?

The one-way F test is the same calculation, so the F and p-value agree for the same data; the packages differ in what they add around it. In SPSS, see reading SPSS output.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about ANOVA in Excel: One-Way ANOVA With the Data Analysis ToolPak

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →