Skip to main content

    Method document

    Achieved power for Cox regression

    Calculates the power to detect a hazard ratio for a binary exposure in Cox regression, from the number of events, adjusted for its correlation with other covariates.

    Engine version 1.0.0 · Reviewed 3 October 2026

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

    When to use it

    • Assess an adjusted survival analysis, observational or trial, at the number of events expected.

    Not for

    • The more the other covariates predict the exposure, the more events the same power costs.

    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).
    RX∣Z2R^2_{X|Z}
    R² of the exposure on the other covariates.

    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(1−RX∣Z2)−z1−α/tails1)+Itails=2 Φ ⁣(−∣ln⁡HR∣D c1c2(1−RX∣Z2)−z1−α/tails1)\text{Power}=\Phi\!\left(\frac{|\ln \mathrm{HR}|\sqrt{D\,c_1c_2(1-R^2_{X|Z})}-z_{1-\alpha/\text{tails}}}{1}\right)+I_{\text{tails}=2}\,\Phi\!\left(\frac{-|\ln \mathrm{HR}|\sqrt{D\,c_1c_2(1-R^2_{X|Z})}-z_{1-\alpha/\text{tails}}}{1}\right)

    Schoenfeld’s formula with Hsieh and Lavori’s variance inflation, 1/(1 − R²) [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.

    R² with other predictorsRX∣Z2R^2_{X|Z}Optional

    Values: At least 0, below 1

    How well the other covariates explain this predictor; 0 when it is the only one.

    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 300 events, 2:1 allocation, HR = 0.70, and R² = 0.20 with other covariates at α = 0.05: the 300 events count as 240.

    Needed for analysis: 300 · To approach: 900

    Open this example in the calculator

    Validation

    • Power is the Cox-regression 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 Cox regression. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-cox/

    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.Hsieh FY, Lavori PW. Sample-size calculations for the Cox proportional hazards regression model with nonbinary covariates. Controlled Clinical Trials. 2000;21(6):552–560.
    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.