Statistical Calculators › Means: Correlated, Paired, and Cross-Over Designs › 2×2 Crossover Design Sample Size Calculator
← All Calculators

Means: Correlated, Paired, and Cross-Over Designs

2x2 Crossover Design Sample Size Calculator

Calculates the exact total sample size for a balanced 2×2 crossover study comparing two treatment means with a two-sided t-test. The calculation uses the noncentral t distribution and the within-subject variability of the crossover comparison. Runs entirely in your browser.

Study Design

Enter the assumptions for the treatment-mean comparison. The resulting sample size is the total number of evaluable subjects across both treatment sequences.
this method defines σW = σP × √2. The SD of the paired treatment differences is σD = 2σP = √2σW.

Sample Size

The search considers only even total sample sizes because the 2×2 crossover is assumed to be balanced between the AB and BA sequences.
Enter the study assumptions and click Calculate Sample Size.

Methodology

This calculator implements the sample-size procedure for a balanced 2×2 crossover design used by this method for testing whether two treatment means differ. Each subject receives both treatments in one of two sequences, AB or BA. The treatment comparison is based on the within-subject treatment contrast, with the sampling distribution of the test statistic evaluated using the noncentral t distribution.

Hypothesis

H0: δ = δ0   vs.   H1: δ ≠ δ0
δ = μT − μR

The null difference δ0 is the treatment difference specified under the null hypothesis. The alternative difference δ1 is the difference assumed to be present when calculating power. The magnitude driving the noncentrality parameter is |δ1 − δ0|.

Standard deviation relationships

this method allows the variability to be entered in three equivalent forms. This calculator accepts all three and converts them to the within-subject population SD (σW).

σW = σP × √2
σD = σP × 2
σP = σD / 2
σP = σW / √2

Here σP is the standard deviation of the period differences for subjects within a sequence, while σD is the standard deviation of the paired treatment differences.

Noncentrality parameter

For a total evaluable sample size N, the test has N − 2 degrees of freedom. The noncentrality parameter used for power is

λ = |δ1 − δ0| √(N / 2) / σW

The critical value is the two-sided Student t quantile t1−α/2,N−2. Power is the probability, under the noncentral t distribution with noncentrality λ, of falling outside the two-sided critical boundaries. The calculator searches even values of N and returns the smallest balanced total sample size whose calculated power is at least the requested target.

Dropout adjustment

The primary sample-size result is the evaluable sample size N. If an expected dropout rate is entered, the calculator inflates enrollment using N / (1 − dropout rate), then rounds upward to the next even number so that the two treatment sequences remain balanced.

Worked validation example

this method validation target: two-sided test, power = 0.90, α = 0.05, δ0 = 0, δ1 = 5, SD of period differences σP = 10. The corresponding within-subject SD is 14.14214. This yields a total sample size of 172 subjects, with calculated power 0.90323.

As a second check from the same this method example, changing δ1 from 5 to 10 gives a required total sample size of 46, with calculated power 0.91250.

References

the software, LLC. Tests for the Difference Between Two Means in a 2x2 Cross-Over Design. this method Sample Size Software documentation, 2022. the relevant methodological literature specifies the difference-based 2×2 crossover procedure, the three equivalent SD specifications, the balanced even-N search, and the validation examples used above.

Chow, S.-C., Shao, J., & Wang, H. (2003). Sample Size Calculations in Clinical Research. Marcel Dekker, New York. This text is a principal methodological reference for sample size calculations for 2×2 crossover designs.

Lenth, R. V. (1989). Algorithm AS 243: Cumulative Distribution Function of the Non-Central T Distribution. Applied Statistics, 38(1), 185–189. The noncentral-t distribution calculation used by this page follows the published numerical approach for evaluating the noncentral t CDF.