Free tool · Sample sizeUpdated October 6, 2026

Survival analysis sample size calculator for the log-rank test

Time-to-event trials are powered by events, not participants. Enter the hazard ratio you want to detect, alpha and power to get the number of events needed for a 1:1 log-rank comparison, then convert it to a total sample size from your expected event probability.

  • Schoenfeld events, 1:1 allocation
  • Total N from event probability
  • Runs in your browser

Free sandbox · No credit card · 21 CFR Part 11 aligned

Events required by hazard ratio (two-sided alpha 0.05, 80% power)

Events for HR = 0.70

247 / 700

HR 0.60 to 0.70 (about 121 to 247)
0-100 HR 0.50 or lower (about 66 events)100-300 HR 0.60 to 0.70 (about 121 to 247)300-700 HR 0.75 to 0.80 (about 380 to 631)
Total N if 60% have an event412
Total N if 40% have an event618
Illustrative. Events drive power; participants only supply them.

Free tool

Calculate required events and participants

Enter the hazard ratio, alpha, power and your expected overall event probability. It runs in your browser; nothing is saved or sent. A planning aid, not validated software.

%
Events required
247
Schoenfeld, 1:1 allocation, log-rank test
Participants to enrol
412
events ÷ event probability, rounded to an even number

d = 4(z₁₋α/₂ + z₁₋β)² / ln(HR)². Ignores staggered entry and loss to follow-up; a statistician should confirm the final number.

What this calculator gives you

  • The number of events (deaths, progressions, relapses, or whichever event defines your endpoint) needed for a two-sided 1:1 log-rank test.
  • The formula is Schoenfeld: events = 4 x (z for alpha/2 + z for power)^2 / (ln HR)^2.
  • Total participants = events / overall event probability. A smaller effect or fewer events per participant means a bigger trial.
  • Power depends on events, so longer follow-up or a higher-risk population can substitute for more participants.
  • It assumes proportional hazards and equal allocation. Anything more complex needs a statistician.

The method

How the Schoenfeld events formula works

In a trial with a binary outcome you count responders in each arm, and sample size is a function of participants. In a survival trial the outcome is the time until an event, and many participants will not have had the event by the time you analyse (they are censored). The information in the data comes from the events, so the log-rank test is powered by the number of events observed, not the number of participants enrolled.

Schoenfeld showed that, under proportional hazards, the log-rank statistic has a variance that depends on the number of events. For a two-sided test at significance level alpha, power 1 - beta and 1:1 allocation, the required number of events is d = 4 x (z(1 - alpha/2) + z(1 - beta))^2 / (ln HR)^2, where HR is the hazard ratio you want to detect and ln is the natural logarithm. For alpha 0.05 and 80% power the z values are 1.960 and 0.842, so the numerator is 4 x 7.85 = 31.4.

Plug in HR = 0.70 and the denominator is (ln 0.70)^2 = 0.127, so d = 31.4 / 0.127 = 247 events, rounded up. HR = 0.50 needs only about 66 events, because a large effect shows up quickly; HR = 0.80 needs about 631. Moving to 90% power at HR = 0.70 raises the requirement to about 331 events. Notice how strongly the requirement depends on the hazard ratio: halving the effect size roughly quadruples the events.

From events to participants

Events are not participants. To convert, you need the probability that a participant has the event during the study, averaged over both arms. If you expect 60% overall to have an event by the end of follow-up, you need about 247 / 0.60 = 412 participants for HR = 0.70. If only 40% will, you need about 618. Estimating the overall event probability is the real planning task: it depends on the control arm event rate, the effect of treatment, how long you recruit, how long you follow people and how many are lost to follow-up.

This is why survival trials are often described by two durations: an accrual period during which participants are recruited and a follow-up period after the last participant is in. Extending follow-up increases the event probability and so reduces the number of participants needed, at the cost of a longer study. The timeline calculator helps with the time side, and the cost-per-patient calculator with the money side.

Reference values

Required events for common hazard ratios

Two-sided alpha 0.05, 1:1 allocation, Schoenfeld formula, rounded up.

Hazard ratioEvents at 80% powerEvents at 90% powerTotal N if 50% have an event (80% power)
0.506688132
0.60121162242
0.70247331494
0.806318451,262

Values are for illustration and rounding. Use the calculator for your own inputs.

Choosing inputs

Where the hazard ratio and event probability come from

The hazard ratio should be the smallest effect that would be clinically worthwhile, not the effect you hope for. Picking an optimistic hazard ratio gives an attractive small trial that is underpowered for a realistic effect. Look at earlier phase data, published trials with the same endpoint, and what clinicians and patients would regard as meaningful. See the glossary entry on minimal clinically important difference for how that idea is handled with other outcome types, and clinical trial endpoints for how time-to-event endpoints such as overall survival and progression-free survival differ.

