SIR Model Epidemic Calculator

Simulate infectious disease spread using the Susceptible-Infected-Recovered compartmental model.

Model epidemic progression by calculating disease transmission dynamics, peak infection timing, and final population outcomes using mathematical epidemiology principles.

Examples

Click on any example to load it into the calculator.

COVID-19 Community Outbreak

covid19

Simulation of COVID-19 spread in a small community with typical transmission and recovery rates.

Total Population: 10000 people

Initial Susceptible: 9990 people

Initial Infected: 10 people

Initial Recovered: 0 people

Transmission Rate: 0.3

Recovery Rate: 0.1

Time Period: 100 days

Seasonal Influenza

flu

Modeling seasonal flu spread with higher transmission rate and moderate recovery rate.

Total Population: 50000 people

Initial Susceptible: 49950 people

Initial Infected: 50 people

Initial Recovered: 0 people

Transmission Rate: 0.4

Recovery Rate: 0.2

Time Period: 60 days

Measles Outbreak

measles

Highly contagious measles simulation with very high transmission rate and longer infectious period.

Total Population: 20000 people

Initial Susceptible: 19980 people

Initial Infected: 20 people

Initial Recovered: 0 people

Transmission Rate: 0.8

Recovery Rate: 0.05

Time Period: 150 days

Slow-Spreading Disease

slow_spread

Disease with low transmission rate and slow recovery, showing gradual epidemic progression.

Total Population: 15000 people

Initial Susceptible: 14990 people

Initial Infected: 10 people

Initial Recovered: 0 people

Transmission Rate: 0.1

Recovery Rate: 0.05

Time Period: 200 days

Other Titles
Understanding SIR Model Epidemic Calculator: A Comprehensive Guide
Master the fundamentals of mathematical epidemiology and disease transmission modeling. Learn how to use the SIR model to predict epidemic outcomes and inform public health decisions.

What is the SIR Model Epidemic Calculator?

  • Mathematical Epidemiology Foundation
  • Compartmental Modeling Approach
  • Public Health Applications
The SIR Model Epidemic Calculator is a sophisticated mathematical tool that simulates the spread of infectious diseases using differential equations. Based on the foundational work of Kermack and McKendrick (1927), this calculator divides a population into three distinct compartments: Susceptible (S), Infected (I), and Recovered (R). The model tracks how individuals move between these compartments over time, providing crucial insights into epidemic dynamics, peak timing, and final outcomes.
The Three-Compartment System
The SIR model operates on a simple yet powerful principle: individuals can only be in one state at any given time. Susceptible individuals (S) are those who can contract the disease but haven't been infected yet. Infected individuals (I) are currently carrying the disease and can transmit it to others. Recovered individuals (R) have either recovered from the disease or died, and are no longer infectious or susceptible. This compartmental approach allows for precise mathematical modeling of disease transmission dynamics.
Mathematical Foundation and Differential Equations
The SIR model uses a system of three coupled differential equations: dS/dt = -βSI/N, dI/dt = βSI/N - γI, and dR/dt = γI. Here, β represents the transmission rate (how easily the disease spreads), γ represents the recovery rate (how quickly people recover), and N is the total population. The term βSI/N represents the rate of new infections, which depends on the number of susceptible and infected individuals and their contact patterns.
Key Parameters and Their Biological Meaning
The transmission rate (β) combines several biological factors: the probability of transmission per contact, the average number of contacts per person per unit time, and the duration of infectiousness. The recovery rate (γ) is the inverse of the average infectious period. For example, if people are infectious for 5 days on average, γ = 1/5 = 0.2 per day. These parameters can be estimated from epidemiological data or adjusted based on public health interventions.

Key SIR Model Concepts:

  • Susceptible (S): Individuals who can contract the disease
  • Infected (I): Individuals currently carrying and transmitting the disease
  • Recovered (R): Individuals who are no longer infectious or susceptible
  • Transmission Rate (β): Rate of disease spread per contact
  • Recovery Rate (γ): Rate at which infected individuals recover

