Super Sale WeekClaude Skills — 20% OFF
Tips

How to Do ANOVA in Excel: One-Way and Two-Way, Step by Step

Powerdrill Bloom·
How to Do ANOVA in Excel: One-Way and Two-Way, Step by Step

To do ANOVA in Excel, first turn on the Analysis ToolPak add-in. Then go to Data > Data Analysis, choose Anova: Single Factor, select your data, and click OK. Excel returns a summary table and an ANOVA table with the F value and the p-value.

If the p-value is below 0.05, at least one group mean differs from the others. For data with two factors, such as region and channel, use Anova: Two-Factor With Replication instead.

This guide covers setup, both one-way and two-way ANOVA, how to read the output, and a worked example for each. It also covers checks to run first and a faster way to analyze raw data with AI. Steps come from Microsoft Support pages, read on November 25, 2026.

What ANOVA tells you

ANOVA stands for analysis of variance. It tests whether the means of three or more groups are equal.

Microsoft describes the single-factor tool this way: "This tool performs a simple analysis of variance on data for two or more samples." The test checks whether each sample comes from the same underlying distribution.

Use it when you compare one measure across several groups. Common examples include:

  • Marketing. Sign-ups across three ad designs.
  • Retail. Weekly sales across store layouts.
  • Education. Test scores across teaching methods.
  • Operations. Defect rates across production lines.

Why not run several t-tests instead? Microsoft explains that with two samples you can use a t-test. "With more than two samples, there is no convenient generalization" of that test, "and the Single Factor Anova model can be called upon instead." Running many t-tests also raises the chance of a false positive.

The idea behind the F value is simple. It compares how far apart the group averages are with how much values vary inside each group. If the groups differ a lot while each group is tight, F is large. If the groups overlap heavily, F stays close to 1.

Turn on the Analysis ToolPak

The ANOVA tools live in the Analysis ToolPak, which is off by default. Microsoft's steps for Windows are:

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

On a Mac, the path is shorter. "Select the Tools menu, and then select Excel Add-ins." Check Analysis ToolPak and select OK.

After that, the command appears on the ribbon. Microsoft says "Now the Data Analysis command is available on the Data tab."

One limit to know: Microsoft's page lists Excel for Microsoft 365 on Windows and Mac, plus recent desktop versions. It does not list Excel for the web. If you work in a browser, open the file in the desktop app for this step.

Set up your data for one-way ANOVA

The single-factor tool expects one column per group. Put the group name in the first row and the values below it.

Display A Display B Display C
42 51 40
45 48 43
39 53 41
47 50 38
44 49 44

Each group can have a different number of values. Leave blank cells at the bottom of shorter columns, not in the middle.

If your raw data has one row per observation, with a group column and a value column, reshape it first. A PivotTable or a FILTER formula per group can split the values into columns.

For example, if the groups sit in column A and the values in column B, type the group name as a header. Under it, enter =FILTER($B$2:$B$100,$A$2:$A$100="Display A"). Copy the formula to the next column and change the group name. Each column now spills that group's values, ready for the test.

Run one-way ANOVA in Excel

With the data in place, the test takes a few clicks:

  1. Open the tool. Go to Data > Data Analysis, select Anova: Single Factor, and click OK.
  2. Select the input range. Include the header row and all group columns.
  3. Set the grouping. Choose Columns, since each group is a column.
  4. Mark the labels. Check Labels in first row.
  5. Set alpha. Leave Alpha at 0.05 unless your field uses another level.
  6. Choose the output. Pick New Worksheet Ply or an output cell, then click OK.

Excel writes two tables. The first is a summary with Count, Sum, Average, and Variance for each group. The second is the ANOVA table.

How to read the ANOVA output

The ANOVA table has one row for differences between groups and one for differences within groups. Here is what each column means:

Column What it shows
SS Sum of squares, the total variation for that row
df Degrees of freedom
MS Mean square, which is SS divided by df
F Between-groups MS divided by within-groups MS
P-value The chance of an F this large if all means were equal
F crit The F value needed to be significant at your alpha

