Developed by — Senior Statistician & Editor Last updated Add as Preferred on Google
Hypothesis Testing

Two-Way ANOVA Calculator

Use this calculator to perform a standard two-way ANOVA with two categorical independent factors and one numerical dependent variable. Enter grouped data or paste/upload a dataset to get SPSS-style tables, Levene's test, effect sizes, follow-up comparisons, an interaction plot, step-by-step calculations, and APA results.

1. Enter Your Data

Enter the observations for each factor combination. Separate numbers with commas, spaces or new lines. Edit the factor levels directly in the table headings.

Rename variables (optional)

Each combination needs at least two observations. Up to 30 combinations and 5,000 observations.

Paste a complete table from Excel, Google Sheets, or CSV/TSV. Each row is an observation. Variables are detected automatically; check the column selections below before calculating.

CSV, TSV, TXT, XLS or XLSX. Maximum 5,000 data rows and 10 MB.

Select Your Three Analysis Variables

Other columns are excluded. This tool does not model blocks, repeated measurements or random effects.

View Uploaded Data (First 5 Rows)
Analysis Options (α = 0.05 · 4 decimals · Tukey)

Pairwise comparisons are performed for significant main effects with at least three levels. If the interaction is significant, simple comparisons are reported within each level of the other factor.

Standard independent-groups two-way ANOVA, including interaction; Type III sums of squares with effect coding. Observations must be independent.

Comparing means for only one factor? Use the One-Way ANOVA Calculator.

How to Use the Two-Way ANOVA Calculator

To perform a two-way ANOVA using this calculator, follow these steps:

  1. Select the data format. Choose Wide Format to enter observations for each combination of the two factors. Alternatively, select Long Format if your dataset is already organized in columns.
  2. Enter your data. For Wide Format, enter the observations in their respective cells, separating values with commas, spaces, or new lines. You can also edit the factor levels directly in the table headings or add more rows and columns. For Long Format, paste your dataset directly from Excel or Google Sheets, or upload a CSV or Excel file.
  3. Select the variables if using Long Format. Confirm the columns representing Factor A, Factor B, and the dependent variable. Any additional columns will be excluded from the analysis.
  4. Adjust the analysis options if necessary. The default significance level is 0.05, with Tukey’s HSD selected for post hoc comparisons. You can change the significance level, decimal places, and post hoc method under Analysis Options.
  5. Click Calculate. The calculator will perform the analysis and display the results.

The calculator produces descriptive statistics, Levene’s test, the Tests of Between-Subjects Effects table, and follow-up comparisons when appropriate. You will also get an interaction plot, a step-by-step hypothesis test, and an APA-formatted report.

Note: Each combination of Factor A and Factor B must contain at least two observations. The calculator supports up to 30 factor combinations.

Key Features of the Two-Way ANOVA Calculator

This calculator allows you to perform a standard two-way ANOVA using raw data entered manually or uploaded from an existing dataset. It provides the following features:

  • Wide and long data formats: Enter observations directly into a matrix or paste a complete dataset from Excel, Google Sheets, or a CSV file.
  • Dataset upload: Upload CSV, TSV, TXT, XLS, or XLSX files containing up to 5,000 observations.
  • SPSS-style ANOVA tables: Get descriptive statistics, Type III sums of squares, degrees of freedom, mean squares, F statistics, p-values, F critical values, and partial eta squared.
  • Assumption testing: Perform Levene’s test to assess whether the variances are equal across the factor combinations.
  • Post hoc tests: Choose Tukey’s HSD, Bonferroni, or Holm–Bonferroni for pairwise comparisons when appropriate.
  • Interaction plot: Visualize how the mean of the dependent variable changes across the levels of the two factors.
  • Step-by-step solution and APA reporting: Get a complete six-step hypothesis test, interpretation of the results, and an APA-formatted report that you can copy.

How to Interpret the Two-Way ANOVA Results

The Tests of Between-Subjects Effects table contains the results for Factor A, Factor B, and their interaction. For each effect, the calculator reports the F statistic, p-value, and partial eta squared (η²p), among other statistics.

To interpret the results, start with the interaction effect before examining the main effects.

1. Interaction Effect (Factor A × Factor B)

The interaction tests whether the effect of one factor on the dependent variable differs depending on the level of the other factor.

If the interaction p-value is less than the significance level (typically 0.05), reject the null hypothesis and conclude that the interaction is statistically significant.

In this case, examine the interaction plot and the follow-up comparisons to understand how the factors interact.

2. Main Effect of Factor A

The main effect of Factor A tests whether its estimated marginal population means are equal, averaging equally across the levels of Factor B.

If p < 0.05, reject the null hypothesis and conclude that Factor A has a statistically significant main effect on the dependent variable.

3. Main Effect of Factor B

Similarly, the main effect of Factor B tests whether its estimated marginal population means differ across its levels, averaging equally across the levels of Factor A.

If p < 0.05, reject the null hypothesis and conclude that Factor B has a statistically significant main effect.

However, when the interaction is significant, the main effects should be interpreted in the context of that interaction.

The calculator also reports partial eta squared for each effect. This measures the proportion of the effect-plus-error variation associated with that effect after accounting for the other terms in the model.

