Infectious Disease and Epidemic Calculator (SIR Model)

Infectious Disease SIR Calculator

Simulate how a closed population moves between susceptible, infected, and recovered compartments under a constant-rate SIR model.

R₀ 3.50 Selected day 30 Infected 340,278

Example workbook is ready.

Population and infection inputs

Required whole number from 1 to 1,000,000,000.

%

Required share not yet infected or immune.

%

Required share infectious at day 0.

%

Required share already removed from susceptibility.

Presets are teaching scenarios; custom values remain editable.

/day

Required effective transmission-rate coefficient.

/day

Required removal rate; 0.1/day implies a 10-day mean infectious period.

days

Required whole number from 1 to 730 days.

Results

Choose a whole day within the simulation horizon.

Changes presentation only; the underlying model is unchanged.

Infected

340,278

Estimated people infected on day 30.

Susceptible
368,852
Recovered
290,870
Mean infectious period
10.00 days
On day 30, about 340,278 people are infected.

Evolution of infection

Evolution of viral infection. The y-axis shows the number of people in each category.

Daily SIR projection

Day Susceptible Infected Recovered
The table reports one row per whole day from the same canonical trajectory used by the chart and Excel workbook.

How to use this SIR calculator

What this calculator does

This calculator simulates a basic susceptible – infected – recovered (SIR) epidemic in a closed population. It estimates how many people are in each compartment over time when the transmission rate and recovery rate remain constant. The model is useful for learning how epidemic curves respond to starting immunity, initial prevalence, and transmission assumptions. It is not a clinical prediction, a diagnosis, or a substitute for a calibrated public-health forecast. Real outbreaks can involve incubation periods, age and contact structure, births, deaths, migration, waning immunity, vaccination, changing behavior, and time-varying interventions that are outside this simple model. For an accessible introduction to the same compartmental framework, see the EMBL-EBI SIR model case study.

When to use it

Use this tool to compare teaching scenarios: testing how a lower transmission rate changes the epidemic curve, examining how more initial immunity changes peak burden, exploring the threshold behavior around R₀ = 1, or creating a reproducible SIR projection for a class, report, or internal analytical exercise. It is especially useful when you want to see the full time series instead of only a single reproduction-number calculation.

How to calculate

  1. The calculator opens with a complete demonstration: population 1,000,000; 99% susceptible; 0.1% infected; 0.9% recovered; β = 0.35/day; γ = 0.10/day; and 120 simulated days. A validated example XLSX is immediately available.
  2. Replace the population percentages with your starting state. The three percentages must add to exactly 100% within normal decimal-entry tolerance.
  3. Choose an Infection teaching preset or keep Other infection and enter your own Transmission rate β and Recovery rate γ. The basic reproduction number is computed as R₀ = β/γ.
  4. Set Time to simulate, then use Time in days to inspect a particular daily state. Show in chart... switches the chart between people and percent without changing the model.
  5. Read the selected-day results and the daily projection, then use Download Excel to export the current validated state. Reset clears the demonstration data; export is then disabled until a complete valid state is entered again.

Input guide

Total population is a required whole-person count from 1 to 1,000,000,000; for example, 1,000,000. Larger populations scale the count outputs but do not change percentage dynamics when all other assumptions are identical. Do not paste units or scientific notation. Susceptible, Infected, and Recovered (Immune) are required percentages between 0% and 100%; for example, 99%, 0.1%, and 0.9%. Together they must total 100%. A common mistake is entering counts in these percentage fields. More initial recovered/immune people means fewer people are available for infection at day 0.

Infection is a scenario selector. The influenza and measles entries are deliberately labeled teaching presets rather than current outbreak estimates; selecting one populates β and γ with stable illustrative values, and editing either rate returns the selector to Other infection. Transmission rate β is a required nonnegative decimal in /day; the startup example is 0.35/day. Higher β accelerates new infections. Recovery rate γ is a required positive decimal in /day; 0.10/day corresponds to a 10-day mean infectious period because the model uses 1/γ. Higher γ removes infected people faster. Time to simulate is a required whole number from 1 to 730 days. Time in days is a required whole day from 0 through that horizon. Show in chart... changes only the y-axis presentation between counts and percentages.

Output guide

R₀ is β/γ under this model. It is a model parameter, not a universal biological constant; the CDC discusses why reproduction numbers depend on assumptions and context in its review of R₀ complexity. Infected, Susceptible, and Recovered report estimated people at the selected day. A zero infected value means the deterministic trajectory has effectively reached zero at displayed precision, while a high infected value means a larger simultaneous modeled burden. Mean infectious period is the exact identity 1/γ in days. The Daily SIR projection columns give day, susceptible, infected, and recovered counts from day 0 through the horizon. The Evolution of infection chart draws the same three series; it is an analytical view of the table, not additional data.

Worked example

With the startup values, S(0) = 990,000, I(0) = 1,000, and R(0) = 9,000. The rates give R₀ = 0.35/0.10 = 3.50 and a mean infectious period of 10.00 days. The calculator advances the standard SIR update with a small internal step of 0.02 day. At day 30, the trajectory is approximately 368,852 susceptible, 340,278 infected, and 290,870 recovered; those values sum to the original 1,000,000 population apart from sub-person numerical precision. Changing β, γ, starting immunity, or the initial infected share changes every downstream row, chart point, selected-day output, and exported workbook.

Model assumptions and interpretation

The equations are dS/dt = – βSI/N, dI/dt = βSI/N – γI, and dR/dt = γI. This implementation uses the equivalent small-step iterative form. Population is conserved because every modeled new infection leaves S and enters I, while every modeled recovery leaves I and enters R. In the basic homogeneous SIR model, R₀ = β/γ, while the effective growth tendency also depends on the susceptible fraction. The CDC's infectious-disease transmission model explainer emphasizes that transmission models are simplified representations used to understand how disease may spread and to evaluate scenarios.

S(t+Δt) = S(t) – Δt·β·S(t)·I(t)/N
I(t+Δt) = I(t) + Δt·[β·S(t)·I(t)/N – γ·I(t)]
R(t+Δt) = R(t) + Δt·γ·I(t)

Interpret comparisons rather than treating a single run as a forecast. Lowering β can represent a scenario with fewer effective infectious contacts; increasing γ represents faster removal from the infectious compartment. Increasing initial recovered/immune share lowers the initial susceptible fraction. These levers are useful for sensitivity analysis, but they do not capture the mechanisms that caused those rates to change. If you are modeling a real outbreak, parameter estimation and a model structure suited to the disease are separate tasks from running this calculator.