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.
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
- Events across both arms.
- Participants across both arms, when given instead of events.
- Control survival at the end of follow-up.
- Hazard ratio, treatment to control.
- Allocation ratio, treatment to control.
- Shares in each arm, 1/(1 + k) and k/(1 + k).
- R² of the exposure on the other covariates.
Formulas
Events from participants
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
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.
Parameters
Number of events, or of participants
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)Optional
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)Optional
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)Optional
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)Optional
Values: 0 or more per unit of time
On the same time scale as the periods; it needs both of them.
Allocation ratioOptional
Values: Positive; 1 for equal groups
Treatment participants per control participant.
Hazard ratio
Values: Positive, not 1
Treatment hazard divided by control hazard.
R² with other predictorsOptional
Values: At least 0, below 1
How well the other covariates explain this predictor; 0 when it is the only one.
Significance level
Values: Between 0 and 1
The type I error rate for the specified test.
Test direction
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 calculatorValidation
- 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.Schoenfeld DA. Sample-size formula for the proportional-hazards regression model. Biometrics. 1983;39(2):499–503.
- 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.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.