Skip to content
Omnikalc

Median survival calculator: median survival and hazard ratio from events and follow-up

Enter events and person-years for two groups to get hazard rates, median survival, survival at a chosen time and the hazard ratio with its confidence interval.

Updated on

Educational tool, not medical advice: this page does not diagnose and does not replace a doctor, nurse or pharmacist. It has not been reviewed by a healthcare professional. Editorial and medical policy

Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

years

Value out of range

Results

Hazard ratio (A vs B)

1.81

Higher hazard in group A: the interval excludes 1
Hazard rate, group A (per 100 person-years)
25.00
Hazard rate, group B (per 100 person-years)
13.85
Median survival, group A (years)
2.77
Median survival, group B (years)
5.01
Survival at the time point, group A
60.7%
Survival at the time point, group B
75.8%
Hazard ratio: lower 95 % limit
1.01
Hazard ratio: upper 95 % limit
3.24

This calculator is for general information and education. It is not medical advice and does not replace the advice of your doctor or a registered dietitian.

Survival analysis asks how long until an event such as death, relapse or failure. The median survival calculator takes the events and the person-years at risk of two groups and gives the hazard rates, the median survival, the survival at a chosen time, and the hazard ratio with its 95 % confidence interval, under a constant-hazard model.

How the calculation works

  • The hazard rate is the number of events divided by the person-years at risk: λ = events ÷ person-years. Multiply by 100 for a rate per 100 person-years.
  • With a constant hazard (an exponential model), the median survival is ln 2 ÷ λ, and the survival at time t is e^(−λ × t).
  • The hazard ratio is λA ÷ λB. A value above 1 means a higher hazard in group A.
  • Its 95 % confidence interval is the ratio multiplied or divided by e^(1.96 × √(1 ÷ events A + 1 ÷ events B)).

Example

Group A has 30 events in 120 person-years and group B has 18 events in 130 person-years. The hazard rates are 25.0 and 13.85 per 100 person-years. The median survival is 2.77 years in A and 5.01 years in B, and the survival at 2 years is 60.7 % against 75.8 %. The hazard ratio is 1.81, with a 95 % interval of 1.01 to 3.24, so the higher hazard in A is just significant.

Why it matters

Two groups followed for different times cannot be compared by counting events alone. Rates per person-year, median survival and the hazard ratio put them on an equal footing and give the measures that clinical papers report.

Good to know

The exponential model assumes the hazard stays constant over time and that follow-up is complete or censored without bias. Real survival curves often bend, and then the median from the model differs from the Kaplan-Meier median. The confidence interval for the ratio is based on the number of events, so a small number of events gives a wide interval.

The incidence rate ratio calculator compares rates with a p-value, and the exponential distribution calculator gives the probabilities behind the constant hazard.

Frequently asked questions

What is the median survival?

It is the time at which half of the people in a group are expected to still be alive, or event-free. Unlike the mean, it is not strongly affected by a few very long survivors, which is why survival studies report it. Here it is computed from a constant hazard rate.

What does the hazard ratio tell me?

It compares the instantaneous risk of the event in two groups. A hazard ratio of 1.81 means that, at any moment, people in group A face about 81 percent higher risk than those in group B. Values below 1 mean a lower risk in group A.

When is a constant hazard a good assumption?

When the risk of the event does not change much with time, which is a reasonable approximation for some chronic conditions or for failures of equipment in their useful life. It is a poor one after surgery, where risk is high at first, or for diseases with a long delay. Use Kaplan-Meier methods in those cases.

Why are person-years used and not the number of patients?

People are followed for different lengths of time, and some leave the study early. Person-years add up the time actually spent at risk, so a patient followed for two years counts twice as much as one followed for one year. This makes rates comparable between groups.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.