Method document
Sample size for comparing survival across three or more groups
How many participants are needed in each of three or more groups to show that survival differs between them, from each group’s hazard ratio against the first and the first group’s survival. Covers accrual and follow-up, losses to follow-up and dropout.
https://statwisely.com/methods/survival-several-groups/
When to use it
- A multi-arm trial or a cohort split by an unordered exposure, analysed with the k-sample log-rank test or a Cox model’s global test.
Not for
- Ordered groups, such as doses, where the trend test is more powerful.
- Two groups. Use the log-rank test.
Notation
- Participants in each group
- Number of groups
- All participants, g n
- Survival in the first (reference) group at the end of the study
- Expected Cox information per participant, a matrix for several log hazard ratios
- Accrual period and additional follow-up after it
- Loss-to-follow-up hazard
- Chance of a competing event by the end of the study, and its hazard
- Log hazard ratios of the g − 1 other groups against the first
- Significance level: the chance of a false positive
- Power: the chance of detecting the effect if it is real
- Expected dropout
Formulas
Noncentral chi-square power
Each event contributes the hazard-weighted covariance of the group indicators (or scores) among those still at risk; I integrates that over follow-up, with exponential survival censored at the end of the study and by any losses. At no effect it is the share with an event times the indicators’ multinomial covariance, which is the k-sample log-rank test’s information [1].
Competing risks
Optional. A competing event ends follow-up for the event of interest, so for a cause-specific hazard ratio it acts as one more censoring hazard μ over the study horizon H (the accrual plus follow-up, or one study period). The events of interest needed are unchanged; fewer participants have one, so more are needed [3]. A subdistribution (Fine–Gray) hazard ratio is a different estimand.
Dropout
Applied last, to the participants actually recruited.
Parameters
Hazard ratio of each group against the first
Values: At least two, above 0, not all 1
The smallest pattern of differences worth detecting.
Survival in the first group
Values: Between 0 and 1
The share of the first (reference) group expected to be event-free at the end of the study.
Accrual periodOptional
Values: 0 or more, with the follow-up
How long recruitment lasts; entry is taken as uniform over it, as in the log-rank calculation [2].
Follow-up after accrualOptional
Values: 0 or more, with the accrual
How long the study continues after the last participant joins.
Loss-to-follow-up rateOptional
Values: 0 or more, per unit of time; needs accrual and follow-up
Participants lost cannot have the event, so they lower the events.
Chance of a competing eventOptional
Values: At least 0 and below 1; 0 by default
The share expected to have an event that ends follow-up for the event of interest by the end of the study, such as death from another cause.
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.
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.
Assumptions
- The groups are equal in size and independent; hazards are proportional, with exponential survival censored at the end of the study and by any stated losses.
- Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.
Worked examples
Three arms
Hazard ratios of 0.8 and 0.65 against a first group with 0.6 event-free: 310 per group, with 316 events expected, give 80% power on 2 degrees of freedom.
Events: 316 · 310 per group · Total: 930
Open this example in the calculatorProtocol statement
To detect hazard ratios of 0.8, 0.65 against the first group with 80% power at a significance level of 0.05, using a test that survival is the same in all 3 groups (Cox Wald or k-sample log-rank), and assuming 60% of the first group event-free at the end of the study, 316 events are required; with an expected event probability of 33.93%, the required sample size is 310 per group (930 in total, across 3 groups). Calculated with StatWisely (statwisely.com) using: N: noncentral χ² power on g-1 df, λ=N·β'Iβ, I the Cox information matrix per participant. These are planning estimates; confirm the final design with a qualified statistician.
Recruitment over two years
Recruiting over 2 years with 3 more of follow-up and losses at 0.05 a year leaves fewer events per participant: 410 per group for the same 316 events.
Events: 316 · 410 per group · Total: 1230
Open this example in the calculatorFour groups, one unaffected
Hazard ratios of 1, 0.75 and 0.8 on 3 degrees of freedom: 455 per group.
Events: 662 · 455 per group · Total: 1820
Open this example in the calculatorValidation
- 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.
- At no effect the information is that of the k-sample log-rank test. Cox models fitted to simulated trials at the planned sizes, tested with the Wald global test, gave power of 0.79 to 0.80 against a target of 0.80, with and without uniform entry and losses.
How to cite
StatWisely. Sample size for comparing survival across three or more groups. Method document, engine version 1.0.0, reviewed 2026-10-10. https://statwisely.com/methods/survival-several-groups/
Cite the original references for the formulas your design uses as well.
References
- 1.Collett D. Modelling Survival Data in Medical Research. 3rd ed. Boca Raton: CRC Press; 2015.
- 2.Lachin JM, Foulkes MA. Evaluation of sample size and power for analyses of survival with allowance for nonuniform patient entry, losses to follow-up, noncompliance, and stratification. Biometrics. 1986;42(3):507–519.
- 3.Pintilie M. Dealing with competing risks: testing covariates and calculating sample size. Statistics in Medicine. 2002;21(22):3317–3324.