ANOVA Calculator: One-Way Test With Steps & P-Value

Free one-way ANOVA calculator. Enter your groups to get the F statistic, p-value, and a full ANOVA table with step-by-step working. Worked examples included.

ANOVA Calculator (One-Way)

One-way ANOVA tests whether the means of three or more groups differ. Enter each group’s values, press Calculate, and get the F statistic, p-value, and full ANOVA table with steps.

A one-way ANOVA tells you whether three or more groups have genuinely different averages, or whether the gaps you see are just random noise. Enter your groups above, press Calculate, and you get the F statistic, the p-value, and a complete ANOVA table with every step shown. This page walks through how the test works, how to read your results, and three fully worked examples using real numbers.

What does a one-way ANOVA test actually do?

It compares the means of three or more independent groups in a single test. If p is 0.05 or less, at least one group mean is different from the others. If p is above 0.05, you do not have strong evidence that the groups differ.

The reason you use ANOVA instead of running several t-tests is error control. Every extra t-test raises your chance of a false positive. ANOVA checks all groups together in one shot, so that risk stays fixed.

The test works by splitting the total variation in your data into two parts. One part is the variation between the group means. The other is the variation within each group. When the between-group variation is large compared to the within-group variation, the F statistic climbs and the p-value drops. That is your signal that the groups are not the same.

How do you read the F statistic and p-value?

Your results come down to two numbers.

  • The F statistic is the ratio of between-group variation to within-group variation. A larger F means the group means sit further apart relative to the spread inside each group. An F near 1 means the groups look about the same.
  • The p-value translates that F into a probability. It answers one question: if every group really had the same mean, how likely is an F this large by pure chance? A small p-value means "very unlikely," so you reject the idea that the means are equal.

The standard cutoff is 0.05:

  • p ≤ 0.05 → reject the null hypothesis. At least one group mean is different.
  • p > 0.05 → fail to reject the null hypothesis. No strong evidence of a difference.

One important limit: ANOVA tells you that a difference exists, not which groups differ. To pinpoint the specific pairs, you run a post-hoc test such as Tukey or Bonferroni after a significant result. If p is above 0.05, you stop there. There is nothing to chase.

How to read the ANOVA summary table

Every ANOVA result is reported as a table with three rows and six columns. Once you know what each cell means, you can read any ANOVA output in seconds.

ColumnWhat it means
SourceWhere the variation comes from: Between Groups, Within Groups, or Total.
DFDegrees of freedom. Between = k − 1, Within = N − k, Total = N − 1.
SSSum of squares. The raw amount of variation for that source.
MSMean square. SS divided by its DF, an average amount of variation.
FThe test statistic: MS Between divided by MS Within.
P-ValueThe probability of seeing this F if all group means were equal.

Here k is the number of groups and N is the total number of values across all groups. The "fill in the ANOVA table" problems you see in homework are just asking you to compute these cells one at a time. Our degrees of freedom calculator handles the DF column on its own if you need it separately.

The one-way ANOVA formulas

Six formulas turn your raw data into an F statistic. The calculator runs all of them, but here they are so you can follow the working.

Sum of squares between groups (SSB)

This measures how far each group mean sits from the overall mean.

SSB = Σ ni (x̄i − x̄)²

where ni is the size of each group, x̄i is each group mean, and x̄ is the grand mean of all values. A bigger SSB means the group means are further apart.

Sum of squares within groups (SSW)

This measures the spread inside each group, pooled together.

SSW = Σ (ni − 1) si²

where si² is the variance of each group. A smaller SSW means values sit close to their own group mean. You can check any single group's spread with the variance calculator.

Total sum of squares (SST)

SST = SSB + SSW

This is the total variation in the whole dataset. It always equals the between part plus the within part.

Mean squares (MSB and MSW)

Each sum of squares is divided by its degrees of freedom to get an average.

MSB = SSB / (k − 1)

MSW = SSW / (N − k)

where k is the number of groups and N is the total sample size.

The F statistic

F = MSB / MSW

This is the final ratio. The calculator then converts F, together with the two degrees of freedom, into the p-value.

Worked example: three groups, step by step