Two checks give the same answer. If the P-value is below alpha, the result is significant. Or, if F is larger than F crit, the result is significant.

Alpha is the risk of a false alarm you accept. At 0.05, you accept a 5% chance of calling a difference real when it is not. Medical and safety work often uses 0.01 instead. Set it before you run the test, not after you see the result.

A significant ANOVA says that at least one mean differs. It does not say which one. Look at the group averages in the summary table, then run follow-up comparisons if you need to name the pairs.

It also helps to report how big the effect is, not only whether it exists. A simple measure is eta squared: SS between divided by SS total. It shows the share of all variation that the groups explain. A value near 0 means the groups explain little. A value near 1 means they explain most of it.

A worked example: one-way ANOVA

Say a store tests three shelf displays for five weeks each. The table above shows weekly units sold. Excel's summary table reads:

Group Count Sum Average Variance
Display A 5 217 43.4 9.3
Display B 5 251 50.2 3.7
Display C 5 206 41.2 5.7

The ANOVA table reads:

Source of Variation SS df MS F P-value F crit
Between Groups 220.13 2 110.07 17.66 0.0003 3.885
Within Groups 74.80 12 6.23
Total 294.93 14

Check the math by hand. MS between is 220.13 ÷ 2 = 110.07. MS within is 74.80 ÷ 12 = 6.233. F is 110.07 ÷ 6.233 = 17.66.

The P-value of 0.0003 is far below 0.05, and F of 17.66 is above F crit of 3.885. So the displays do not all sell the same. Display B averages 50.2 units, against 43.4 and 41.2 for the others.

The effect is large, too. Eta squared is 220.13 ÷ 294.93 = 0.746, so the display explains about three quarters of the variation in weekly sales.

Write the finding plainly: "Display B sold about 7 to 9 more units a week than the other two displays." Then confirm the pairwise gaps before you roll it out to every store.

Run two-way ANOVA in Excel

Two-way ANOVA adds a second factor. Microsoft says the two-factor tool "is useful when data can be classified along two different dimensions."

Excel offers two versions:

  • Anova: Two-Factor With Replication. Use it when each combination of factors has several observations.
  • Anova: Two-Factor Without Replication. Microsoft says it assumes "there is only a single observation for each pair."

The version without replication suits data like one total per store per month. It tests rows and columns but cannot test an interaction, because each cell holds only one value.

The with-replication tool tests three things. Microsoft's plant example shows how: one test for the first factor, one for the second, and one for whether the two factors interact.

Set up the data with one factor in the rows and the other in the columns. Each row label repeats for every observation. Then run the tool:

  1. Open the tool. Go to Data > Data Analysis > Anova: Two-Factor With Replication.
  2. Select the range. Include the row labels and the column headers.
  3. Enter rows per sample. Type the number of observations in each cell, such as 3.
  4. Choose the output. Click OK.

A worked example: two-way ANOVA

Say a team tracks daily sign-ups by region and ad channel, with three days for each pair:

Region Email Social Search
North 12 18 15
North 14 20 16
North 13 19 14
South 11 22 14
South 12 24 15
South 10 23 13

Excel's ANOVA table reads:

Source of Variation SS df MS F P-value F crit
Sample (region) 0.5 1 0.5 0.5 0.493 4.747
Columns (channel) 259.0 2 129.5 129.5 Less than 0.0001 3.885
Interaction 31.0 2 15.5 15.5 0.0005 3.885
Within 12.0 12 1.0
Total 302.5 17

Read it row by row. Region alone is not significant, with a P-value of 0.493. Channel is significant: Social averages 21 sign-ups, against 14.5 for Search and 12 for Email.

The interaction matters most. Its P-value of 0.0005 means the best channel depends on the region. Social averages 23 in the South but 19 in the North. So the South should get a larger share of the social budget.

