FreeSimulationNo signup

SEIR Epidemic Simulator

Simulate a pandemic in your browser. Move the sliders and watch the curve bend.

Ready
Step 0 / 0
Agents: 0
SusceptibleExposedInfectedRecoveredDeceasedEmpty
10/s

Parameters

0.300

Per-contact probability of infection.

0.050.9
5
114
14
530
0.020
00.1

Tweak parameters, then press Reset to apply.

What you just saw

A population moves around a shared space. Infected agents transmit to susceptible neighbors within a contact radius, and the familiar epidemic curve rises, peaks, and falls. The shape of the curve — when it peaks, how tall it gets, how much of the population ever gets exposed — is set almost entirely by three numbers: transmission rate, incubation period, and recovery period.

The science behind it

The SEIR model divides a population into four compartments — Susceptible, Exposed, Infected, Recovered — and tracks the flow between them. It is the workhorse of infectious disease modeling and was parameterized extensively with real COVID-19 data during 2020-2022. The agent-based implementation here gives you the same dynamics but with spatial structure: transmission depends on proximity, not just mixing, so you can see wavefronts of infection sweep the grid.

Try these experiments

  1. 1. Slow burn

    Settings: transmission_rate = 0.1

    What to look for: Long, shallow curve. Endemic equilibrium possible.

  2. 2. Classic wave

    Settings: transmission_rate = 0.3

    What to look for: Clean wave shape with a single peak around day 60-90.

  3. 3. Explosive

    Settings: transmission_rate = 0.6

    What to look for: The wave finishes almost immediately. Most of the population is infected in ~30 days.

Sprint 1 scaffold. Full long-form article, references, and FAQ will land in the content sprints (3–6). The simulation above is already wired to the production worker.
SimLab

Run this at 100x scale

SEIR epidemic runs in your browser up to 5,000 agents. With SimLab, the same model runs on GPU at 50M+, with ensemble parameter sweeps and publication-ready output.

from scirouter import SciRouter
client = SciRouter(api_key="sk-sci-...")
result = client.simulation.run(
    model="seir",
    params={"population": 5_000_000, "transmission_rate": 0.3,
            "incubation_period": 5, "recovery_period": 14,
            "mortality_rate": 0.015},
    steps=365,
    seed=42,
)
print(result.metrics["peak_infections"])

Related simulations

Frequently asked questions

What is R₀?

R₀ (basic reproduction number) is the expected number of secondary infections caused by one infected individual in a fully susceptible population. In this simulator the transmission rate slider is a proxy — higher transmission rate, higher R₀.

Why is this a grid instead of a network?

Spatial grids are the simplest way to introduce spatial structure without importing real network data. For policy work you need real mobility data; for intuition-building, the grid is enough.

How is this different from SIR?

SIR has only three compartments (no exposed/incubation state). SEIR adds the exposed compartment so the lag between infection and infectiousness matters — which is critical for COVID-style diseases.