Two-Way ANOVA Calculator

Paste your data grid to run a two-way ANOVA.

How it is calculated

Paste a grid with one measurement per cell: each line is a row (factor A) and the values in a line, separated by spaces, commas, semicolons or tabs, are the columns (factor B). Every row needs the same number of values, with at least 2 rows and 2 columns, and every entry must be a number; otherwise there is no result. For a rows and b columns, SSrows = b·Σ(row mean − grand mean)², SScols = a·Σ(column mean − grand mean)² and SSerror = SStotal − SSrows − SScols, with degrees of freedom a−1, b−1 and (a−1)(b−1). The tool shows F = MSfactor ÷ MSerror for rows and columns, plus the three sums of squares. If the error sum of squares is zero (perfectly additive data), F is shown as ∞ when the factor has any effect and as — when it has none. There is no p-value and no interaction test, since there is no replication.

Worked example

Take three fertilizers (rows) tested on three soils (columns): 20 22 25 / 24 27 30 / 28 31 36. The grand mean is 27. Row means are 22.33, 27 and 31.67, so SS rows = 3 × (21.78 + 0 + 21.78) = 130.6667. Column means are 24, 26.67 and 30.33, so SS columns = 60.6667. Total SS is 194, so SS error = 194 − 130.6667 − 60.6667 = 2.6667, with 4 degrees of freedom (MS error = 0.6667). F for rows is 65.33 ÷ 0.6667 = 98.0000; F for columns is 30.33 ÷ 0.6667 = 45.5000. Both are large relative to the noise.

Try this example →

Common mistakes

  • Pasting replicated data, such as several measurements per cell side by side. Each entry is treated as its own column level, so factor B will be wrong.
  • Leaving rows of unequal length or a text header. If any entry is not a number or the rows differ in length, no result appears, so remove labels.
  • Typing decimals with a comma (2,5). Commas and semicolons separate values, so 2,5 is read as two numbers, 2 and 5.
  • Expecting an interaction test. With one observation per cell, interaction cannot be separated from error, so the error term here includes it.
  • Reading a large F as proof without checking the critical value or p-value for the right degrees of freedom; the tool does not give them.

About this calculator

A two-way ANOVA (analysis of variance) tests whether two categorical factors — arranged as rows and columns in a data grid — each have a statistically significant effect on a measured outcome. Without replication (one value per cell, so no interaction term), the method partitions the total variation into sum of squares for rows, sum of squares for columns, and residual (error) sum of squares, then converts each to a mean square by dividing by its degrees of freedom, and computes an F statistic (MS_factor ÷ MS_error) for each factor. The calculator reports these F values and sums of squares; it does not give a p-value, so compare each F with the critical value of the F-distribution for your degrees of freedom to judge significance.

Researchers, quality engineers, and statisticians use two-way ANOVA whenever an experiment or observational dataset has two independent variables that might each influence a response — for example, testing whether both fertilizer type and soil type affect crop yield, or whether both machine and operator affect a manufacturing defect rate. It separates the two effects instead of running two separate one-way tests, giving a clearer picture of which factor, if either, is driving the observed variation.

Was this helpful?

You can pick up to 3 reactions.

Comments

  • Be the first to comment.

Popular calculators

All Calculators