# How to calculate Hazard Ratio from Kaplan Meier curve

Is it possible to calculate the Hazard Ratio, Log[HR], and SE for overall survival (OS) using data from a manuscript that presents Kaplan Meier curve for OS? Usually these manuscripts present the survival of the patients in raw numbers but do not provide HR. How can I calculate it? Is there a formula or a computed system I could use? I would appreciate a detail response as I do not have great knowledge into that field.

Thank you.

When considering the hazard ratio, it is best to obtain this by fitting a Cox proportional hazards model. If you do not adjust for outcome heterogeneity caused by any other variables than the grouping variable, your regression model would contain one binary predictor. The output will be a log hazard ratio and its standard error. You anti-log the regression coefficient to get the point estimate of the hazard ratio.

The Cox model in this situation is essentially two Kaplan-Meier estimates that borrow information from each other by assuming a common shape of the survival curves (curves are parallel on the log-log survival scale).

There is a Mantel-Haenszel-type hazard ratio estimator but I prefer the Cox model.

You need the raw data in either case. You can approximate the statistics by using a digitization program to retrieve the points on the published curves, and re-plotting on the log-log scale and taking an average distance between them. This estimates the Cox regression coefficient. How to weight the distances for optimum estimation is difficult. An approximate standard error comes from the approximate variance estimate of $\frac{4}{e}$ where $e$ is the total number of events in both groups combined.