For a detailed explanation of these effects, hypotheses, and formulas, see our Complete Two-Way ANOVA Guide.

Two-Way ANOVA Calculator Example

Consider the default example, where a researcher wants to determine whether students’ examination scores differ according to teaching method (Lecture or Flipped Classroom) and study mode (In-Person or Online).

The two independent factors are teaching method and study mode, while examination score is the dependent variable.

Using the default data and a significance level of 0.05, the calculator gives the following results:

EffectF Statisticp-value
Teaching Method240.0000< 0.001
Study Mode38.4000< 0.001
Teaching Method × Study Mode0.00001.0000

Interpretation

Since the p-values for teaching method and study mode are less than 0.05, both factors have statistically significant main effects on examination scores.

However, the interaction is not statistically significant (p = 1.0000). Therefore, we fail to reject the null hypothesis for the interaction.

Looking at the group means, students taught using the Flipped Classroom method scored higher on average than those taught using the Lecture method. Similarly, students attending In-Person classes had higher average scores than those studying Online.

The nonsignificant interaction indicates that there is insufficient evidence that the effect of teaching method differs between the two study modes.

Post Hoc Tests After Two-Way ANOVA

A significant main effect tells you that the estimated marginal means are not all equal. However, if a factor has three or more levels, you may need post hoc tests to determine which means differ.

This calculator supports the following methods:

Post Hoc TestWhen to Use
Tukey’s HSDWhen comparing all pairs of means under the standard equal-variance ANOVA model. This is the default method.
BonferroniWhen performing a selected set of pairwise comparisons while controlling for multiple testing.
Holm–BonferroniWhen adjusting multiple p-values using a method that is generally less conservative than Bonferroni.

The calculator uses model-based estimated marginal means for these comparisons. For unequal group sizes, the Tukey procedure uses an approximation.

If the interaction is statistically significant, the calculator provides simple pairwise comparisons within each level of the other factor.

For example, if teaching method and study mode interact, you can compare Lecture and Flipped Classroom separately for In-Person and Online students.

When a factor has only two levels, a separate post hoc test is generally unnecessary for its overall main effect. However, simple comparisons may still be useful if the interaction is significant.

You can change the post hoc method or disable pairwise comparisons under Analysis Options.

Assumptions of Two-Way ANOVA

Before performing a two-way ANOVA, ensure that the following assumptions are reasonably satisfied:

  1. Independence of observations: Each observation should be independent of the others. The calculator is designed for independent groups, not repeated measurements on the same subjects.
  2. Normality: The model residuals should be approximately normally distributed within each factor combination. You can use the Shapiro-Wilk Test Calculator or the Kolmogorov-Smirnov test calculator to help assess normality.
  3. Homogeneity of variances: The population variances should be approximately equal across the factor combinations. The calculator performs Levene’s test to help assess this assumption.
  4. Appropriate variables: The two independent variables should be categorical, while the dependent variable should be numerical and measured on a continuous scale.

If Levene’s test is statistically significant, the equal-variance assumption may be violated. In this case, interpret the standard ANOVA results with caution, particularly when the sample sizes are unequal.

You can also use our Levene’s Test Calculator to examine the equality of variances separately.

Frequently Asked Questions

Can I use this calculator for a two-way ANOVA with replication?

Yes. This calculator performs a two-way ANOVA with replication, meaning that each combination of the two factors must contain at least two observations. Replication allows the calculator to estimate the residual error and test the interaction between the two factors.

Can I perform a two-way ANOVA with unequal sample sizes?

Yes. The calculator supports both balanced and unbalanced designs, provided that each factor combination has at least two observations. It uses Type III sums of squares with effect coding to test the main effects and interaction. However, unequal sample sizes can make the analysis more sensitive to violations of the equal-variance assumption.

Does the calculator support a 2 × 3 or 3 × 4 factorial design?

Yes. The calculator supports factors with more than two levels, provided the total number of combinations does not exceed 30. For example, a 2 × 3 design contains six combinations, while a 3 × 4 design contains 12 combinations.

Can I perform a two-way ANOVA without replication?

No. This calculator requires at least two observations per factor combination. A traditional two-way ANOVA without replication uses a different analysis approach because the interaction and residual error cannot be estimated separately in the usual way.

Can I upload a dataset containing more than three columns?

Yes. You can upload a dataset with additional variables, but you must select exactly two categorical factors and one numerical dependent variable. The remaining columns are excluded from the analysis. However, if your research involves blocking variables, covariates, or repeated measurements, you may need a different statistical model.

Can I use this calculator for a one-way ANOVA?

No. This calculator only performs two-way ANOVA. However, if your study has only one categorical independent variable, use our One-Way ANOVA Calculator instead. The one-way ANOVA calculator also supports Welch’s ANOVA when the equal-variance assumption is violated, along with appropriate post hoc comparisons.

Cite

Choose APA, MLA, Chicago, or Harvard. Citations credit Joseph Mburu.

Mburu, J.. (2026, December 4). Two-Way ANOVA Calculator. Retrieved December 5, 2026, from https://statcalc.net/two-way-anova-calculator/

About the Author

, Senior Statistician & Editor. Develops statistics calculators, explains formulas, and checks calculation methods and worked examples.