Kaplan Meier Survival Analysis

Draws the kaplan meier plot and calculates the log-rank test.

video tutorial

Test calculation

Right-tailed For the Goodness of Fit Test, you can use only the right tail test.
The population's name
Significant level (0-1), maximum chance allowed rejecting H0 while H0 is correct (Type1 Error)
The number of estimated variables.
Degree Of Freedom: df = k - m - 1
The ratio of the mean difference, that the test needs to be able to identify and the standard deviation. For example, 0.1 small, 0.3 medium, 0.5 large.
Enter raw data directly
Enter raw data from excel
Please change "Time" header to your time unit.

The tool will trim empty cells, spaces or non-numeric data in the numeric columns.
If you enter only one group the log-rank test will not run.
You may use more than two groups.

Enter sample data

You may copy data from Excel, Google sheets or any tool that separate data with Tab and Line Feed.
Copy the data, one block of 3 consecutive columns includes the header, and paste below.
Copy the data,
example from excel

It is okay to leave empty cells, empty cells or non numeric cells won't be counted

Log-rank test

knumber of groups
nsample size
χ²Chi square test statistic
. (for log-rank test m=0).
validation message


H0: Model Fits: Equal survival distributions
H1: Model Doesn't Fit
Test statistic
Chi2 statistic
χ² distribution
Chi-Squared distribution right tailed
Target: Check if the statistical model fits the observations.
The test uses Chi-square distribution.

The log-rank test model assumes the events per subject distributes evenly between the groups. The expected number of events is calculated per each time value.
Example with two groups A and B.
Expected value = nA(dA + dB)/(nA + nB)

The page was created per Anna P request.

R Code

The following R code should produce the same results as the alternative log-rank test