Survival Analysis Power Calculator
Survival studies measure time to an event (death, relapse, churn). Power depends on the hazard ratio you want to detect, accrual period, follow-up time, and dropout rate. Specify your design and get the required events and total sample size via Schoenfeld's formula, with a Kaplan-Meier preview of the assumed curves.
Planning a time-to-event trial? Read the 4-min primer ▾
What survival power answers. A survival power calculation tells you how many subjects to enrol, and how many events (deaths, relapses, failures) to observe, before the log-rank test has a fair chance of detecting the hazard ratio you care about. Power is the probability the trial flags the difference if the difference is real; events, not patient counts, are the currency.
Hazard ratio intuition. The hazard ratio (HR) compares the instantaneous risk in the treatment arm versus the control arm. HR = 0.7 means treatment cuts the hazard by 30 percent at every moment; HR = 1 is no effect; HR = 0.5 is a strong halving of risk. Smaller deviations from 1 require dramatically more events. Halve the log HR and you roughly quadruple the events you need.
Events versus sample size. Schoenfeld's formula gives the required total events D directly, no patient count attached. To turn D into a patient count n, divide by the probability that a typical patient has an event during the study window. That probability depends on the median survival, the accrual schedule, the planned follow-up, and any losses. Long follow-up converts patients into events efficiently; short follow-up wastes them.
Picking accrual and follow-up. Two clocks run together: accrual (how long you spend recruiting) and follow-up (how long after the last enrollment you keep watching). Patients enrolled late see less follow-up, so they contribute fewer events. If recruitment is slow but the disease is fast, accrual length dominates; if the disease is slow, you need a long minimum follow-up after enrollment closes.
Try a real-world example to load.
A typical phase III oncology trial: median survival 12 months in control, 24 months accrual, 12 months follow-up, target 80% power.
Read more Anatomy of a survival power calculation
Caveats When this is the wrong tool
- If you have…
- Use instead
- Non-proportional hazards (immunotherapy crossing curves, delayed effect)
- The log-rank test loses power dramatically when the HR drifts. Use a weighted log-rank (Fleming-Harrington) or a milestone-survival comparison; closed forms above are not valid. Simulate under the assumed crossing curves.
- Competing risks
- If patients can experience an event other than the primary one (e.g. death from a second cause that censors the primary endpoint), the cause-specific hazard differs from the subdistribution hazard. Use a Fine-Gray planning calculation or simulation against the cumulative incidence function.
- Cluster-randomized survival trial
- Clinics or wards randomised as units violate independence. Inflate by the design effect or use the cluster-survival formulas of Donner-Klar; total events still drive power but the variance of the log-rank statistic must include the intracluster correlation.
- Group-sequential or adaptive design
- Interim analyses with stopping rules require alpha-spending (O'Brien-Fleming, Pocock) and an inflated maximum information target. Use
gsDesign::nSurv()or the East software; a single-look closed form will under-size the trial. - Bayesian or simulation-based planning
- If the prior on the hazard ratio is informative, a Bayesian sample size approach (assurance, expected power) can be appropriate. Simulation against the Cox model with realistic censoring patterns is usually the safest catch-all when assumptions get messy.
- Survival analysis in R with the
survivalpackage and Kaplan-Meier curves. - Cox proportional hazards model for time-to-event regression.
- Power analysis in R with the
pwrpackage for non-survival designs. - Power Analysis Calculator for t-tests, ANOVA, proportions, and correlations.
- Effect Size Converter for translating between hazard ratios, odds ratios, Cohen's d, and r.
Numerical methods: Schoenfeld (1981) closed form for events, Freedman (1982) for the alternative reference, exponential survival with uniform accrual integrated in closed form, Lakatos (1988) approximated by quadrature for dropout adjustment. Cross-checked against R packages powerSurvEpi and gsDesign.