Sample Size Calculator

Hazard ratio

Determines the required number of events and corresponding sample size to detect a specified hazard ratio in a time-to-event study, based on the significance level, power, and allocation between groups.

Key takeaways

  • What is calculated: Determine the required number of events and the corresponding participants.
  • Quantities you must supply: Hazard ratio to detect; Overall probability of observing an event; Significance level; Power; Allocation ratio.
  • Type of calculation: Power-based: it answers how much data is needed to detect a stated effect. Power 0.80 at α = 0.05 is the usual target; confirmatory studies use 0.90.

Method used for Hazard ratio

  • Schoenfeld proportional-hazards formula Event-driven survival calculation taking the hazard ratio and event probability directly. It separates the event calculation from any survival-distribution assumption, which is the more defensible route when external event data exist.

When to use

Use when the primary objective is to determine whether the rate of experiencing an event over time differs between two groups, expressed as a hazard ratio.

Sample size

Type I error rate.

Probability of detecting the specified effect.

A two-sided alternative splits α between both tails; a one-sided alternative places all of α in one tail, needs a smaller n, and must be pre-specified.

Set to 1 for equal group sizes.

Final n is inflated by 1/(1 − dropout).

Reset to defaults

Awaiting inputs

Set the parameters and calculate.

Methodology — Schoenfeld proportional-hazards formula

Formula used Schoenfeld proportional-hazards formula

d=(z1α/2+z1β)2q1q2[ln(HR)]2
Required events
  • z1α/2(two-sided)in place ofz1α(one-sided) Two-sided alternative selected: α is split between both tails, so the larger quantile is used and the requirement rises

where —

HR
Hazard ratio to detect, assumed constant over follow-up. > 0; must differ from 1
P(e)
Probability a subject experiences the event, across both arms. From prior trial or registry data
α
Probability of rejecting a true null hypothesis (Type I error). 0.0001 – 0.5; conventionally 0.05, or 0.025 one-sided for regulatory non-inferiority
1 − β
Probability of rejecting the null hypothesis when the specified alternative is true. 0.50 – 0.9999; conventionally 0.80 or 0.90
k
Allocation ratio n₂/n₁. 0.05 – 20; 1 gives equal groups
Expected proportion of enrolled units lost before analysis. 0 – 0.95

How this method works

The Schoenfeld formula applied without deriving the event probability from median survival times, so it can be used when that probability is known from a prior trial or registry.

The Schoenfeld formula applied directly, taking the hazard ratio and event probability as inputs rather than deriving them from medians. Appropriate when the event probability is known from a prior trial or registry, or when survival is not plausibly exponential.

Assumes proportional hazards. Sensitivity near the null is severe: moving the target from HR 0.80 to 0.75 cuts required events by about a third.

Null hypothesis. H0: HR = 1.

Alternative hypothesis. Two-sided H1: HR != 1. One-sided H1: HR < 1 or HR > 1.

Calculation procedure

  1. State the hazard ratio HR worth detecting; the calculation works on ln(HR), so 0.5 and 2.0 are equally far from no effect.
  2. Set the allocation shares q1 and q2 (both 0.5 for equal arms).
  3. Compute the events required: d=(z1α/2+z1β)2q1q2[ln(HR)]2.
  4. Convert events into subjects by dividing by the probability that an enrolled subject has the event: N=d/Pr(event).
  5. Round up, then inflate for dropout. If events accrue slowly, extend follow-up rather than analysing early.

Exact or approximate

Approximate — the standard asymptotic result for the log-rank statistic.

The formula shown always matches what was computed: when a one-sided test is selected the rendered quantile changes from z1−α/2 to z1−α, and where several methods exist, the formula follows the method selected in the calculator.

Advantages & limitations

Advantages

  • No survival-distribution assumption beyond proportional hazards.
  • Uses external event data directly.
  • Widely accepted and easily checked.

Limitations

  • Requires an event probability from elsewhere.
  • Assumes proportional hazards.
  • Highly sensitive to the hazard ratio near the null.

Assumptions

  • Hazards are proportional over follow-up.
  • The stated event probability applies to the planned study.
  • Censoring is non-informative.
  • Allocation is fixed in advance.

Applicable adjustments

Supports allocation ratio and dropout inflation.

Conclusion

Report events, participants and the source of the event probability. State that proportional hazards is assumed, since the figure depends on it.

References

  1. Schoenfeld DA. Sample-size formula for the proportional-hazards regression model. Biometrics. 1983;39(2):499–503. Link
  2. Schoenfeld DA, Richter JR. Nomograms for calculating the number of patients needed for a clinical trial with survival as an endpoint. Biometrics. 1982;38(1):163–170. Link
  3. Collett D. Modelling Survival Data in Medical Research. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2015.