Calculator Inputs
Tip: keep S0 + I0 + R0 equal to total population for a valid compartment balance.
Example Data Table
| Scenario | Population | S0 | I0 | R0 | β | γ | Days | Δt |
|---|---|---|---|---|---|---|---|---|
| Campus spread | 5,000 | 4,990 | 10 | 0 | 0.28 | 0.11 | 90 | 1 |
| Urban wave | 25,000 | 24,950 | 50 | 0 | 0.36 | 0.09 | 140 | 0.5 |
| Contained outbreak | 12,000 | 11,985 | 15 | 0 | 0.18 | 0.12 | 75 | 1 |
Formula Used
The SIR model divides a fixed population into susceptible, infected, and recovered compartments. The governing differential system is:
dS/dt = -βSI/N
dI/dt = βSI/N - γI
dR/dt = γI
In this solver, the values are updated stepwise with Euler integration:
St+1 = St - (βStIt/N)Δt
It+1 = It + [(βStIt/N) - γIt]Δt
Rt+1 = Rt + γItΔt
The basic reproduction number is R₀ = β / γ. Values above 1 usually indicate outbreak growth in the early phase.
How to Use This Calculator
- Enter the total population under study.
- Set starting values for susceptible, infected, and recovered groups.
- Input the transmission rate and recovery rate.
- Choose the number of simulation days and time step.
- Press Solve SIR Model to generate the epidemic path.
- Review peak infection, attack rate, final totals, and the simulation table.
- Use the CSV or PDF buttons to save the output.
Frequently Asked Questions
1. What does the SIR model represent?
It represents how a fixed population moves between susceptible, infected, and recovered states over time. It is widely used for outbreak teaching, planning, and simple forecasting.
2. What does β mean here?
β is the transmission rate. Higher values mean infections spread faster because susceptible and infected individuals generate more successful transmission events per unit time.
3. What does γ mean here?
γ is the recovery rate. Larger values move people out of the infected compartment faster, reducing the average infectious period and often lowering the peak.
4. Why must S0, I0, and R0 add up to N?
The model assumes a closed population. Every person must belong to exactly one compartment at the start, so the initial totals must equal the full population.
5. What is the reproduction number?
The calculator reports β divided by γ. When that value is above one, infections usually grow initially. When it is below one, outbreaks tend to decline.
6. Why does the time step matter?
Smaller time steps usually give smoother, more stable approximations in Euler solvers. Large steps can distort peaks, timing, and compartment totals in fast-changing scenarios.
7. Can I use this for real policy decisions?
Use it carefully. This is a simplified compartment model without births, deaths, age structure, vaccination, mobility, or stochastic effects. It is best for educational or preliminary analysis.
8. What does attack rate mean in the results?
It shows the percentage of the population that has ever been infected by the end of the selected simulation period, based on population minus final susceptible.