Step-by-Step Guide to Using the SIR Calculator

  • Parameter Selection and Estimation
  • Input Validation and Constraints
  • Result Interpretation and Analysis
Effective use of the SIR Model Calculator requires careful parameter selection, understanding of model assumptions, and thoughtful interpretation of results. This systematic approach ensures that your simulations provide meaningful insights for public health planning and decision-making.
1. Defining Your Population and Initial Conditions
Start by defining your total population size (N). This could be a city, region, or any closed population where the disease can spread. Set your initial conditions: how many people start in each compartment. Typically, you'll begin with most people susceptible (S₀ ≈ N), a small number infected (I₀), and no recovered individuals (R₀ = 0). Ensure that S₀ + I₀ + R₀ = N to maintain population consistency.
2. Estimating Transmission and Recovery Parameters
The transmission rate (β) is the most critical parameter and often the most difficult to estimate. It depends on the disease's contagiousness, population contact patterns, and environmental factors. For COVID-19, typical values range from 0.2 to 0.4 per day. The recovery rate (γ) is easier to estimate from clinical data: γ = 1/averageinfectiousperiod. For example, if people are infectious for 7 days, γ = 1/7 ≈ 0.14 per day.
3. Setting Appropriate Time Horizons
Choose a time period that captures the full epidemic cycle. For fast-spreading diseases, 30-60 days might suffice. For slower epidemics or to see long-term outcomes, use 100-200 days. The model will show the epidemic curve, including the peak (when the most people are infected) and the eventual decline as the population develops immunity.
4. Interpreting Results and Key Metrics
Key outputs include the basic reproduction number (R₀ = β/γ), which indicates epidemic potential (R₀ > 1 means the disease can spread). The peak infected count and timing show when healthcare systems will face maximum strain. The final recovered count represents the epidemic size—how many people will ultimately be affected. Compare these results to historical data or other models for validation.

Parameter Estimation Guidelines:

  • COVID-19: β ≈ 0.2-0.4, γ ≈ 0.1-0.2 (infectious period 5-10 days)
  • Influenza: β ≈ 0.3-0.5, γ ≈ 0.2-0.3 (infectious period 3-5 days)
  • Measles: β ≈ 0.7-0.9, γ ≈ 0.05-0.1 (infectious period 10-20 days)
  • Ebola: β ≈ 0.1-0.2, γ ≈ 0.05-0.1 (infectious period 10-20 days)

Real-World Applications and Public Health Implications

  • Healthcare Resource Planning
  • Intervention Strategy Development
  • Policy Decision Support
The SIR model serves as a cornerstone for public health decision-making, providing quantitative insights that guide resource allocation, intervention strategies, and policy development. Understanding how to apply these mathematical results to real-world scenarios is essential for effective epidemic management.
Healthcare System Capacity Planning
The peak infected count and timing are crucial for healthcare planning. Hospitals need to know when to expect maximum patient loads and how many beds, ventilators, and staff will be required. The SIR model helps predict these needs weeks or months in advance, allowing for proactive resource allocation. For example, if the model predicts 1,000 infected individuals at peak, and 20% require hospitalization, planners can prepare for 200 hospital beds.
Intervention Strategy Evaluation
Public health interventions can be modeled by adjusting the transmission rate (β). Social distancing, mask mandates, and lockdowns reduce β, while vaccination reduces the susceptible population (S). The model can compare different intervention scenarios: what happens with no intervention versus various levels of social distancing. This quantitative comparison helps policymakers choose the most effective strategies while minimizing economic and social costs.
Vaccination Campaign Planning
Vaccination moves people directly from susceptible to recovered compartments. The model can simulate different vaccination rates and timing to determine optimal campaign strategies. Key questions include: How many people need to be vaccinated to achieve herd immunity? What's the optimal timing for vaccination campaigns? How do vaccination delays affect epidemic outcomes? These insights guide vaccine distribution and prioritization decisions.

Public Health Applications:

  • Hospital capacity planning based on predicted peak infections
  • Social distancing effectiveness evaluation and timing
  • Vaccination campaign optimization and herd immunity targets
  • Travel restrictions and quarantine policy assessment
  • Economic impact analysis of different intervention strategies