The overall event probability is the second weak point. A median survival or event-free rate from the control arm of a comparable study is a starting point, and you adjust it for your planned accrual and follow-up. Be cautious: event rates in trials are often lower than in historical data, because trial populations tend to be healthier or better monitored. Plan with a range and see how the total changes.

Remember that an event-driven trial is not finished when the last participant is enrolled. The analysis happens when the target number of events has occurred, which means your data management has to count events promptly and consistently. Event definitions, adjudication and the date of the event all need clear rules in the protocol and the CRF. In Capture, you can build the event and censoring forms, add edit checks for dates, and review events across sites while the study is running.

Worked example

A complete example, from hazard ratio to enrolment

Suppose a trial wants to detect a hazard ratio of 0.70 with a two-sided alpha of 0.05 and 90% power. The Schoenfeld formula gives about 331 events. The team expects that 55% of participants will have an event by the time of the final analysis, so it needs 331 / 0.55 = 602 participants. If the same team accepted 80% power, it would need 247 events and 450 participants, which is 152 fewer, but the chance of missing a true effect rises from 10% to 20%. Seeing the trade-off in numbers is the main use of the calculator.

Then test the assumptions that carry the result. If the event probability turns out to be 45% instead of 55%, the requirement becomes 736 participants for 90% power. If the true hazard ratio is 0.75 rather than 0.70, you need roughly 508 events instead of 331. Planning a range, with a base case and a pessimistic case, is more honest than a single number.

Build the event forms and track events by site

Create eCRFs, test edit checks and try the dashboards in the free sandbox. No credit card. You pay only when you go live.

Plan the study in the free sandbox

Assumptions and limits

When to use a statistician

The calculator assumes proportional hazards (the hazard ratio is constant over time), 1:1 allocation, a two-sided test, independent censoring and a single primary comparison. Real survival data often breaks these assumptions: curves cross (as with some immunotherapies, where benefit is delayed), allocation is unequal, there are several treatment arms, interim analyses spend alpha, or the endpoint has competing risks. In each case a different method or simulation is needed, such as weighted log-rank tests, restricted mean survival time or group sequential designs.

It does not compute the accrual and follow-up schedule needed to reach the event target; it uses the event probability you provide. It also does not handle non-inferiority margins, cure fractions, stratified analyses, cluster designs or Bayesian approaches. The Bayesian clinical trial design guide explains where those differ.

Involve a biostatistician before the sample size goes into a protocol, certainly for any study that will be submitted to a regulator or ethics committee. This calculator is a demonstration and planning aid, not validated software. Teams with statisticians who work in SAS or R can see how data exports fit in at EDC for biostatisticians and SAS programmers. For the simpler binary-outcome case, use the sample size calculator and, for dropout inflation, the dropout-adjusted calculator.

Before you lock the design

Survival trial planning checklist

Event defined precisely

Protocol and CRF state what counts as an event and who confirms it.

Smallest worthwhile hazard ratio

Agreed with clinicians, not the most optimistic estimate.

Event probability estimated

From control arm data, with accrual and follow-up stated.

Proportional hazards plausible

Checked with a statistician for your treatment type.

Censoring rules

Handling of withdrawal, loss to follow-up and new therapy.

Event monitoring

A way to count events during the study, by site and arm.

FAQ

Questions teams ask before they switch

Something not covered here? Ask us directly.

Why does a survival trial count events, not participants?

Because the log-rank test gains information only from the participants who have the event. Participants without an event contribute censored information, so power depends on the total events observed.

What is the Schoenfeld formula?

It gives the number of events for the log-rank test under proportional hazards: 4 x (z for alpha/2 + z for power) squared, divided by the square of the natural logarithm of the hazard ratio, for 1:1 allocation.

How do I get from events to total participants?

Divide the events by the overall probability that a participant has an event during the study. If 60% are expected to have an event, divide by 0.60 and round up.

What if my hazard ratio is greater than 1?

The formula uses the size of the log hazard ratio, so a hazard ratio of 1.43 needs about the same events as 0.70. Enter the one that matches your hypothesis.

Does this handle interim analyses or unequal allocation?

No. It covers a single final analysis with equal allocation. Group sequential designs and other ratios need a statistician or specialised software.

Is this validated software?

No. It is a free planning aid that runs in your browser. Confirm the final calculation with a biostatistician before it goes into a protocol.

Count events as they happen

Free sandbox with every feature. No credit card. You pay only when you go live.

Plan the study in the free sandbox