How to Enter Data in the Kaplan-Meier Calculator

The Kaplan-Meier survival analysis calculator supports three ways to enter your data. This guide explains each option using a practical example with two groups of cats being monitored for virus clearance. The event of interest in Kaplan-Meier analysis is the moment something happens to a subject — in this example, a cat testing virus-negative. A censored event means the cat left the study before becoming negative, or was still positive when the study ended.

The Example Scenario

You are tracking cats in two groups (A and B) to see how quickly they clear a virus. The event is a cat testing virus-negative. The time unit is days.

  • Day 1: All cats are positive — no events yet.
  • Day 2: 2 cats from Group A test negative; 1 cat from Group B tests negative.
  • Day 3: No change in either group.
  • Day 4: 1 cat from Group A ran away — you can no longer track its status (censored).
  • Day 5: 1 cat from Group A tests negative; no change in Group B.
  • Day 6: 1 cat from Group A tests negative; 2 cats from Group B test negative.
  • Day 6 (end of study): 5 remaining positive cats in Group A and 7 remaining positive cats in Group B are censored at the study’s end.
Note: If all cats test negative before the study ends, there are no censored observations at the end. The censored count is 0.

Option 1 Enter Aggregated Data

Use this option when you want to enter a summary row per day per group. Instead of one row per cat, you enter the total number of events and censored observations for each time point. This is the most compact format.

The table has four columns: Time, Events, Censors, and Group. You can rename Time to your time unit (e.g., Day, Month, Week) and Events to a descriptive label (e.g., Negative).

There is no row for Day 1 or Day 3, because no events or censored observations occurred on those days.

DayEvents (Negative)CensorsGroup
220A
401A
510A
615A
210B
627B
How to read the last row for Group A: On Day 6, 1 cat tested negative (event), and the study ended — leaving 5 cats that were still positive. Those 5 are recorded as censored (Censors = 5).

Enter all rows for both groups one after the other in the same columns. The calculator uses the Group column to separate them automatically.

Option 2 Enter Raw Data Directly

Use this option when you have one row per cat. Enter 1 in the Event/Censored column if the cat had the event (tested negative), or 0 if it was censored.

The table has three columns: Time, Event/Censored, and Group.

Time (Day)Event/CensoredGroup
21A
21A
40A
51A
61A
60A
60A
60A
60A
60A
21B
61B
61B
60B
60B
60B
60B
60B
60B
60B
Group A breakdown: 2 events on Day 2 → 2 rows with Event/Censored = 1. 1 cat ran away on Day 4 → 1 row with Event/Censored = 0. 1 event on Day 5. 1 event on Day 6. The 5 remaining positive cats on Day 6 are censored → 5 rows with Event/Censored = 0.

Group B breakdown: 1 event on Day 2. 2 events on Day 6. The 7 remaining positive cats on Day 6 are censored → 7 rows with Event/Censored = 0.

Enter both groups one after the other in the same input columns. The Group column tells the calculator which rows belong to which group.

Option 3 Enter Raw Data from Excel

If your data is already in a spreadsheet (Excel, Google Sheets, or similar), you can copy and paste it directly into the calculator. The format is identical to Option 2 — one row per subject — but instead of typing each value, you copy a block of three consecutive columns including the header row.

Your spreadsheet should look like this:

ABC
0DayEvent/CensoredGroup
121A
221A
340A
451A
561A
660A
760A
860A
960A
1060A
1121B
1261B
1361B
1460B
1560B
1660B
1760B
1860B
1960B
2060B

Steps to paste from Excel:

  1. In your spreadsheet, click the top-left header cell of your data (the cell containing “Day”).
  2. Press Ctrl + Shift + End to select all the way to the last row of data.
  3. Press Ctrl + C to copy.
  4. Select Enter raw data from excel in the calculator, then click inside the text area and press Ctrl + V to paste.
The data must be in three consecutive columns: Time, Event/Censored, Group — in that order. The calculator uses the tab character between columns (the default when copying from Excel or Google Sheets).

Tips & Notes

  • You can use more than two groups. Just add rows with different values in the Group column.
  • You can rename the Time column header to match your time unit: Day, Month, Week, Hour, etc.
  • If you enter only one group, the log-rank test will not run (it requires at least two groups).
  • Every subject must have either an event or a censored observation by the end of the study.
  • Rows with no events and no censored observations on a given day do not need to be entered (e.g., Day 1 and Day 3 in this example).
  • To download a plot as a PNG image, press the camera icon on the Kaplan-Meier chart.

Open the Kaplan-Meier Calculator