Ad Space — Top Banner

Hazard Ratio Calculator

Calculate hazard ratio and 95% confidence interval from events and person-time for two groups.
Includes p-value and interpretation for survival analysis.

Hazard Ratio (HR)

Hazard Ratio (HR)

The hazard ratio compares the rate of an event (death, relapse, failure) between two groups over time. It is the primary effect measure in survival analysis and clinical trials.

Formula

HR = (d₁ / T₁) / (d₂ / T₂)

Where:

  • d₁, d₂ = number of events in Group 1 and Group 2
  • T₁, T₂ = total person-time at risk in each group

This is equivalent to the ratio of two incidence rates.

Confidence Interval

95% CI = exp(ln(HR) ± 1.96 × SE)

SE = √(1/d₁ + 1/d₂)

A 95% CI that does not include 1.0 indicates statistical significance at p < 0.05.

Interpreting the Hazard Ratio

HR Meaning
HR = 1 No difference between groups
HR < 1 Group 1 has lower hazard (protective effect)
HR > 1 Group 1 has higher hazard (increased risk)
HR = 0.5 Group 1 has 50% lower event rate
HR = 2.0 Group 1 has twice the event rate

P-value

The p-value is calculated from the z-score: z = ln(HR) / SE Under the null hypothesis (HR = 1), z follows a standard normal distribution.

Common Applications

Clinical trials: drug vs. placebo survival curves. Epidemiology: exposed vs. unexposed cohort studies. Reliability engineering: failure rates between component designs.

Person-Time

Person-time accounts for participants who leave the study early. 100 participants followed for 2 years each = 200 person-years of observation.


Ad Space — Bottom Banner

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.