Hazard Ratio 95% Confidence Interval Explained
- 95% CI lower bound
- Result
- 95% CI upper bound
- Result
- Median survival, group A
- 12 months
- You entered
A hazard ratio with a 95% confidence interval is a measure from survival analysis that compares the rate of an event (like death, relapse, or failure) between two groups over time. The hazard ratio itself estimates how much more (or less) likely the event is in one group relative to another at any given moment, and the 95% confidence interval gives the range of plausible values for that ratio, indicating the precision of the estimate. If the interval includes 1, the difference between groups is not statistically significant at the 5% level.
Formula
The hazard ratio is typically estimated from a Cox proportional hazards model, but a simple approximation can be made from median survival times. The formula for the hazard ratio (HR) comparing group A to group B is:
HR = (median survival of group B) / (median survival of group A)
This is based on the exponential survival model, where the hazard rate is the reciprocal of the mean survival time. The 95% confidence interval for the log hazard ratio is:
ln(HR) ± 1.96 × SE(ln(HR))
where SE(ln(HR)) is the standard error of the log hazard ratio. For the approximation using medians, the standard error can be estimated as:
SE(ln(HR)) = sqrt(1/t² + 1/d²)
where t is the median survival time for group A and d is the median survival time for group B (both in the same time unit). The confidence interval is then exponentiated to get back to the hazard ratio scale.
Worked Example
Suppose you have two treatments for a disease. The median survival time for group A (standard treatment) is 12 months, and for group B (new treatment) is 18 months. Using the default values from the calculator:
- Hazard ratio (A vs B) = 18 / 12 = 1.50
- ln(HR) = ln(1.50) = 0.4055
- SE(ln(HR)) = sqrt(1/12² + 1/18²) = sqrt(0.00694 + 0.00309) = sqrt(0.01003) = 0.1001
- Lower bound of ln(HR) = 0.4055 – 1.96 × 0.1001 = 0.4055 – 0.1962 = 0.2093
- Upper bound of ln(HR) = 0.4055 + 1.96 × 0.1001 = 0.4055 + 0.1962 = 0.6017
- 95% CI for HR = exp(0.2093) to exp(0.6017) = 1.23 to 1.83
So the hazard ratio is 1.50 with a 95% confidence interval of 1.23 to 1.83. Since the interval does not include 1, the difference is statistically significant at the 5% level.
What the Hazard Ratio Tells You
The hazard ratio is a relative measure: it compares the instantaneous event rate in one group to another. A hazard ratio of 1 means no difference; a hazard ratio greater than 1 means the event is more likely in the numerator group; less than 1 means the event is less likely. For example, an HR of 0.75 means a 25% reduction in the hazard (risk) of the event. It is important to note that the hazard ratio is not the same as the relative risk (cumulative incidence ratio) because it accounts for the timing of events, not just the total number.
How to Read the 95% Confidence Interval
The 95% confidence interval provides a range of values that is likely to contain the true hazard ratio with 95% confidence. If the interval is wide, the estimate is imprecise—often due to a small sample size or few events. If the interval is narrow, the estimate is more precise. The key threshold is 1: if the interval includes 1, you cannot conclude a statistically significant difference. For example, an HR of 1.2 with a 95% CI of 0.9 to 1.6 is not significant, while an HR of 1.2 with a 95% CI of 1.01 to 1.4 is significant.
Common Mistakes and Misconceptions
- Confusing hazard ratio with relative risk: The hazard ratio is a rate ratio, not a risk ratio. It compares instantaneous rates, not cumulative probabilities.
- Ignoring the confidence interval: Reporting only the point estimate (e.g., HR=1.5) without the CI omits crucial information about precision.
- Misinterpreting the CI as a probability: The 95% CI does not mean there is a 95% chance the true value lies within the interval. It means that if you repeated the study many times, 95% of the calculated intervals would contain the true value.
- Using the wrong formula for the SE: The approximation used here assumes exponential survival and equal follow-up. In practice, the SE is computed from the Cox model and may differ.
Limitations of This Approximation
This calculator provides a quick approximation using median survival times, which is only valid under the exponential survival assumption (constant hazard over time). Real survival data often have varying hazards, and the Cox model is the standard method. The approximation also assumes that both groups have complete follow-up and that the medians are accurately estimated. For published studies, always use the hazard ratio and CI reported in the paper, not this approximation.
Frequently Asked Questions
Q: What does a hazard ratio of 0.5 mean?
A: A hazard ratio of 0.5 means the event rate in the treatment group is half that of the control group at any given time point. This is often interpreted as a 50% reduction in risk, but it is a rate reduction, not a cumulative risk reduction.
Q: Why is the confidence interval so wide?
A: A wide confidence interval indicates imprecision, often due to a small number of events or a small sample size. The width is influenced by the standard error, which decreases with more events and longer follow-up.
Q: Can the hazard ratio be negative?
A: No. The hazard ratio is a ratio of rates, so it must be positive. A negative value would be meaningless. If you see a negative number, it is likely a mistake in calculation.
Q: How do I interpret a hazard ratio with a CI that includes 1?
A: If the 95% confidence interval includes 1, the result is not statistically significant at the 5% level. This means the data do not provide strong evidence of a difference between the groups.
Q: What is the difference between hazard ratio and odds ratio?
A: The odds ratio is used for binary outcomes (e.g., dead/alive at a fixed time) and does not account for time. The hazard ratio uses time-to-event data and compares the rate of events over time. They are similar when events are rare, but differ when events are common.
Q: Can I use this calculator for any survival data?
A: Only if the survival times follow an exponential distribution and you have the median survival times for both groups. For most real studies, use the hazard ratio reported from a Cox model.
Related
Formula used
in t | Median survival, group A | months | 12 | 0 in d | Median survival, group B | months | 18 | 0 out hr | Hazard ratio (A vs B) | - | (d / t) | 2 out ci_low | 95% CI lower bound | - | exp(ln(hr) - 1.96 * sqrt(1/(t^2) + 1/(d^2))) | 2 out ci_high | 95% CI upper bound | - | exp(ln(hr) + 1.96 * sqrt(1/(t^2) + 1/(d^2))) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.