{ "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://mysimulator.uk/" }, { "@type": "ListItem", "position": 2, "name": "Simulations", "item": "https://mysimulator.uk/simulations.html" }, { "@type": "ListItem", "position": 3, "name": "SIR Epidemic Model" } ] }
Biology GCSE • A-Level • IB • AP • University ●●○ Intermediate ★ Free

SIR Epidemic Model

Particle-based disease spread — transmission, herd immunity, and the R₀ number

Simulation ready.

The SIR Compartmental Model

The SIR model, proposed by Kermack and McKendrick in 1927, divides a closed population into three compartments:

  • S — Susceptible: healthy individuals who can be infected
  • I — Infected: currently infectious and spreading the disease
  • R — Recovered: immune, either from recovery or vaccination

The model is governed by two differential equations:

dS/dt = −βSI/N
dI/dt = βSI/N − γI
dR/dt = γI

Where β is the transmission rate and γ is the recovery rate. The ratio β/γ gives R₀.

R₀ — The Basic Reproduction Number

R₀ ("R naught") is the average number of secondary infections caused by a single infected person in a fully susceptible population. It is the single most important number in epidemiology:

  • R₀ < 1: Epidemic dies out — each case infects less than one new person
  • R₀ = 1: Endemic equilibrium — constant, stable prevalence
  • R₀ > 1: Epidemic grows — cases multiply each generation

Typical R₀ values: influenza ~1.3, COVID-19 ~2–3, measles ~12–18. In this simulator, R₀ is derived from β, γ, and the contact radius, and updates live as you adjust parameters.

Herd Immunity

Herd immunity occurs when a sufficient fraction of the population is immune, so that transmission chains break before reaching all susceptible individuals. The herd immunity threshold is:

H = 1 − 1/R₀

For R₀ = 2, you need 50% immune. For R₀ = 5, you need 80%. Try setting vaccination rate above the threshold and observe how the epidemic fails to take off even without any other interventions.

Flattening the Curve

Social distancing reduces contact frequency, effectively lowering β and R₀. In this simulation, the social distancing slider slows particle velocities, reducing how often particles interact. The goal is not necessarily to eliminate the disease, but to:

  • Reduce the peak number simultaneously infected
  • Spread infections over a longer time period
  • Keep infected count below healthcare capacity
  • Buy time for vaccination campaigns

Try combining moderate social distancing with partial vaccination to explore combined intervention strategies.

Kermack–McKendrick Theory

W.O. Kermack and A.G. McKendrick published their landmark paper in 1927, analysing historical plague and cholera epidemics. Their key insight: epidemics are self-limiting. Even if R₀ > 1, the epidemic does not infect the entire population — as susceptibles are depleted, transmission slows and eventually stops. The final epidemic size depends on R₀ through a transcendental equation.

Experiments to Try

  • Default settings — observe a classic epidemic wave with peak infected ~30–50%
  • High β (0.8+) — aggressive epidemic, most population infected quickly
  • Social distancing 60%+ — watch the curve flatten dramatically
  • Vaccination 70%+ — epidemic fails to ignite (herd immunity)
  • Low γ (0.01) — slow recovery creates a prolonged epidemic
  • Small population (50) — observe stochastic extinction, epidemic dying by chance

Beyond the SIR Model

The SIR model is a simplification. Real epidemiologists use extensions:

  • SEIR — adds an Exposed (latent) class before infectious
  • SIRS — recovered individuals lose immunity and become susceptible again
  • Age-structured models — account for different contact rates by age group
  • Spatial models — geography and travel between regions (like this simulator)
  • Stochastic models — randomness is important for small populations or early outbreak

Share this simulation

Send to students or colleagues exploring epidemiology.

Related simulations

Explore other complex systems and emergent behaviour.

🔒 Premium Feature

Unlock HD export, advanced controls, and all 32 simulations with MySimulator Premium.

Key Equations

ConceptFormulaNotes
SIR model (S)dS/dt = −βSIβ: transmission rate; I: infectious fraction
SIR model (I)dI/dt = βSI − γIγ: recovery rate
SIR model (R)dR/dt = γIRecovered / removed individuals
Basic reproduction numberR0 = β/γAverage infections from one case in susceptible population
Herd immunity thresholdpc = 1 − 1/R0Fraction that must be immune to prevent spread
Epidemic growth (early)I(t) ≈ I0e(R0−1)γtExponential growth when R0 > 1

Curriculum Relevance

LevelTopicRelevance
A-Level Biology/MathsPopulation dynamicsExponential growth, logistic models, transmission rates
IB BiologyDisease transmissionR0, herd immunity, vaccination strategies
Undergraduate Biology/MathsMathematical modellingODE systems, numerical integration, bifurcation
Postgraduate / Public HealthEpidemiologySEIR extensions, network models, parameter estimation