Skip to main content
Calcimator

Survival Analysis Calculator

Estimate Kaplan-Meier survival probabilities over four time periods given events and censored observations.

About this calculator

This calculator builds a Kaplan-Meier survival curve across four periods, starting with everyone at risk (Total Subjects) and multiplying in each period's survival fraction, (at-risk − events) / at-risk (line 44), to get a running Cumulative Survival (line 45). Subjects who leave through an event or through censoring both reduce who's at risk for the next period (line 54), but censoring recorded in the fourth period only ever reduces at-risk counts for a fifth period this calculator never computes, so it specifically never touches Survival Probability at T=4 — the value the atRisk running total feeds into (line 44) is captured before censoring is subtracted for that period. Censoring at T=4 still feeds Total Censored (a plain sum across all four periods, line 58) and the chart's own T=4 "At Risk" figure (line 51, computed from that same period's events and censored count).

If every subject has already had an event or been censored before a period starts, that period's survival estimate is not recalculated at all: an explicit guard (line 35) carries the last cumulative value forward and reports 0 subjects at risk, rather than dividing by an at-risk count of zero. Median Survival Period looks for the first period where cumulative survival drops to 0.5 or below (lines 61-67) and reports -1 if the curve never gets there — which is exactly what happens at the defaults, where survival only falls to 0.6203 by T=4. What this does not account for: any confidence interval around the survival estimates (no Greenwood's formula here), and it treats every subject's event or censoring time as falling cleanly within one of the four fixed periods rather than working from exact event times the way a full Kaplan-Meier table would.

Inputs

Results

Survival Probability at T=1

0.95

Survival Probability at T=4

0.62

Survival Probability at T=20.87
Survival Probability at T=30.74
Total Events35
Total Censored15
Median Survival Period (-1 if not reached)-1
How to Use This Calculator
  1. Enter Total Subjects at Start, Events at Time 1, and Censored at Time 1.
  2. Set Events at Time 2, Censored at Time 2, and Events at Time 3.
  3. Adjust Censored at Time 3, Events at Time 4 as needed.
  4. Review Survival Probability at T=1 and Survival Probability at T=4.
  5. Use Survival Probability at T=2 and Survival Probability at T=3 to inform your decision.

How the result changes with Total Subjects at Start

Total Subjects at StartSurvival Probability at T=1Survival Probability at T=4
500.90.1
750.930.47
1500.970.75
2500.980.86

What each input means

Total Subjects at Start
Total number of subjects at the beginning of the study.
Events at Time 1
Number of events (e.g., deaths, failures) occurring during period 1.
Censored at Time 1
Number of subjects lost to follow-up or withdrawn during period 1.
Events at Time 2
Number of events occurring during period 2.
Censored at Time 2
Number of subjects censored during period 2.
Events at Time 3
Number of events occurring during period 3.
Censored at Time 3
Number of subjects censored during period 3.
Events at Time 4
Number of events occurring during period 4.
Censored at Time 4
Number of subjects censored during period 4.

How this is calculated

Worked example, using the default values

  1. Identify Input Parameters
    4 parameters
    Total Subjects at Start = 100, Events at Time 1 = 5, Censored at Time 1 = 3, Events at Time 2 = 8 = 9 input(s) provided
  2. Calculate Survival Probability at T=1
    0.95 = 0.95
  3. Calculate Survival Probability at T=4
    0.6203 = 0.6203
  4. Calculate Survival Probability at T=2
    0.8674 = 0.8674
  5. Calculate Survival Probability at T=3
    0.7373 = 0.7373

Engine last updated . Checked against 2 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Does the number of subjects censored in the fourth period affect Survival Probability at T=4?

No. Survival Probability at T=4 is computed from the at-risk count going into period 4 and Events at Time 4 alone (line 44); the at-risk count only gets reduced by Censored at Time 4 afterward (line 54), to feed a fifth period this calculator never computes. Censoring recorded in the last period has nowhere left to make a difference.

What happens once everyone in the cohort has had an event or been censored?

The calculator does not try to divide by zero subjects at risk. An explicit check, `if (atRisk <= 0)` (line 35), skips recalculating that period's survival fraction and instead carries the last cumulative survival value forward unchanged, reporting 0 subjects at risk for every remaining period.

Why does Median Survival Period show -1 at the calculator's defaults?

-1 specifically means the survival curve never dropped to 50% within the four periods tracked, not that no subjects survived. The search for a median (lines 61-67) checks each period's cumulative survival against 0.5 in order and only reports a period number if one crosses that line; at the defaults, survival is still at 0.6203 by T=4, so the search finds nothing and returns -1.

Does Total Subjects affect Total Events or Total Censored?

No — those two outputs are plain sums of the per-period Events and Censored inputs you entered (line 57-58), independent of how many subjects you said started the study. Total Subjects only shapes the at-risk denominators that drive the survival probabilities, not the raw event and censoring counts themselves.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.