When the interaction is significant, report the cell averages rather than the overall channel averages. A single "Social wins" headline hides the fact that its lead is twice as large in the South. A small chart with one line per region makes the pattern clear: the lines are not parallel, and that gap is the interaction.

Check the assumptions first

ANOVA gives reliable answers when the data meets three conditions:

  • Independent observations. Each value comes from a separate unit, such as a different week or customer.
  • Roughly normal groups. Each group's values follow a bell-shaped spread. Small samples make this hard to judge, so look for extreme outliers.
  • Similar variances. The groups have a similar spread. In the one-way example, the variances of 9.3, 3.7, and 5.7 are close enough for a small test.

A box plot is a quick visual check. Draw one per group and compare the box sizes. Our Box Plot Maker page describes a box plot as "a statistical graph showing data distribution through key values."

If variances differ a lot, or the groups are very skewed, note it in your report. Some teams switch to a test that does not assume equal variances.

For related tests, see our guides to the t-test in Excel and regression in Excel.

Do ANOVA with AI

Running the test is quick once the data is clean. The slow part is usually reshaping raw exports into group columns and writing up what the numbers mean. An AI tool can do that work.

Here is the method in three steps, using Powerdrill Bloom.

Step 1: Upload your raw data

Save the data as an Excel file or a CSV with one row per observation. Keep one column for the group and one for the value, such as Display and Units.

The Vibe Data Analysis page says you can "Explore your data using natural language and AI-powered code generation."

Uploading grouped sales data to run ANOVA with Powerdrill Bloom

Step 2: Ask for the test in natural language

Describe what you need. For example: "Run a one-way ANOVA of Units by Display. Show the group means, the F value, and the p-value, and draw a box plot per display."

Ask follow-up questions, such as which pairs of displays differ. Ask the tool to flag any assumption problems, such as very unequal variances.

Step 3: Check the result in Excel

Compare the F value and the p-value with Excel's Anova: Single Factor output on the same data. They should match to a few decimal places.

Then export the charts and the summary for your report. For write-ups, see how to report statistics in APA format.

Checking the ANOVA result against Excel's Analysis ToolPak output

Common mistakes to avoid

These problems come up most often when people do ANOVA in Excel.

  • Data Analysis is missing. The Analysis ToolPak is not on. Load it first.
  • Labels left unchecked. If the first row holds names, check Labels in first row, or Excel reads them as data.
  • Wrong grouping. Choose Columns when each group is a column, and Rows when each group is a row.
  • Using single factor for two factors. Two dimensions need a two-factor tool.
  • Stopping at "significant." ANOVA says a difference exists, not where. Look at the means and follow up.
  • Tiny groups. With two or three values per group, the test has little power to find real differences.

When your raw data needs reshaping before every test, try Powerdrill Bloom to group, test, and chart it in one pass.

Frequently asked questions

How do I do ANOVA in Excel?

Turn on the Analysis ToolPak, then go to Data > Data Analysis and choose Anova: Single Factor. Select your group columns with labels, set alpha to 0.05, and click OK. Read the P-value in the ANOVA table.

Where is ANOVA in Excel?

It is under Data > Data Analysis, once the Analysis ToolPak add-in is on. On Windows, load it from File > Options > Add-Ins. On a Mac, use Tools > Excel Add-ins.

How do I do a two-way ANOVA in Excel?

Use Anova: Two-Factor With Replication when each pair of factors has several observations. Put one factor in rows and the other in columns, enter the rows per sample, and click OK.

What does the p-value mean in Excel ANOVA?

It is the chance of seeing an F value this large if all group means were equal. A p-value below 0.05 means at least one group mean differs from the others.

Can I do ANOVA in Excel with unequal sample sizes?

Yes, for one-way ANOVA. Anova: Single Factor accepts groups of different sizes. Leave empty cells at the bottom of shorter columns. The two-factor with replication tool needs equal counts per cell.

Sources: Microsoft Support, Use the Analysis ToolPak to perform complex data analysis · Microsoft Support, Load the Analysis ToolPak in Excel · Microsoft Support, F.DIST.RT function.