Infectious Disease and Epidemic Calculator (SIR Model)

Estimate how an infectious disease may spread using the SIR model for susceptible, infected, and recovered populations.

Basic R₀
Peak Infected
Peak Day

What the SIR Model Epidemic Calculator Does

This calculator applies the classic SIR (Susceptible-Infectious-Recovered) compartmental model to estimate the trajectory of an infectious disease outbreak within a defined population. It provides a mathematical projection of how many people will be susceptible, infected, and recovered over a given time period, based on key epidemiological parameters you define.

The SIR model is a foundational tool in epidemiology used to understand the dynamics of diseases that confer immunity after recovery. It helps visualize the peak of an outbreak, the total number of infections, and the duration of an epidemic under specific conditions.

How the SIR Model Works

The model divides the total population into three compartments:

  • Susceptible (S): Individuals who are not immune and can become infected.
  • Infectious (I): Individuals who are currently infected and can transmit the disease.
  • Recovered (R): Individuals who have recovered and are assumed to be immune (or deceased, depending on the model variant).

The movement between these compartments is governed by two primary parameters:

  • Transmission Rate (β): The rate at which a susceptible person becomes infected per contact with an infectious person. This is influenced by the disease's contagiousness and social contact patterns.
  • Recovery Rate (γ): The rate at which infectious individuals recover. It is the inverse of the infectious period (1 / average days infectious).

The model uses differential equations to simulate the flow from Susceptible to Infectious to Recovered over time. A critical derived value is the Basic Reproduction Number (R₀), calculated as β / γ. An R₀ greater than 1 indicates the epidemic will grow, while an R₀ less than 1 indicates it will die out.

How to Use This Calculator

To generate a projection, you need to provide the following inputs:

  1. Total Population: The size of the population being modeled (e.g., a city, region, or closed community).
  2. Initial Infected: The number of infectious individuals at the start of the simulation.
  3. Transmission Rate (β): The average number of effective contacts per infectious person per day.
  4. Recovery Rate (γ): The proportion of infectious individuals recovering each day (typically 1 divided by the infectious period in days).
  5. Simulation Duration: The number of days to run the simulation.

After entering these values, the calculator will output a time-series projection showing the number of susceptible, infected, and recovered individuals over the specified period.

Understanding the Results

The output is a graph or table showing the three curves over time. Key insights to look for include:

  • Peak of the Epidemic: The point at which the number of infectious individuals is highest. This indicates when healthcare demand will be greatest.
  • Final Epidemic Size: The total number of people who were infected by the end of the simulation. This is represented by the final value of the Recovered curve.
  • Herd Immunity Threshold: The proportion of the population that needs to be immune (through infection or vaccination) for the epidemic to decline. This is approximately 1 - (1/R₀).

Remember that the SIR model is a simplification. Real-world outbreaks are influenced by many factors not captured in this basic model, such as population heterogeneity, spatial distribution, and public health interventions.

Common Mistakes and Limitations

Mistakes

  • Confusing Transmission Rate with R₀: The transmission rate (β) is not the same as the basic reproduction number (R₀). R₀ is derived from β and γ.
  • Using an Incorrect Recovery Rate: If the infectious period is 10 days, the recovery rate (γ) is 0.1 (1/10), not 10.
  • Ignoring Population Size: The model assumes a closed, homogeneous population. Real populations are not perfectly mixed.

Limitations

  • No Births or Deaths: The basic SIR model does not account for births, natural deaths, or disease-induced mortality.
  • No Waning Immunity: It assumes permanent immunity after recovery, which is not true for all diseases.
  • No Interventions: The model does not automatically account for social distancing, lockdowns, or vaccination campaigns unless you manually adjust the parameters.
  • Homogeneous Mixing: It assumes every individual has an equal chance of contacting every other individual, which is rarely true.

Practical Use Cases

  • Educational Demonstrations: Teaching the fundamental dynamics of infectious disease spread in classrooms or public health training.
  • Preliminary Outbreak Assessment: Gaining a rough understanding of the potential scale and peak of a new outbreak when limited data is available.
  • Scenario Planning: Comparing the impact of different transmission rates (e.g., with and without social distancing) on the epidemic curve.
  • Policy Communication: Visualizing the concept of "flattening the curve" for non-technical audiences.

Frequently Asked Questions

What does R₀ mean in the SIR model?

R₀ (R-naught) is the basic reproduction number. It represents the average number of secondary infections caused by a single infectious individual in a completely susceptible population. If R₀ > 1, the infection will likely spread. If R₀ < 1, it will likely die out.

Can this calculator predict a real-world epidemic accurately?

No. The SIR model is a simplified mathematical representation. Real-world epidemics are affected by many complex factors like population behavior, healthcare capacity, and government interventions. This tool is best used for educational purposes and rough scenario exploration, not for precise real-world forecasting.

What is the difference between the transmission rate and the recovery rate?

The transmission rate (β) controls how fast the disease spreads from infectious to susceptible individuals. The recovery rate (γ) controls how fast infectious individuals recover and move to the recovered compartment. Together, they determine the speed and severity of the epidemic.

How do I choose the right transmission rate for my simulation?

Transmission rates are disease-specific and context-dependent. For a rough estimate, you can look up published R₀ values for a disease and then calculate β by multiplying R₀ by γ (the recovery rate). For example, if R₀ is 2.5 and the infectious period is 5 days (γ = 0.2), then β = 2.5 * 0.2 = 0.5.

Does the model account for deaths from the disease?

In the basic SIR model, the "Recovered" compartment typically includes both recovered and deceased individuals, as both are no longer infectious. To model deaths separately, you would need an extended model like SIRD (Susceptible-Infectious-Recovered-Deceased).