Calculate a hazard ratio from the event risks in two groups, from a Cox coefficient and standard error, or from events and person-time.

Uses event probabilities by the same time point, e.g. 0.30 vs 0.40, and assumes proportional hazards.

Optional settings

Hazard Ratio Formula

The hazard ratio (HR) compares the instantaneous event rate (hazard) between two groups at time t. In practice, HR is typically estimated from time-to-event (survival) data (for example, via a Cox proportional hazards model).

HR = (hT(t)) / (hC(t)); HR โ‰ˆ (ln(1 - PT(t))) / (ln(1 - PC(t)))
  • Where HR is the hazard ratio (unitless)
  • hT(t) is the hazard in the treatment group at time t
  • hC(t) is the hazard in the control group at time t
  • PT(t) and PC(t) are event probabilities (cumulative risks) by the same time horizon t (used only for the approximation shown)

Important: dividing event probabilities PT/PC gives a risk ratio (relative risk), not a hazard ratio. If you only have event probabilities at a single time horizon, use the log-survival model only under proportional-hazards assumptions and with comparable survival estimates that account for censoring. One endpoint pair cannot establish those assumptions or recover an adjusted Cox model.

How to Calculate Hazard Ratio?

The following example problems outline how to calculate an approximate hazard ratio from event probabilities measured at the same time horizon.

Example Problem #1:

  1. First, determine the event probability (risk) in the treatment group at the chosen time horizon.
    • The treatment-group event probability is given as 0.30.
  2. Next, determine the event probability (risk) in the control group at the same time horizon.
    • The control-group event probability is provided as 0.40.
  3. Finally, calculate the approximate hazard ratio using the equation above.

HR โ‰ˆ ln(1 โˆ’ PT) / ln(1 โˆ’ PC)

The values given above are inserted into the equation below and the solution is calculated:

HR โ‰ˆ ln(1 โˆ’ 0.30) / ln(1 โˆ’ 0.40) = ln(0.70) / ln(0.60) โ‰ˆ 0.70


Example Problem #2: 

For this problem, the variables required are provided below:

probability of events in the treatment group = 0.18

probability of events in the control group = 0.24

Use the two event risks mode above: the model ratio for 0.18 versus 0.24 is approximately 0.7231.

HR โ‰ˆ ln(1 โˆ’ PT) / ln(1 โˆ’ PC) = ?