Skip to main content

    Method document

    Sample size for a difference in restricted mean survival time

    How many participants are needed to show a difference in restricted mean survival time (RMST), the average event-free time up to a chosen τ, between two groups, including when the treatment effect is delayed. Covers unequal groups, accrual and follow-up, losses, competing risks and dropout.

    Engine version 1.0.0 · Reviewed 10 October 2026

    https://statwisely.com/methods/survival-rmst/

    When to use it

    • A trial reporting the RMST difference, months of event-free time gained, as its primary or a supportive analysis when hazards may not be proportional.

    Not for

    • A τ beyond the minimum follow-up, where the Kaplan–Meier curve is too poorly estimated.

    Notation

    NN
    Number of participants
    λ\lambda
    Control hazard, from the control survival at the end of the study
    dd
    Delay after entry before the treatment effect begins
    HR\mathrm{HR}
    Hazard ratio after the delay, treatment against control
    hg, Sgh_g,\ S_g
    Hazard and survival of group g; the treated hazard is λ before d and HR·λ after it
    GG
    Chance of still being followed at time t, from entry, losses and competing events
    π0, π1\pi_0,\ \pi_1
    Shares of participants in control and treatment
    a, fa,\ f
    Accrual period and additional follow-up after it
    η\eta
    Loss-to-follow-up hazard
    c, μc,\ \mu
    Chance of a competing event by the end of the study, and its hazard
    τ\tau
    Restriction time; the minimum follow-up unless given
    Δ\Delta
    Difference in RMST, ∫₀^τ (S₁ − S₀) dt
    σg2\sigma_g^{2}
    Per-participant variance of group g’s Kaplan–Meier RMST
    α\alpha
    Significance level: the chance of a false positive
    1−β1-\beta
    Power: the chance of detecting the effect if it is real
    qq
    Expected dropout

    Formulas

    The RMST difference and its variance

    N=⌈(z1−α/2+z1−β)2 (σ02/π0+σ12/π1)Δ2⌉,σg2=∫0τ(∫tτSg)2hgSg G dtN = \left\lceil \frac{(z_{1-\alpha/2} + z_{1-\beta})^{2}\,(\sigma_0^{2}/\pi_0 + \sigma_1^{2}/\pi_1)}{\Delta^{2}} \right\rceil, \qquad \sigma_g^{2} = \int_0^{\tau} \frac{\left(\int_t^{\tau} S_g\right)^{2} h_g}{S_g\, G}\,dt

    Each group’s Kaplan–Meier RMST up to τ has the Greenwood-type variance σ²/n [1]. A delay shrinks Δ more than it shrinks the log-rank drift, so RMST usually needs more participants under a delayed effect, while reading as time gained.

    Competing risks

    μ=−ln⁡(1−c)H,η  ←  η+μ\mu = \frac{-\ln(1 - c)}{H}, \qquad \eta \;\leftarrow\; \eta + \mu

    Optional. A competing event ends follow-up for the event of interest, so for a cause-specific hazard ratio it acts as one more censoring hazard μ over the study horizon H (the accrual plus follow-up, or one study period). The events of interest needed are unchanged; fewer participants have one, so more are needed [2]. A subdistribution (Fine–Gray) hazard ratio is a different estimand.

    Dropout

    nrecruit=⌈n1−q⌉n_{\text{recruit}} = \left\lceil \frac{n}{1 - q} \right\rceil

    Applied last, to the participants actually recruited.

    Parameters

    Hazard ratio after the delayHR\mathrm{HR}

    Values: Above 0 and not 1

    The effect once it has begun; 0.7 is a 30% lower hazard from the delay on.

    Delay before the effectdd

    Values: 0 or more, before the end of the study

    From earlier trials of the same kind of treatment, often where the published Kaplan–Meier curves separate.

    Control survival at the end of the studyS0S_0

    Values: Between 0 and 1

    Sets the control hazard, taken as constant.

    Allocation ratiokkOptional

    Values: Above 0; 1 for equal groups

    Treatment participants per control participant.

    Accrual periodaaOptional

    Values: 0 or more, with the follow-up

    Entry is taken as uniform over it; without it, one study period of follow-up for everyone, in which the delay is a fraction.

    Follow-up after accrualffOptional

    Values: 0 or more, with the accrual

    Longer follow-up gives a delayed effect more time to show.

    Loss-to-follow-up rateη\etaOptional

    Values: 0 or more, per unit of time; needs accrual and follow-up

    Participants lost before the delay ends add nothing to the comparison.

    Chance of a competing eventccOptional

    Values: At least 0 and below 1; 0 by default

    The share expected to have an event that ends follow-up for the event of interest by the end of the study, such as death from another cause.

    Restriction timeτ\tauOptional

    Values: After the delay and no later than the minimum follow-up

    A clinically meaningful horizon, such as two years; later τ gains signal but loses precision.

    Significance levelα\alpha

    Values: Between 0 and 1; usually 0.05

    The false-positive rate you accept. A smaller α, for example to allow for several primary outcomes, needs a larger sample.

    Power1−β1-\beta

    Values: Between 0 and 1; usually 0.80 or 0.90

    The chance of a significant result if the assumed effect is real. Funders and ethics committees commonly expect at least 0.80.

    Expected dropoutqqOptional

    Values: 0% up to, but not including, 100%

    The share of participants expected to provide no outcome, from comparable studies. Recruiting more restores the numbers, not the comparability of the groups: if dropout is related to the outcome, the estimate can still be biased.

    Assumptions

    • Hazards are equal until the delay and in a constant ratio after it, with a constant control hazard; entry is uniform and censoring unrelated to the outcome.
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    An effect from a quarter of the way in

    HR = 0.7 from 0.25 on, τ = 1: RMSTs of 0.721 and 0.758, a difference of 0.037, so N = 2729.

    Events: 1250 · Group 1: 1365 · Group 2: 1364 · Total: 2729

    Protocol statement

    To detect the difference in restricted mean survival that a hazard ratio of 0.7 beginning 0.25 units of time after entry produces with 80% power at a two-sided significance level of 0.05, using a comparison of restricted mean survival time up to 1 units of time, and assuming 50% of the control group event-free at the end of the study and equal hazards in both groups until the delay, 1250 events are required; with an expected event probability of 45.78%, the required sample size is 1365 in the first group and 1364 in the second group (2729 in total). Calculated with StatWisely (statwisely.com) using: N = (z_(1-α/2)+z_(1-β))²(σ₀²/π₀ + σ₁²/π₁)/ΔRMST², Kaplan-Meier RMST up to τ. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    The same effect from the start

    With no delay the difference doubles to 0.071: N = 684.

    Events: 303 · Group 1: 342 · Group 2: 342 · Total: 684

    Open this example in the calculator

    Two-and-a-half-year RMST

    HR = 0.6 after 0.5 years, recruitment over 1 year, τ = 2.5 years: a gain of 0.129 years, N = 1294.

    Events: 577 · Group 1: 647 · Group 2: 647 · Total: 1294

    Open this example in the calculator

    Validation

    • Every worked example on this page is recomputed by the StatWisely engine whenever the software is built. If a number or formula here stopped matching the calculator, the release would be stopped until this document was corrected.
    • An independent implementation in R recomputes this test every night and before each production release, and the results are compared with the engine’s.
    • Simulated trials with piecewise-exponential survival, analysed with Kaplan–Meier RMST differences and Greenwood-type variances, gave power of 0.81 to 0.83 against a target of 0.80.

    How to cite

    StatWisely. Sample size for a difference in restricted mean survival time. Method document, engine version 1.0.0, reviewed 2026-10-10. https://statwisely.com/methods/survival-rmst/

    Cite the original references for the formulas your design uses as well.

    References

    1. 1.Royston P, Parmar MKB. Restricted mean survival time: an alternative to the hazard ratio for the design and analysis of randomized trials with a time-to-event outcome. BMC Medical Research Methodology. 2013;13:152. doi:10.1186/1471-2288-13-152
    2. 2.Pintilie M. Dealing with competing risks: testing covariates and calculating sample size. Statistics in Medicine. 2002;21(22):3317–3324.