Cox Proportional Hazards
Calculate Cox Proportional Hazards instantly with the exact formula and a worked example.
Cox Proportional Hazards
Papers usually report Cox regression results as a hazard ratio with a confidence interval. This calculator recovers the underlying coefficient β, its standard error, the z statistic and the p-value, which is useful for meta-analysis and for checking published results.
How the calculation works
The Cox proportional hazards model (D. R. Cox, 1972) writes the instantaneous risk of an event as h(t) = h₀(t) × exp(βx). The hazard ratio between groups is HR = exp(β), so β = ln HR. The confidence interval for HR is symmetric on the log scale, ln HR ± 1.96 × SE, which gives SE(β) = (ln upper − ln lower) / (2 × 1.96). The calculator then computes z = β / SE and a two-sided p = 2 × (1 − Φ(|z|)), where Φ is the standard normal distribution function. This way of getting a P value from a confidence interval is described, for example, by Altman and Bland (BMJ, 2011).
It also shows the change in hazard, (HR − 1) × 100%: an HR of 0.70 is a 30% lower hazard, 1.25 a 25% higher one. Enter the HR and the lower and upper bounds of its 95% confidence interval; the upper bound must exceed the lower one. The tool does not fit a Cox model from raw data.
Worked example
A trial reports HR = 0.70 (95% CI 0.55–0.89). β = ln 0.70 = −0.357; SE = (ln 0.89 − ln 0.55) / 3.92 = 0.481 / 3.92 = 0.123; z = −0.357 / 0.123 = −2.90; p ≈ 0.004. The hazard is 30% lower in the treated group and the difference is statistically significant. By contrast, HR 1.25 (0.95–1.64) gives z = 1.60 and p ≈ 0.11: the interval includes 1, so there is no significant effect.
Things to keep in mind
- The formula assumes a 95% interval. For a 90% CI the denominator should be 2 × 1.645, otherwise SE and p will be wrong.
- Published bounds are rounded, so the recovered p is approximate. A quick check: the HR should be close to the geometric mean of the two bounds.
- A hazard ratio compares instantaneous risks, not the share of people who have the event; HR 0.70 does not mean exactly 30% fewer events over the whole follow-up.
- The result is only meaningful if the proportional hazards assumption holds; authors usually test it with Schoenfeld residuals.
More about: Cox Proportional Hazards
What it calculates
The “Cox Proportional Hazards” calculator computes β Cox from 3 parameters: hazard ratio (hr), lower bound of 95% ci, upper bound of 95% ci.
A core calculation for studying, engineering tasks, and checking solutions.
Example calculation
With parameters Hazard ratio (HR) = 0.7, Lower bound of 95% CI = 0.55, Upper bound of 95% CI = 0.89 the result is -0.3567.
How to use
- Enter hazard ratio (hr), lower bound of 95% ci and upper bound of 95% ci — each field above is adjustable with a slider.
- β Cox is calculated automatically as you type.
- Check the worked example below to see the formula applied to real numbers.
- Copy the result or bookmark this calculator.
Related calculators
FAQ
Why would I need β when I already have the HR?
Why doesn’t my p-value match the paper?
What does a negative β mean?
More calculators in this category
Explore related free tools