Take three groups of five values each. These are the calculator's default numbers, so you can follow along:

  • Group 1: 5, 1, 11, 2, 8
  • Group 2: 0, 1, 4, 6, 3
  • Group 3: 13, 9, 8, 15, 7

The group means are 5.4, 2.8, and 10.4. The grand mean of all 15 values is 6.2.

  • Step 1, SSB: 5(5.4 − 6.2)² + 5(2.8 − 6.2)² + 5(10.4 − 6.2)² = 149.2
  • Step 2, SSW: pooling each group's variance gives 139.2
  • Step 3, SST: 149.2 + 139.2 = 288.4
  • Step 4, MSB: 149.2 / (3 − 1) = 74.6
  • Step 5, MSW: 139.2 / (15 − 3) = 11.6
  • Step 6, F: 74.6 / 11.6 = 6.431

With degrees of freedom 2 and 12, the p-value is 0.0126. Since 0.0126 is below 0.05, the result is significant. At least one group mean is different.

Worked example: clean numbers you can check by hand

Here is a smaller set that gives round numbers, useful for checking your own working.

  • Group A: 8, 9, 10
  • Group B: 6, 7, 8
  • Group C: 10, 11, 12

Means are 9, 7, and 11. Grand mean is 9.

SSB = 3(9−9)² + 3(7−9)² + 3(11−9)² = 0 + 12 + 12 = 24
SSW = each group has variance 1, so (2)(1) × 3 groups = 6
SST = 24 + 6 = 30
MSB = 24 / 2 = 12
MSW = 6 / 6 = 1
F = 12 / 1 = 12

With df 2 and 6, the p-value is 0.0080. Significant, so the three groups differ.

Worked example: comparing test scores across three classes

A common real setup. Three teaching methods, three students each, scored out of 100.

  • Method 1: 85, 90, 88
  • Method 2: 78, 82, 80
  • Method 3: 92, 95, 91

Means are 87.67, 80, and 92.67. The between-group spread is large and the within-group spread is small, which points to a strong result.

SSB = 244.22, SSW = 29.33, SST = 273.56
MSB = 244.22 / 2 = 122.11, MSW = 29.33 / 6 = 4.89
F = 122.11 / 4.89 = 24.977

With df 2 and 6, the p-value is 0.0012. Strongly significant. The teaching methods produce different average scores. A post-hoc test would then show Method 3 as the top performer.

What assumptions does ANOVA need?

Before you trust an ANOVA result, three conditions should hold.

  • Independence. Each value must be unrelated to the others. One measurement should not affect another. This is usually about how you collected the data.
  • Normality. The values in each group should be roughly normally distributed. ANOVA copes well with mild departures, but heavy skew in small samples can distort the p-value.
  • Equal variances. The groups should have similar spread, sometimes called homogeneity of variance. If one group is far more scattered than the others, the standard test can mislead. In that case a Welch's ANOVA is the safer choice, since it does not assume equal variances.

One-way vs two-way ANOVA: which do you need?

A one-way ANOVA, which is what this calculator runs, tests one factor. For example, "does fertilizer type affect plant height?" You have one grouping variable with three or more levels.

A two-way ANOVA tests two factors at once and their interaction, for example fertilizer type and sunlight level together. If your data has two separate grouping variables, one-way is not the right tool for that design. Most homework and coursework problems asking simply to "compare group means" are one-way, which is what you want here.

When should you use this calculator?

Reach for one-way ANOVA when you have three or more groups, numerical data, and a single factor separating them. Two groups only? A t-test is simpler and answers the same question. Comparing categories rather than means? A chi-square test fits better. For everything in between, with three or more numeric groups and one factor, this is the test.

After a significant result, your next step is a post-hoc comparison to find which specific groups differ, followed by reporting the effect size so readers know how big the difference is, not just that one exists.

Try these next

  • Parker Rowland

    Former Math Teacher

    Parker Rowland is a Former math teacher, author, and ed tech enthusiast focused on clear math explanations, practical problem solving & effective learning.

  • Yulduz Zaripova

    Data & Analytics Professional · MIT

    Yulduz Zaripova is a New York-based professional specializing in data analytics, financial engineering, and applied mathematics.