Statistical Calculators › Cluster Randomized and Multi-Level Designs › Stepped-Wedge Cluster Randomized Trial Sample Size Calculator
← All Calculators

Cluster Randomized and Multi-Level Designs

Stepped-Wedge Cluster Randomized Trial Sample Size Calculator

Calculates the required number of clusters for a complete stepped-wedge cluster randomized trial with a continuous outcome. The calculation uses the Hussey-Hughes variance approach, accounting for the number of periods, cluster-period size, intracluster correlation, treatment effect, alpha, and desired power. Runs entirely in your browser.

Trial Design & Effect

Complete stepped-wedge design with equal numbers of clusters in each crossover sequence.

Required Sample Size

The smallest integer number of clusters per sequence that reaches the requested power is reported.
Enter the design assumptions and click Calculate Sample Size.

Methodology

This calculator implements the variance-based approach for a complete stepped-wedge cluster randomized trial described by Hussey and Hughes (2007). All clusters begin under control and cross over to intervention at different periods. Fixed period effects are included in the analysis, and the treatment effect is the time-averaged intervention effect.

Design represented here

The calculator assumes a cross-sectional design: different participants can be measured in different periods. It uses a complete stepped-wedge layout with one additional crossover sequence for each intervention period. Thus, with T periods there are T − 1 sequences: for example, with five periods the sequences are 00001, 00011, 00111, and 01111.

T = number of measurement periods
S = T − 1 = number of crossover sequences
m = subjects per cluster per period
ρ = exchangeable intracluster correlation coefficient
Δ = mean intervention effect
σ = outcome standard deviation

Variance calculation

For each cluster, the covariance matrix is represented as σ2[(1 − ρ)I + ρJ] / m. The fixed-effect design matrix contains an intercept, period indicators, and the stepped-wedge treatment indicator. The information matrices from the clusters are summed and inverted to obtain the variance of the treatment-effect estimator.

Var(β̂treatment) = [X′V−1X]−1treatment,treatment

SE(β̂treatment) = √Var(β̂treatment)

For a specified number of clusters, the standardized noncentrality parameter is |Δ| / SE(β̂). Two-sided normal-theory power is then calculated from the corresponding normal distribution. The calculator searches over integer cluster counts until the requested power is reached.

Important scope

This calculator is specifically for a complete, cross-sectional stepped-wedge design with equal allocation to sequences and an exchangeable ICC. Stepped-wedge trials can also use closed-cohort designs, nested or time-decaying correlation structures, unequal sequence allocation, transition periods, binary outcomes, count outcomes, and other analysis models. Those features require different assumptions and are not silently substituted here.

Worked validation example

A Published worked example example based on Hemming and Taljaard (2016) uses a standardized mean difference of 0.20, standard deviation 1, alpha 0.05, 10 total clusters, five steps, and cluster-period sizes of 17 or 50, with ICC values of 0.01 or 0.10. the relevant methodological literature reports powers of 55%, 49%, 91%, and 90% for those four combinations.

The calculation architecture here is independently implemented using the underlying stepped-wedge information matrix rather than copying rounded results from software output. For a given design, the displayed power is recalculated from the matrix-derived treatment-effect variance, and the sample-size search selects the first integer cluster count satisfying the requested power.

References

Hussey, M. A., & Hughes, J. P. (2007). Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials, 28(2), 182–191. DOI: 10.1016/j.cct.2006.05.007.

Hemming, K., & Taljaard, M. (2016). Sample size calculations for stepped wedge and cluster randomised trials: a unified approach. Journal of Clinical Epidemiology, 69, 137–146.

Hemming, K., et al. (2020). A tutorial on sample size calculation for multiple-period cluster randomized parallel, cross-over and stepped-wedge trials using the Shiny CRT Calculator. International Journal of Epidemiology.

Ouyang, Y., Li, F., Preisser, J. S., & Taljaard, M. (2022). Sample size calculators for planning stepped-wedge cluster randomized trials: a review and comparison. International Journal of Epidemiology, 51(6), 2000–2013.