🔬
🔬 Science & engineering

SIR Model Calculator (epidemic peak, final size and herd immunity from R₀)

Results update as you type.

Your numbers

Understanding the SIR model calculator — concept and principle

This calculator runs the classic SIR epidemic model for a closed population from the basic reproduction number R₀, the infectious period and the starting numbers. It gives the size and timing of the peak, the final epidemic size, the herd-immunity threshold and the transmission and recovery rates. It is a teaching tool for epidemiology and mathematical modelling.

SIR epidemic modelAn epidemic with R₀ = 2.5Population1,000,000R₀2.5Infectious period7 daysγ = 1/7 · β = 2.5 × 1/7 = 0.3571herd threshold 1 − 1/2.5 = 60 %Peak infectious233,488 · day 56Ever infected89.3 %Never infected10.7 %
Infections overshoot the 60 % threshold: by the peak, momentum carries the outbreak to almost 90 %.

How it is calculated

dS/dt = −β S I; dI/dt = β S I − γ I; dR/dt = γ I

γ = 1 ÷ infectious period; β = R₀ × γ

Final size from S∞ = S₀ e^(−R₀(1 − S∞ − R₀,immune)), solved numerically

Herd-immunity threshold = 1 − 1 ÷ R₀

The principle

Each infectious person infects susceptible people at a rate proportional to how many susceptibles remain, and recovers after an average infectious period. At the start almost everyone is susceptible, so each case causes about R₀ new cases and the epidemic grows. As susceptibles are used up, the effective reproduction number falls; when it drops below 1, cases start to decline. That happens once a fraction 1 − 1/R₀ is immune, but the epidemic overshoots this threshold, so the final size is larger.

Worked example

Default inputs: N = 1,000,000, 10 infectious, R₀ = 2.5, infectious period 7 days, no prior immunity, 365 days.

  1. γ = 1 ÷ 7 = 0.1429 per day; β = 2.5 × 0.1429 = 0.3571 per day.
  2. Peak: 233,488 infectious people (23.35%) on day 56.
  3. Final size: 89.3% of the population, 892,646 people; 10.7% never infected.
  4. Herd-immunity threshold = 1 − 1/2.5 = 60%; effective R at the start = 2.5.
How Peak infectious at one time (people) changes with Basic reproduction number R₀How Peak infectious at one time changes…0100,000200,000300,000400,000500,0000.6251.251.882.53.123.755Example: 233,488Basic reproduction number R₀
Each point is the calculator re-run with only “Basic reproduction number R₀” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
Basic reproduction number R₀Peak infectious at one time (people)
0.62510
1.2521,493
1.88131,414
2.5233,488
3.12315,384
3.75380,866
5478,108

How to read the result

The peak and final size show what an unmitigated epidemic would look like under the model's assumptions. Real epidemics are shaped by behaviour change, interventions, seasons and population structure, so actual outcomes differ, often a great deal. The model is useful for understanding thresholds and the effect of R₀, not for forecasting.

Common mistakes

Keep in mind: This is a simplified teaching model and not a forecast or public-health advice. Follow official public-health guidance.

Frequently asked questions

What is R₀?

The average number of people one case infects in a fully susceptible population.

Why does the epidemic overshoot the herd-immunity threshold?

Many people are still infectious when the threshold is reached, so infections continue.

What does the infectious period do?

It sets the recovery rate γ and, with R₀, the transmission rate β.

Can immunity at the start help?

Yes; enter the immune percentage to see a smaller and later peak.

Sources: W. O. Kermack and A. G. McKendrick, Proc. R. Soc. A 115, 700–721 (1927)

Checked 9 Nov 2026. W. O. Kermack & A. G. McKendrick, “A contribution to the mathematical theory of epidemics”, Proc. R. Soc. A 115, 700–721 (1927): SIR equations and the final-size relation; herd-immunity threshold 1 − 1/R₀ (standard result).

🔬 All science & engineering tools →🌍 Calculators by country →