Log-rank sample size and power calculator
A survival trial is powered by the number of events, not patients. Enter the hazard ratio you want to detect, power and α to get the events needed (Schoenfeld's formula), then the patients needed given the control median, accrual and follow-up.
The formula
Events needed: D = (z1−α/2 + z1−β)² / (p₁ p₂ (ln HR)²), where p₁ and p₂ are the allocation proportions (Schoenfeld 1983). For HR 0.75, 80% power, two-sided α 0.05 and 1:1 allocation, D ≈ 380 events.
Patients needed: N = D / P(event), where P(event) is the probability that a patient has an event by the end of the study. The calculator assumes exponential survival (from the control median and the HR) and uniform accrual.
Checks before you rely on it
- Add a margin for dropout and loss to follow-up.
- If hazards are unlikely to be proportional (delayed effects), the log-rank test loses power; simulate instead.
- Take the control median from a comparable published arm. Reconstructed trial data can help.
FAQ
Why does the number of events matter more than patients?
The information in a survival comparison comes from events. Enrolling more patients or following them longer are two ways to reach the required number of events.
What is Schoenfeld's formula?
An approximation to the number of events needed for a log-rank test to detect a given hazard ratio with given power and significance level, assuming proportional hazards.
Does this account for dropout?
No. Inflate the patient number for expected dropout, for example divide by (1 − dropout rate).
Reconstruct IPD from your own figure. Upload a Kaplan–Meier plot and get curves, numbers at risk, pseudo-IPD, hazard ratios and a validation pack. Three figures a month are free.
Try the live demo Browse trial data API docs