This is a teaching model, and it is not a forecast of any real outbreak. The susceptible–infectious–recovered system is the simplest compartmental model in epidemiology, introduced in the 1920s, and it is taught because its behaviour can be understood completely rather than because it predicts anything accurately. This page integrates those equations from parameters you enter and shows what they imply. It carries no data about any pathogen, no preset representing any real disease, and no claim about any actual epidemic, past or present.
The assumptions are strong and every one of them is false in the real world. The model assumes a closed population with no births, deaths from other causes, arrivals or departures. It assumes homogeneous mixing — that every person is equally likely to encounter every other, so there are no households, workplaces, schools, cities or travel networks. It assumes no age structure, so a child and an eighty-year-old are interchangeable. It assumes no behaviour change: people act identically on day one and at the peak. And it assumes constant parameters throughout, with no seasonality, no waning immunity, no variants and no interventions. Real epidemics violate all five. Arb Digital publishes this page so the mechanism can be studied, not so a number can be quoted.
What This SIR Model Calculator Does
It divides a fixed population into three compartments — susceptible, infectious and recovered — and integrates the three coupled differential equations that move people between them using a fourth-order Runge–Kutta scheme with a small fixed step. It then reports the peak number infectious at any one moment, the day that peak occurs, the fraction of the population ever infected by the end of the run, the effective reproduction number at the start, and the classical threshold value.
Every parameter is yours. R₀ and the infectious period are inputs, not lookups, because a reproduction number is a property of a pathogen and a population and a moment in time, and any figure printed on a page like this would be misleading within weeks. The tool will not tell you what value to use, and it deliberately offers no preset labelled with a disease name.
Alongside the numerical result the tool prints two analytic checks. The peak prevalence and the final size both have closed-form expressions in the SIR model, and comparing them against the integration is how you confirm the arithmetic rather than trusting it. Where they disagree by more than a rounding error, the run has not gone to completion and the day count needs extending.
How to Use It
- Set the population and the seed. The seed only shifts the timing; it has almost no effect on the peak height or the final size.
- Enter an R₀ and an infectious period that you have taken from a source you can cite, or that you simply want to explore as a hypothetical.
- Add any starting immunity as a percentage, to see how a partly protected population changes the trajectory.
- Run it and read the peak, then check the analytic panel agrees with the integration.
- Change one parameter at a time and observe which outputs move. That is what the model is for.
The Equations and How They Are Solved
Write S, I and R for the numbers in each compartment, with S + I + R = N held constant. The system is
dS/dt = −βSI/N, dI/dt = βSI/N − γI, dR/dt = γI
where γ is one divided by the mean infectious period and β = R₀γ. The first term says infections occur in proportion to the chance of a susceptible meeting an infectious person, which is where the homogeneous mixing assumption enters. Wolfram MathWorld's page on the SIR model sets out the same system and its standard results.
The epidemic grows only while dI/dt > 0, which requires βS/N > γ, that is R₀S/N > 1. The quantity R₀S/N is the effective reproduction number, and the peak is precisely the moment it passes through one. Setting S/N = 1/R₀ at that moment gives the herd immunity threshold 1 − 1/R₀.
Two exact results follow. The peak fraction infectious, starting from an almost wholly susceptible population, is 1 − 1/R₀ − ln(R₀)/R₀. And the final fraction ever infected, z, satisfies the implicit equation 1 − z = e−R₀z. Both are printed in the check panel.
Work the default values through. With R₀ = 2.5 the threshold is 1 − 0.4 = 60%. The peak fraction is 1 − 0.4 − ln(2.5)/2.5 = 0.6 − 0.9163/2.5 = 0.6 − 0.3665 = 0.2335, so about 23.35% of a million people, or roughly 233,500, are infectious simultaneously at the peak. Solving 1 − z = e−2.5z numerically gives z ≈ 0.893, so the model implies about 89% are eventually infected — well above the 60% threshold, because the epidemic overshoots.
The Overshoot, and Why the Threshold Is Not the End
That gap between 60% and 89% is the most instructive thing the model produces, and it is routinely misread. The threshold is the point at which the epidemic stops growing. It is not the point at which it stops. At that moment there is still a large infectious population, and every one of those people goes on to infect others as the curve descends.
The size of the overshoot rises steeply with R₀. Press the higher-R₀ button and the threshold moves to 75% while the final size goes above 98%. Reading “herd immunity at 75%” as “25% never infected” is wrong by a wide margin inside the model's own logic, quite apart from whether the model applies at all.
The same arithmetic shows why the timing of any intervention matters more than its strength in this model. Nothing applied after the peak affects the peak. Our exponential growth calculator handles the early phase, where the infectious count really does grow close to exponentially before the susceptible pool starts to deplete, and our doubling time calculator converts that early growth rate into a doubling time.
Where This Model Breaks, in Detail
Homogeneous mixing is the assumption that fails hardest. Real contact networks are highly structured, with a minority of people accounting for a large share of contacts. Heterogeneity of that kind lowers the final size substantially for the same R₀, because the highly connected are infected early and then stop transmitting. A model like this one systematically overstates the final size for that reason alone.
The constant recovery rate is the second problem. It makes the infectious period exponentially distributed, so some people recover almost immediately and a few remain infectious for many times the mean. Real infectious periods are far more tightly concentrated, and this difference changes the shape and the timing of the peak even when the average is right.
The absence of behaviour change is the third. People respond to an epidemic, and that response is itself a function of the epidemic's size, which makes the true system feedback-driven in a way no constant-parameter model captures. A review of how modellers actually handle early epidemic growth, and how much the choice of model changes the answer, is published in Mathematical models to characterize early epidemic growth: A Review in PMC.
Finally, there is no compartment here for deaths, hospitalisation, latency before infectiousness, waning immunity, reinfection, age structure or geography. Every one of those is standard in applied work, and each changes the answer. The World Health Organization's disease outbreaks topic is the appropriate starting point for information about any actual outbreak; this page is not.
What the Model Is Genuinely Good For
Three things, and they are worth having. It shows why an epidemic peaks and turns over without anyone doing anything — susceptible depletion alone is sufficient, which is not obvious until you see it. It shows that the peak height and the final size are governed almost entirely by R₀, while the timing is governed by the infectious period and the seed. And it makes the overshoot visible, which is the single most commonly misunderstood feature of epidemic dynamics.
It is also a good introduction to numerical integration of a coupled system, since the equations are simple enough to check by hand at the boundaries and the closed-form results give an exact target. Our percentage calculator is useful for converting the fractions here into counts, and our half-life calculator covers the exponential decay that governs the recovery compartment.
Arb Digital builds free tools that say what they cannot do as clearly as what they can.
Browse All Free Tools Talk To Our TeamCommon Mistakes to Avoid
- Treating the output as a forecast — it is the consequence of five assumptions that are all false, and it describes no real population.
- Reading the threshold as the final size — the epidemic overshoots it, often by a very large margin, because infectious people remain when growth stops.
- Looking up an R₀ and treating it as fixed — it depends on the population and the moment as much as on the pathogen, and it changes continuously.
- Ignoring the exponential infectious period — a constant recovery rate implies a distribution nothing like a real infectious period, which distorts the peak.
- Comparing runs with different day limits — a run that stops before the curve flattens understates the final size and the analytic check will say so.
Related Free Tools From Arb Digital
Model the early exponential phase with the exponential growth calculator, convert a growth rate into a doubling time with the cell doubling time calculator, handle exponential decay with the half-life calculator, convert fractions to counts with the percentage calculator, or work with rates of change using the exponent calculator. The full free online tools hub lists every mathematics tool we publish.
Frequently Asked Questions
No. It is a teaching model. It integrates a textbook system of equations from parameters you supply, contains no data about any pathogen or population, and should not be used to anticipate any actual outbreak.
A closed population, homogeneous mixing with no network structure, no age structure, no behaviour change, and constant parameters throughout. Real epidemics violate every one of these.
Because a reproduction number depends on the population and the moment as much as on the pathogen. Any figure printed here would be misleading, so it is an input you take from a source you can cite.
One minus one over R zero. It is the point at which the epidemic stops growing, not the point at which it stops, and the final number infected substantially exceeds it.
Because a large number of people are still infectious when growth stops, and each of them continues to transmit as the curve falls. The overshoot grows steeply with the reproduction number.
It is the reproduction number multiplied by the susceptible fraction at the start. If it is below one the model produces no epidemic at all, whatever the reproduction number is.
With a fourth-order Runge-Kutta scheme at a small fixed step. The result is checked against the closed-form peak and final-size expressions, which are printed alongside it.
Mainly because homogeneous mixing ignores network structure. In a real population the most connected people are infected early and stop transmitting, which lowers the eventual total for the same reproduction number.
This page is an educational illustration of a mathematical model and is not medical or public health advice, nor a prediction about any disease. For information about any actual outbreak, consult a qualified clinician and your national public health authority, such as the World Health Organization or your own country's health agency.