Method document
Sample size for comparing two Poisson rates
How many participants are needed in each of two groups to show that the rate of a counted event, such as exacerbations or falls, differs between them, from the two rates and the follow-up per participant. Covers unequal groups, one- or two-sided tests, clustering and dropout.
https://statwisely.com/methods/rates-ratio/
When to use it
- A trial whose outcome is a count of events over follow-up, analysed as a rate ratio.
Not for
- Counts that vary more between participants than a Poisson process allows, which is usual. Use quasi-Poisson or the negative binomial.
Notation
- Participants in groups 1 (treatment) and 2 (comparator)
- Event rates per unit of time in groups 1 and 2
- Follow-up time per participant
- Allocation ratio n₂ / n₁
- Significance level: the chance of a false positive
- Power: the chance of detecting the effect if it is real
- Number of tails: 2 for a two-sided test, 1 for one-sided
- Intracluster correlation coefficient (ICC)
- Average number of participants per cluster
- Coefficient of variation of cluster size
- Clusters per group
- Expected loss of whole clusters
- Expected dropout
Formulas
Participants in group 1
The test of the log rate ratio. Its variance falls with the expected number of events, so longer follow-up and more participants are interchangeable [1]. The calculator solves the test’s power function exactly for n₁; the formula shown is its large-sample form, which agrees to within a participant or two.
Clustering
When participants are recruited or randomised in clusters, observations within a cluster repeat information, and the sample is multiplied by the design effect. With equal clusters (CV = 0) this is 1 + (m − 1)ρ [2, 3].
Few clusters
Optional. A cluster trial is analysed on cluster-level summaries, so its critical values come from t on 2(C − 1) degrees of freedom rather than the normal distribution. With few clusters this costs participants; because C depends on the sample, it is iterated until it settles [4].
All adjustments together
The adjustments multiply, in this order, and the result is rounded up once. Any adjustment not used contributes a factor of 1.
Dropout
Applied last, to the participants actually recruited.
Clusters to recruit
Per group. Losing a whole cluster loses every participant in it, so an expected loss of clusters inflates the clusters recruited rather than the participants.
Parameters
Rate in the treatment group
Values: Above 0, events per unit of time
The rate you expect with the intervention, in the same time unit as the follow-up.
Rate in the comparator group
Values: Above 0, different from λ₁
From routine data or previous studies.
Follow-up per participant
Values: Above 0, in the rates’ time unit
Doubling the follow-up buys roughly the same information as doubling the participants, for a Poisson outcome.
Allocation ratioOptional
Values: Above 0; 1 for equal groups
The planned size of group 2 divided by group 1.
Significance level
Values: Between 0 and 1; usually 0.05
The false-positive rate you accept. A smaller α, for example to allow for several primary outcomes, needs a larger sample.
Power
Values: Between 0 and 1; usually 0.80 or 0.90
The chance of a significant result if the assumed effect is real. Funders and ethics committees commonly expect at least 0.80.
One- or two-sided
Values: 2 (two-sided) or 1 (one-sided)
Two-sided is the default. A one-sided test is justified only when an effect in the other direction would be treated exactly as no effect, and should be stated in advance.
Expected dropoutOptional
Values: 0% up to, but not including, 100%
The share of participants expected to provide no outcome, from comparable studies. Recruiting more restores the numbers, not the comparability of the groups: if dropout is related to the outcome, the estimate can still be biased.
Intracluster correlation (ICC)Optional
Values: From 0 to 1
For clustered designs only. Published ICCs for health outcomes in primary-care and community clusters are mostly small, often below 0.05 [5]; prefer an estimate from a comparable trial.
Average cluster sizeOptional
Values: At least 1
The average number of participants per cluster. Given with the ICC.
Variation in cluster sizeOptional
Values: 0 or more; 0 for equal clusters
The SD of cluster sizes divided by their mean. Unequal clusters cost power on their own account [3].
Expected loss of whole clustersOptional
Values: 0% up to, but not including, 100%
Clusters, such as practices or schools, expected to withdraw entirely.
Correction for few clustersOptional
Values: On or off
Worth applying when there are few clusters per group, roughly fewer than 15–20.
Assumptions
- Participants are independent apart from any clustering specified, each followed for the same time.
- Events follow a Poisson process with the same rate for everyone in a group.
- With clustering: clusters are independent, with the same ICC throughout, and the analysis accounts for the clustering, for example with a mixed model or cluster-level summaries [2].
- Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.
Worked examples
A 20% lower rate
0.8 against 1 events per year, one year each, α = 0.05 two-sided, 80% power: (2.80)² × (1/0.8 + 1/1.0) / (ln 0.8)² = 354.7, and solving exactly gives 355 per group.
Group 1: 355 · Group 2: 355 · Total: 710
Open this example in the calculatorProtocol statement
To detect a difference between rates of 0.8 and 1 per unit of time with 80% power at a two-sided significance level of 0.05, using a comparison of two Poisson rates, and assuming follow-up of 1 per participant, the required sample size is 355 per group (710 in total). Calculated with StatWisely (statwisely.com) using: n₁: solve the log rate-ratio z test for λ₁, λ₂, exposure and allocation. These are planning estimates; confirm the final design with a qualified statistician.
Two years of follow-up
Following each participant for 2 years halves the participants: 178 per group.
Group 1: 178 · Group 2: 178 · Total: 356
Open this example in the calculatorOne-sided
Testing only for a reduction: 280 per group.
Group 1: 280 · Group 2: 280 · Total: 560
Open this example in the calculatorA cluster-randomised trial
Clusters of 20 with ICC 0.02: DE = 1.38, so 355 × 1.38 = 489.9, rounded up to 490 per group.
Group 1: 490 · Group 2: 490 · Total: 980
Open this example in the calculatorProtocol statement
To detect a difference between rates of 0.8 and 1 per unit of time with 80% power at a two-sided significance level of 0.05, using a comparison of two Poisson rates, and assuming follow-up of 1 per participant, the test itself needs 355 per group. With clustering (ICC 0.02, an average of 20 per cluster; design effect 1.38), the required sample size is 490 per group (980 in total), in 25 clusters per group. Calculated with StatWisely (statwisely.com) using: n₁: solve the log rate-ratio z test for λ₁, λ₂, exposure and allocation; clustered: n x DE, DE = 1 + (m-1)ρ. These are planning estimates; confirm the final design with a qualified statistician.
Validation
- Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
- An independent implementation in R recomputes this test every night and before each production release, and the results are compared with the engine’s.
How to cite
StatWisely. Sample size for comparing two Poisson rates. Method document, engine version 1.0.0, reviewed 2026-10-01. https://statwisely.com/methods/rates-ratio/
Cite the original references for the formulas your design uses as well.
References
- 1.Gu K, Ng HKT, Tang ML, Schucany WR. Testing the ratio of two Poisson rates. Biometrical Journal. 2008;50(2):283–298.
- 2.Donner A, Klar N. Design and Analysis of Cluster Randomization Trials in Health Research. London: Arnold; 2000.
- 3.Eldridge SM, Ashby D, Kerry S. Sample size for cluster randomized trials: effect of coefficient of variation of cluster size and analysis method. International Journal of Epidemiology. 2006;35(5):1292–1300. doi:10.1093/ije/dyl129
- 4.Hayes RJ, Moulton LH. Cluster Randomised Trials. 2nd ed. Boca Raton: CRC Press; 2017.
- 5.Adams G, Gulliford MC, Ukoumunne OC, Eldridge S, Chinn S, Campbell MJ. Patterns of intra-cluster correlation from primary care research to inform study design and analysis. Journal of Clinical Epidemiology. 2004;57(8):785–794. doi:10.1016/j.jclinepi.2003.12.013