Skip to main content

    Method document

    Achieved power for the log-rank test

    Calculates the power of the log-rank test from the number of events, the hazard ratio, and the allocation, using Schoenfeld’s formula.

    Engine version 1.0.0 · Reviewed 3 October 2026

    https://statwisely.com/methods/power-logrank/

    When to use it

    • Assess a time-to-event trial at the number of events it expects to observe.

    Not for

    • Enter events, not participants. A trial with many participants but few events has little power.

    Notation

    DD
    Events across both arms.
    NN
    Participants across both arms, when given instead of events.
    SS
    Control survival at the end of follow-up.
    HR\mathrm{HR}
    Hazard ratio, treatment to control.
    kk
    Allocation ratio, treatment to control.
    c1,c2c_1, c_2
    Shares in each arm, 1/(1 + k) and k/(1 + k).

    Formulas

    Events from participants

    D=N[1−S1+k+k (1−SHR)1+k]D = N\left[\frac{1-S}{1+k}+\frac{k\,(1-S^{\mathrm{HR}})}{1+k}\right]

    When participants and control survival are given instead of events, the expected events follow as in the survival sample-size calculator: control survival S at the end of follow-up and S^HR under proportional hazards, weighted by the arms’ shares.

    Events with recruitment and follow-up periods

    P(λ)=λλ+η[1−e−(λ+η)F(1−e−(λ+η)A)(λ+η)A],λ0=−ln⁡SA+F,D=N[P(λ0)1+k+k P(HR λ0)1+k]P(\lambda) = \frac{\lambda}{\lambda+\eta}\left[1 - \frac{e^{-(\lambda+\eta)F}\left(1-e^{-(\lambda+\eta)A}\right)}{(\lambda+\eta)A}\right], \qquad \lambda_0 = \frac{-\ln S}{A+F}, \quad D = N\left[\frac{P(\lambda_0)}{1+k}+\frac{k\,P(\mathrm{HR}\,\lambda_0)}{1+k}\right]

    When the accrual period A and follow-up period F are given, participants enter uniformly over A and are followed for at least F, with exponential survival and losses at rate η. Control survival S is then read at A + F, and each arm’s event share is averaged over entry [3]. This is how the survival sample-size calculator converts events to participants, so the power at its answer reaches its target.

    Power, inverting the sample-size formula

    Power=Φ ⁣(∣ln⁡HR∣D c1c2−z1−α/tails1)+Itails=2 Φ ⁣(−∣ln⁡HR∣D c1c2−z1−α/tails1)\text{Power}=\Phi\!\left(\frac{|\ln \mathrm{HR}|\sqrt{D\,c_1c_2}-z_{1-\alpha/\text{tails}}}{1}\right)+I_{\text{tails}=2}\,\Phi\!\left(\frac{-|\ln \mathrm{HR}|\sqrt{D\,c_1c_2}-z_{1-\alpha/\text{tails}}}{1}\right)

    Schoenfeld’s events formula, D = (z_α + z_β)²/[c₁c₂(ln HR)²], solved for z_β [1, 2].

    Parameters

    Number of events, or of participantsDD

    Values: Integer, at least 2

    Events expected across both arms; or, with control survival given, the participants, from which the events follow.

    Control survival (optional)SSOptional

    Values: Between 0 and 1

    Give it to enter participants instead of events: the share of controls still event-free at the end of follow-up.

    Accrual period (optional)AAOptional

    Values: 0 or more, with the follow-up period

    How long recruitment lasts; participants are assumed to enter evenly over it.

    Follow-up period (optional)FFOptional

    Values: 0 or more, with the accrual period

    Follow-up after recruitment closes, so the last participant is followed for F and the first for A + F.

    Loss to follow-up rate (optional)η\etaOptional

    Values: 0 or more per unit of time

    On the same time scale as the periods; it needs both of them.

    Allocation ratiorrOptional

    Values: Positive; 1 for equal groups

    Treatment participants per control participant.

    Hazard ratioHR\mathrm{HR}

    Values: Positive, not 1

    Treatment hazard divided by control hazard.

    Significance levelα\alpha

    Values: Between 0 and 1

    The type I error rate for the specified test.

    Test directionss

    Values: 1 or 2

    One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Assumptions

    • Proportional hazards: the hazard ratio is constant over follow-up. Power depends on events, so too few events, not too few participants, is what makes a trial underpowered.
    • One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Worked examples

    A worked input set

    With 250 events, 2:1 allocation, and HR = 0.70 at α = 0.05: c₁c₂ = 2/9, so |ln 0.7|√(250 × 2/9) = 2.66.

    Needed for analysis: 250 · To approach: 750

    Open this example in the calculator

    Validation

    • Power is the log-rank sample-size formula solved for z_β, with the far tail added for a two-sided test. At the size that calculator returns it reaches the target, one fewer falls short, and it agrees with an independent calculation in R.

    How to cite

    StatWisely. Achieved power for the log-rank test. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-logrank/

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

    References

    1. 1.Schoenfeld DA. Sample-size formula for the proportional-hazards regression model. Biometrics. 1983;39(2):499–503.
    2. 2.Collett D. Modelling Survival Data in Medical Research. 3rd ed. Boca Raton: CRC Press; 2015.
    3. 3.Lachin JM, Foulkes MA. Evaluation of sample size and power for analyses of survival with allowance for nonuniform patient entry, losses to follow-up, noncompliance, and stratification. Biometrics. 1986;42(3):507–519.