Statistical Calculators › Means: Many Groups (ANOVA) › Two-Way ANOVA Sample Size (Interaction Effect)
← All Calculators

Means: Many Groups (ANOVA)

Two-Way ANOVA Sample Size (Interaction Effect)

Find the minimum number of subjects per treatment combination needed to detect a specified two-way ANOVA interaction effect at the desired power and significance level. Uses the factorial fixed-effects ANOVA F test and the noncentral F distribution described in this method.

Interaction Effect

Specify the two factors and the Cohen f effect size for their interaction. The calculation assumes equal allocation across all treatment combinations.

Sample Size

The result is the smallest equal per-cell sample size whose interaction-test power reaches the requested target.
Enter the design assumptions and click Calculate Sample Size.

Methodology

This calculator follows the Factorial Analysis of Variance using Effect Size procedure documented in the statistical literature (the software, LLC, Chapter 563). For a two-factor fixed-effects design, the interaction is tested with an F statistic whose numerator degrees of freedom are the product of the degrees of freedom for the two factors.

Interaction effect size

this method defines the interaction effect size as Cohen's f, the standard deviation of the interaction effects divided by the within-cell subject standard deviation:

fAB = σm(AB) / σ

For a two-way interaction, the interaction effect in cell ij is the cell mean minus its factor-A mean minus its factor-B mean plus the grand mean. This is computed as the standard deviation of these interaction effects across the I × J cells:

σm(AB) = √[ Σi Σj ( μij − μ − μ·j + μ̄ )² / (I J) ]

If a partial eta-squared value is available instead, it can be converted to Cohen's f for the target interaction using f = √[ηp² / (1 − ηp²)].

Power calculation

For a balanced two-way design with I levels of factor A, J levels of factor B, and n subjects per treatment combination, the total sample size is N = IJn. The interaction degrees of freedom are df1 = (I − 1)(J − 1), and the error degrees of freedom are df2 = IJ(n − 1). The noncentrality parameter is λ = Nf2. Power is the upper-tail probability of the noncentral F distribution beyond the central F critical value at alpha.

λ = N fAB²
Power = P[Fnoncentral(df1, df2, λ) > F1−&alpha(df1, df2)]

Sample-size search

The calculator evaluates integer values of n, starting at two subjects per treatment combination, until the requested power is reached. The first qualifying value is reported. With an expected dropout rate DR, the enrollment target is inflated as n′ = ceil[n / (1 − DR)], following the dropout-inflation rule shown in this method.

Validation example

this method Chapter 563, Example 2, specifies two factors with 3 and 2 levels, an interaction effect size of f = 0.40, alpha = 0.05, and minimum power = 0.80. This yields 11 subjects per treatment combination, 66 total, with interaction-test power 0.8171 (df1 = 2, df2 = 60). This implementation reproduces that result.

References

the software, LLC. this method Sample Size Software: Factorial Analysis of Variance using Effect Size, Chapter 563, this method 2026 documentation.

Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences, 2nd ed. Lawrence Erlbaum Associates.

Neter, J., Kutner, M. H., Nachtsheim, C. J., & Wasserman, W. (1996). Applied Linear Statistical Models. Richard D. Irwin.

Winer, B. J. (1991). Statistical Principles in Experimental Design, 3rd ed. McGraw-Hill.