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

Cluster Randomized and Multi-Level Designs

Cluster Randomized Trial Sample Size Calculator

Sample size planning for a parallel two-group cluster-randomized trial with a continuous outcome. Calculates the required number of clusters per arm while accounting for the intracluster correlation coefficient (ICC), average cluster size, and variation in cluster size. Runs entirely in your browser.

Study Design

Enter the assumptions for a two-sided comparison of two cluster-randomized means.

Required Sample Size

The calculation searches over integer numbers of clusters and returns the smallest design meeting the requested power.
Enter your design assumptions and click Calculate Sample Size.

Methodology

This calculator implements the method documented in the statistical literature/this method for Tests for Two Means in a Cluster-Randomized Design. Whole clusters are randomized to treatment or control, while the continuous outcome is measured on individuals within those clusters. The calculation uses a modified two-sample t-test with the degrees of freedom based on the total number of subjects.

Variance inflation from clustering

For group i, the variance of the estimated group mean is approximated from the subject-level variance, the design effect, the relative efficiency associated with unequal cluster sizes, the number of clusters, and the average cluster size.

Vi = σ2 × DEi × REi / (KiMi)

DEi = 1 + (Mi − 1)ρ

λi = Miρ / (Miρ + 1 − ρ)

REi = 1 / [1 − COV2λi(1 − λi)]

Here, ρ is the intracluster correlation coefficient, M is the average cluster size, and COV is the coefficient of variation of cluster sizes. The design effect accounts for correlation among subjects within the same cluster. The relative-efficiency term inflates the variance when cluster sizes vary rather than remaining equal.

Test statistic and power

For equal numbers of clusters in the two arms, the standard error of the difference in means is √(V1 + V2). The noncentrality parameter is therefore the assumed mean difference divided by this standard error. The two-sided critical value comes from the central t distribution with degrees of freedom equal to the total number of subjects minus two.

SE(δ) = √(V1 + V2)

Δ = δ / SE(δ)

DF = K1M1 + K2M2 − 2

Power = P(T > t1−α/2,DF) + P(T < −t1−α/2,DF)

The calculator evaluates the power using the noncentral t distribution and searches upward over the integer number of clusters per arm until the requested power is reached. This is important because cluster counts must ultimately be whole numbers.

Worked validation example

the relevant methodological literature provides a validation example based on Campbell and Walters (2014). With a two-sided α = 0.05, target power of 0.90, mean difference δ = 0.3247, standard deviation σ = 1, ICC ρ = 0.05, average cluster size M = 10, and COV = 0, the smallest number of clusters per arm is 29. This gives 29 clusters in each arm, 58 total clusters, 290 subjects per arm, and 580 subjects overall.

When the same assumptions are used with COV = 0.725, the this method validation example gives 33 clusters per arm, or 66 clusters and 660 subjects overall. The implementation here reproduces those results.

Validation 1: COV = 0 → 29 clusters/arm → power ≈ 0.9000

Validation 2: COV = 0.725 → 33 clusters/arm → power ≈ 0.9009

Important interpretation

The result is the required number of randomized clusters, not merely the number of individual participants. Because subjects within the same cluster are correlated, simply applying an ordinary individually randomized two-sample t-test sample size will generally underestimate the required trial size when the ICC is positive. Variation in cluster sizes can require additional clusters as well.

References

  1. the software, LLC. Tests for Two Means in a Cluster-Randomized Design, this method Sample Size Software, Chapter 482. The documentation describes the design-effect and relative-efficiency formulation, noncentral-t power calculation, and validation examples.
    this method procedure documentation
  2. Ahn, C., Heo, M., & Zhang, S. (2015). Sample Size Calculations for Clustered and Longitudinal Outcomes in Clinical Research. CRC Press, New York.
  3. Campbell, M. J., & Walters, S. J. (2014). How to Design, Analyse and Report Cluster Randomised Trials in Medicine and Health Related Research. Wiley, New York.
  4. Donner, A., & Klar, N. (1996). Statistical considerations in the design and analysis of community intervention trials. Journal of Clinical Epidemiology, 49(4), 435–439.
  5. Liu, H., & colleagues. The standard cluster-randomized continuous-outcome formulation is also reviewed in methodological literature on sample-size determination for cluster randomized trials.