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.
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
- Number of participants
- Observed events, and those expected under the reference cumulative hazard Λ₀
- Reference survival at the end of the study
- Hazard ratio of the group against the reference
- Chance that a participant has the event during follow-up
- Per-participant variance of δ − Λ₀(X), the event indicator less the expected count
- Accrual period and additional follow-up after it
- Loss-to-follow-up hazard
- Chance of a competing event by the end of the study, and its hazard
- Significance level: the chance of a false positive
- Power: the chance of detecting the effect if it is real
- Expected dropout
Formulas
Observed against expected events
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
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
Applied last, to the participants actually recruited.
Parameters
Hazard ratio against the reference
Values: Above 0 and not 1
0.7 means a 30% lower hazard than the reference curve.
Reference survival at the end of the study
Values: Between 0 and 1
From the registry or historical series the group is compared with.
Accrual periodOptional
Values: 0 or more, with the follow-up
How long recruitment lasts; entry is taken as uniform over it.
Follow-up after accrualOptional
Values: 0 or more, with the accrual
How long the study continues after the last participant joins.
Loss-to-follow-up rateOptional
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 eventOptional
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
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.
Power
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 dropoutOptional
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
Open this example in the calculatorProtocol 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.
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 calculatorTesting 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 calculatorValidation
- 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.Wu J. Sample size calculation for the one-sample log-rank test. Pharmaceutical Statistics. 2015;14(1):26–33.
- 2.Pintilie M. Dealing with competing risks: testing covariates and calculating sample size. Statistics in Medicine. 2002;21(22):3317–3324.