Viral Infection SIR Model Calculator
Enter population size, transmission rate β and recovery rate γ to model an epidemic using the SIR compartmental model — get R₀, peak infected, herd immunity threshold and the infection curve.
per day
per day
days
R₀ = β/γ. Values > 1 produce an epidemic; < 1 fades out.
- 1
Average infectious period (1/γ)
1 ÷ 0.1 = 101/γ is the mean number of days a person remains infectious. - 2
Basic reproduction number R₀
0.3 ÷ 0.1 = 3
How does this calculator work?
The SIR model tracks susceptible (S), infectious (I) and recovered (R) individuals over time. The basic reproduction number R₀ = β/γ determines epidemic severity; R₀ > 1 means an outbreak grows. Herd immunity threshold = 1 − 1/R₀. Peak infections and epidemic duration depend on β, γ and initial conditions — the model is an idealised tool for building epidemiological intuition.
Formula
How this is calculated
The SIR (Susceptible–Infectious–Recovered) model divides a closed population N into three compartments: susceptible individuals S who have not yet been infected, infectious individuals I who can transmit the pathogen and recovered individuals R who are immune (or removed). The transmission rate β captures how quickly susceptibles become infected — it is roughly the product of the average number of daily contacts and the probability of transmission per contact. The recovery rate γ equals 1 divided by the mean infectious period in days.
The basic reproduction number R₀ = β/γ is the expected number of secondary cases from a single infectious individual in a fully susceptible population. When R₀ > 1 the pathogen spreads exponentially at first; when R₀ < 1 the outbreak fades without spreading widely. The herd immunity threshold (HIT = 1 − 1/R₀) is the fraction of the population that must be immune — through prior infection or vaccination — to prevent further epidemic growth. The plot shows the infected compartment I(t) over time, tracing the classic epidemic "bell curve".
The SIR model is a highly simplified abstraction. It assumes a homogeneous, well-mixed population with no births, deaths, age structure or spatial variation. It does not model interventions (lockdowns, mask-wearing), vaccination rollout, reinfection, waning immunity, multiple variants or superspreader dynamics. Real epidemics differ substantially from the model's prediction; use it to build intuition, not to forecast actual outcomes.
Frequently asked questions
For seasonal influenza: β ≈ 0.3/day, γ ≈ 0.1/day (10-day infectious period), R₀ ≈ 3. For measles (unvaccinated): R₀ ≈ 12–18. For COVID-19 (original strain): R₀ ≈ 2–3. These are population-level averages and vary greatly by context.
The SIR model continues spreading past the peak until the susceptible pool is depleted enough, so the total attack rate can be much larger than the peak. In practice, interventions, behaviour change and prior immunity reduce both the peak and the total well below the model's theoretical prediction.
HIT = 1 − 1/R₀ is the proportion of a population that must be immune for the epidemic to stop growing. At that point each infectious person infects fewer than one other on average, and the outbreak declines. For R₀ = 3, HIT = 67%; for R₀ = 12 (measles), HIT = 92%.
Also known as
TG we-Calculate Editorial Team. (2026). Viral Infection SIR Model Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/viral-infection-sir-calculator
TG we-Calculate Editorial Team. "Viral Infection SIR Model Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/viral-infection-sir-calculator.
TG we-Calculate Editorial Team, "Viral Infection SIR Model Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/viral-infection-sir-calculator
@misc{wecalculate_viral_infection_sir_calculator, title = {Viral Infection SIR Model Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/viral-infection-sir-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