Model Limitations and Advanced Considerations

  • Assumptions and Simplifications
  • Model Extensions and Improvements
  • Uncertainty and Sensitivity Analysis
While the SIR model provides valuable insights, it's important to understand its limitations and when more sophisticated models might be needed. Recognizing these constraints helps users interpret results appropriately and avoid overconfidence in predictions.
Key Model Assumptions and Their Implications
The basic SIR model assumes homogeneous mixing—everyone has equal probability of contacting everyone else. This rarely holds in real populations where age, location, and social networks create contact heterogeneity. The model assumes constant transmission and recovery rates, ignoring seasonal effects, behavioral changes, and healthcare improvements. It also assumes a closed population without births, deaths, or migration. These simplifications can lead to prediction errors, especially for long-term modeling.
When to Use More Complex Models
Consider more sophisticated models when dealing with age-structured populations (SEIR models with age groups), diseases with multiple strains (multi-strain models), or when spatial spread is important (metapopulation models). For diseases with long incubation periods, add an Exposed compartment (SEIR model). For diseases with waning immunity, use SIRS models where recovered individuals can become susceptible again. Agent-based models can capture individual-level heterogeneity and complex contact patterns.
Uncertainty Quantification and Sensitivity Analysis
Model parameters are estimates with uncertainty. Conduct sensitivity analysis by varying parameters within plausible ranges to see how results change. This helps identify which parameters most affect outcomes and where better data is needed. Use confidence intervals or probability distributions for parameters rather than point estimates. Consider multiple scenarios (best case, worst case, most likely) to capture uncertainty in predictions.

Model Limitations to Consider:

  • Homogeneous mixing assumption ignores social network structure
  • Constant transmission rates don't capture behavioral changes
  • Closed population assumption excludes births, deaths, and migration
  • No age structure or demographic heterogeneity
  • Single strain assumption for multi-strain diseases

Mathematical Derivation and Advanced Concepts

  • Differential Equation System
  • Basic Reproduction Number Derivation
  • Epidemic Threshold Analysis
Understanding the mathematical foundation of the SIR model enhances interpretation and enables customization for specific applications. The differential equations capture the fundamental dynamics of disease transmission and recovery.
Derivation of the SIR Differential Equations
The SIR equations derive from mass action principles: the rate of new infections is proportional to the product of susceptible and infected individuals. The term βSI/N represents the infection rate, where β is the transmission rate per contact, S is the number of susceptibles, I is the number of infected, and N is the total population. The factor 1/N normalizes for population size. The recovery rate γI represents individuals leaving the infected compartment at rate γ per person. These equations form a coupled system where changes in one compartment affect the others.
Basic Reproduction Number (R₀) Analysis
The basic reproduction number R₀ = β/γ is a fundamental epidemiological parameter. It represents the average number of secondary infections caused by one infected individual in a fully susceptible population. When R₀ > 1, the disease can spread and cause an epidemic. When R₀ < 1, the disease will die out. R₀ combines transmission potential (β) with infectious duration (1/γ). For example, if β = 0.3 and γ = 0.1, then R₀ = 3, meaning each infected person infects 3 others on average.
Herd Immunity Threshold and Final Epidemic Size
The herd immunity threshold is the fraction of the population that must be immune (through infection or vaccination) to prevent sustained transmission. It's given by 1 - 1/R₀. For R₀ = 3, the threshold is 1 - 1/3 = 67%. The final epidemic size can be estimated using the final size equation: R(∞) = N - S(∞), where S(∞) is the final number of susceptibles. This relationship helps predict the total number of people who will be affected by the epidemic.

Mathematical Relationships:

  • R₀ = β/γ: Basic reproduction number formula
  • Herd immunity threshold = 1 - 1/R₀
  • Peak timing ≈ ln(R₀)/(β-γ) for large populations
  • Final epidemic size depends on initial conditions and R₀
  • Epidemic growth rate = β - γ in early stages