Survival trials compare the time until an event, such as death or relapse, between two groups. The events needed calculator takes the hazard ratio, the significance level, the power, the allocation ratio and the expected proportion with the event, and gives the number of events, the total participants and the participants in each group.
How the calculation works
- Decide the hazard ratio you want to detect, the two-sided significance level and the power. The hazard ratio is the relative rate of the event in one group compared with the other.
- In a log-rank comparison, the number of events needed is given by Schoenfeld’s formula: d = (z(1−α÷2) + z(power))² × (1 + r)² ÷ (r × (ln HR)²), where r is the allocation ratio.
- The study’s power depends on the number of events, not on the number of people. To find the total number of participants, divide d by the expected proportion with the event by the end of follow-up.
- Round up. The participants are split between the two groups according to the allocation ratio.
Example
A trial wants to detect a hazard ratio of 0.70 with a two-sided α of 0.05, 90 % power and equal groups. The z values add up to 1.960 + 1.282 = 3.242. Then d = 10.508 × 4 ÷ (0.357)² = 330.4, so 331 events are needed. If 40 % of participants are expected to have the event, 828 people are needed, with 414 in each group.
Why it matters
Planning a survival study starts with the number of events. This calculator applies Schoenfeld’s formula to show how the hazard ratio and the power change that number, and then turns it into a recruitment target.
Good to know
Schoenfeld’s formula assumes proportional hazards, which means a constant hazard ratio over time, and a log-rank test. Accrual, drop-out and non-proportional effects need more detailed planning in specialized software. The expected event proportion should come from the follow-up time you plan.
Related tools
The sample size calculator covers other designs, and the median survival calculator summarizes survival from data.