# Epidemic model (SIR) > How does an epidemic rise, peak and fade? The SIR model: the peak, how many catch it in all and the herd immunity threshold, from R₀ and the infectious period. Simulate an outbreak with the SIR model: from R₀ and the infectious period, see the peak day, how many catch it in all and the herd immunity threshold. - Page: https://how.box/epidemic/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/epidemic/?r={r}&d={d}&n={n}&i={i}&v={v} - `r` (number 0.1 to 20): Basic reproduction number R0. Example: `2.5`. - `d` (number 0.5 to 100): Infectious period in days. Example: `7`. - `n` (whole number 100 to 1e10): Population. Example: `100000`. - `i` (whole number 1 to 1e10): Infected at day 0. Example: `10`. - `v` (number 0 to 99): Immune at day 0, percent. Example: `0`. Example answer: https://how.box/epidemic/?r=2.5&d=7&n=100000&i=10&v=0 A complete link carries the primary answer in the page HTML; a missing or invalid value shows the default page. ## Agent tools - `epidemic_simulate`: The SIR epidemic teaching model (Kermack–McKendrick; never a forecast). - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"epidemic_simulate","arguments":{"r0":2.5,"infectious_days":7,"population":100000,"initial_infected":10,"immune_percent":0}}}` - GET: https://how.box/mcp/run/epidemic_simulate?r0=2.5&infectious_days=7&population=100000&initial_infected=10&immune_percent=0 ## How it works The SIR model splits a population into the Susceptible, who can still catch the disease, the Infected and the Recovered, who are immune. Each day an infected person meets enough people to pass it on at the rate β, and recovers at the rate γ = 1/D, where D is the infectious period: dS/dt = −β·S·I/N, dI/dt = β·S·I/N − γ·I and dR/dt = γ·I. The basic reproduction number is R₀ = β/γ. Infections grow while R₀ times the susceptible share is above 1, so they peak exactly when the susceptible share falls to 1/R₀, the dashed line. This is the herd immunity threshold: once 1 − 1/R₀ of people are immune, an outbreak cannot grow. With R₀ = 2.5 that is 60%. The outbreak does not stop there, though: in a town of 100,000 with 10 first cases, about 23% are ill at once at the peak and about 89% catch it in all, from the final-size equation s∞ = s₀·e^(−R₀(1 − s∞)). This is a teaching model, never a forecast. It assumes everyone mixes evenly, immunity lasts, and nothing changes as the outbreak grows: no distancing, seasons, age groups, births or deaths. Real epidemics bend away from it for all those reasons. Sources: Kermack and McKendrick (1927); the SIR model module of the Mathematical Association of America (Smith and Moore). ## FAQ **What R₀ do real diseases have?** Published estimates vary with place and time: seasonal flu is often put near 1.3, the original COVID-19 strain around 2 to 3 and measles 12 to 18. R₀ is not a fixed property of a germ: it depends on how people live and meet. **Why doesn't the epidemic stop at the herd immunity threshold?** At the threshold infections stop growing, but many people are still infected and keep passing it on as the outbreak declines. That overshoot is why far more than 1 − 1/R₀ end up infected. **What does vaccinating before the outbreak do?** Immune people start in R. If the immune share is above 1 − 1/R₀, R at the start falls below 1 and the outbreak fades at once. Try it. **Why does a longer infectious period make it slower but not smaller?** With R₀ fixed, a longer infectious period stretches the same curve over more days. The peak height and the final size depend only on R₀ and who is immune. **Is the herd immunity threshold the same as the share who get infected?** No. The threshold, 1 − 1/R₀, is the immune share at which an outbreak stops growing. The outbreak still carries on a while, so the share who catch it in all is higher. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)