SIR Model Epidemic Calculator
Simulate susceptible, infected, and recovered populations with a deterministic infectious disease model.
Understanding the SIR epidemic model
SIR model examples
These examples illustrate how transmission and recovery assumptions change an epidemic curve.
| Starting scenario | Expected pattern | Interpretation |
|---|---|---|
| N 10,000; S 9,990; I 10; beta 0.3; gamma 0.1; 100 days | Initial growth with R0 of 3 | Illustrative community outbreak |
| N 1,000; S 990; I 10; beta 0.08; gamma 0.1; 60 days | Infections generally decline | R0 below 1 |
| N 50,000; S 39,990; I 10; R 10,000; beta 0.2; gamma 0.1 | Slower growth than a fully susceptible population | Preexisting immunity reduces effective spread |
How to run an SIR simulation
- Enter a total population and initial susceptible, infected, and recovered counts that add to that total.
- Enter daily transmission and recovery rate assumptions as decimals.
- Choose the number of whole days to simulate.
- Run the model and compare final compartments, peak infections, and the reproduction number.
SIR model FAQ
What do beta and gamma mean?
Beta controls the rate of potentially infectious contact in this simple model. Gamma is the daily recovery rate, so its reciprocal approximates the average infectious duration.
What does an R0 above one indicate?
Under the model's assumptions, each infected person initially produces more than one new infection on average. It indicates potential growth, not a guaranteed forecast.
Why must the three compartments equal the population?
Every person in a closed SIR population must occupy exactly one compartment. A mismatch would create or omit people and violate conservation in the equations.
Does the model include vaccination or reinfection?
This basic version includes neither a vaccination flow nor loss of immunity. More advanced compartment models can add those mechanisms.
How accurate is the one-day simulation?
Daily Euler steps provide a transparent approximation for learning and scenario comparison. Research or policy work should use calibrated models, finer numerical methods, and uncertainty analysis.