Skip to main content

    Method document

    Sample size for a one-sample log-rank test

    How many participants are needed in a single group to show that its survival differs from a known reference curve, such as a registry or historical control, from the hazard ratio against that reference. Covers accrual and follow-up, losses to follow-up, competing risks and dropout.

    Engine version 1.0.0 · Reviewed 10 October 2026

    https://statwisely.com/methods/survival-one-sample/

    When to use it

    • A single-arm phase II study compared with a well-established historical survival curve.

    Not for

    • A reference that is itself uncertain or drawn from a different population; a randomised control group is then safer.

    Notation

    nn
    Number of participants
    O, EO,\ E
    Observed events, and those expected under the reference cumulative hazard Λ₀
    S0S_0
    Reference survival at the end of the study
    HR\mathrm{HR}
    Hazard ratio of the group against the reference
    PP
    Chance that a participant has the event during follow-up
    σ2\sigma^{2}
    Per-participant variance of δ − Λ₀(X), the event indicator less the expected count
    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
    α\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

    Observed against expected events

    n=⌈(z1−α/2E[Λ0(X)]+z1−β σ)2(P−E[Λ0(X)])2⌉n = \left\lceil \frac{\left(z_{1-\alpha/2}\sqrt{E[\Lambda_0(X)]} + z_{1-\beta}\,\sigma\right)^{2}}{\left(P - E[\Lambda_0(X)]\right)^{2}} \right\rceil

    The test is Z = (O − E)/√E. With an exponential reference and a true hazard HR times it, each participant adds P − E[Λ₀(X)] = P(1 − 1/HR) to O − E on average, with variance σ²; both are integrated over follow-up, with uniform entry and losses where given [1].

    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 against the referenceHR\mathrm{HR}

    Values: Above 0 and not 1

    0.7 means a 30% lower hazard than the reference curve.

    Reference survival at the end of the studyS0S_0

    Values: Between 0 and 1

    From the registry or historical series the group is compared with.

    Accrual periodaaOptional

    Values: 0 or more, with the follow-up

    How long recruitment lasts; entry is taken as uniform over it.

    Follow-up after accrualffOptional

    Values: 0 or more, with the accrual

    How long the study continues after the last participant joins.

    Loss-to-follow-up rateη\etaOptional

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

    Participants lost stop adding to both O and E.

    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.

    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

    • The reference curve is known, not estimated, and exponential; the group’s hazard is a constant multiple of it.
    • Dropout is unrelated to the outcome; recruiting more participants restores the numbers but cannot remove bias.

    Worked examples

    A 30% lower hazard than the reference

    HR = 0.7 against a reference survival of 0.5: P = 0.384 and E[Λ₀(X)] = 0.549, σ² = 0.462, so n = (1.96 × 0.741 + 0.842 × 0.680)² / 0.165² = 151.0, rounded up to 152, with 59 events.

    Events: 59 · Sample size: 152

    Protocol statement

    To detect a hazard ratio of 0.7 against the reference with 80% power at a two-sided significance level of 0.05, using a one-sample log-rank test against a reference survival curve, and assuming a reference survival of 50% at the end of the study, 59 events are required; with an expected event probability of 38.44%, the required sample size is 152 participants. Calculated with StatWisely (statwisely.com) using: n = (z_(1-α/2)√E[Λ₀(X)] + z_(1-β)σ)²/(P - E[Λ₀(X)])², one-sample log-rank. These are planning estimates; confirm the final design with a qualified statistician.

    Open this example in the calculator

    Recruitment over two years

    Recruiting over 2 years with 3 more of follow-up and losses at 0.05 a year: n = 197.

    Events: 58 · Sample size: 197

    Open this example in the calculator

    Testing for a higher hazard

    HR = 1.3 against a reference survival of 0.6: n = 243.

    Events: 118 · Sample size: 243

    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 single-arm studies at the planned sizes, tested with (O − E)/√E against the true reference, gave power of 0.80 to 0.81 against a target of 0.80, with and without uniform entry and losses.

    How to cite

    StatWisely. Sample size for a one-sample log-rank test. Method document, engine version 1.0.0, reviewed 2026-10-10. https://statwisely.com/methods/survival-one-sample/

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

    References

    1. 1.Wu J. Sample size calculation for the one-sample log-rank test. Pharmaceutical Statistics. 2015;14(1):26–33.
    2. 2.Pintilie M. Dealing with competing risks: testing covariates and calculating sample size. Statistics in Medicine. 2002;21(22):3317–3324.