Infectious Disease Modeling Calculator

A learning workspace for the key equations in your infection modeling handout: reproduction numbers, force of infection, final size, herd immunity, transmission risk, growth, and age-at-infection.

Basic Reproduction Number

R0 = c beta D

R0 is the average number of secondary infectious people caused by one infectious person in a fully susceptible population. Values above 1 can grow; values below 1 tend to die out.

Herd Immunity Threshold

HIT = 1 - 1 / R0

The threshold is the immune share needed to bring the net reproduction number to 1 under random mixing. Vaccine coverage must be higher if effectiveness is below 100%.

Final Epidemic Size

R0 = -ln(1 - z) / z

For a closed, randomly mixing population, z is the proportion infected by the end of an epidemic starting in a susceptible population.

Force of Infection

lambda(t) = beta I(t) / N(t)

Force of infection is the per-susceptible rate of acquiring infection. With frequency-dependent mixing, it depends on prevalence I/N and effective transmission beta.

Reed-Frost and Partnership Risk

P = 1 - (1 - p)I; beta = 1 - (1 - betaact)n

Repeated independent exposure compounds risk. The same idea applies to a susceptible person meeting I infectious people, or to n transmission opportunities in one partnership.

Early Growth and Doubling Time

I(t) = I(0)ert; Td = ln(2) / r

During early epidemic growth, infectious counts are often approximated as exponential. For an infection with removal rate gamma and mortality mu, one simple growth form is r = c beta - gamma - mu.

Age-Specific Infection

s(a) = e-lambda a; z(a) = 1 - e-lambda a; A = 1 / lambda

If the average force of infection is constant across ages, susceptibility declines exponentially with age and the average age at infection is approximately the reciprocal of lambda.

Inter-Epidemic Period

T approx 2 pi sqrt(A(D + D'))

For immunizing infections with recurrent epidemics, the period between peaks is often approximated by a square-root relation using average age at infection and the generation interval.

SIR Model Simulator

dS/dt = -beta S I / N; dI/dt = beta S I / N - gamma I; dR/dt = gamma I

The SIR system turns the reproduction-number ideas into a trajectory. This simple Euler simulation shows susceptible, infectious, and recovered counts over time.

SEIR Model Simulator

dS/dt = -beta S I / N; dE/dt = beta S I / N - sigma E; dI/dt = sigma E - gamma I; dR/dt = gamma I

SEIR adds an exposed compartment for people who are infected but not yet infectious. It is useful when a disease has an incubation or latent period before transmission begins.

SIS Model Simulator

dS/dt = -beta S I / N + gamma I; dI/dt = beta S I / N - gamma I

SIS is for infections where recovery does not create lasting immunity. Recovered people return to the susceptible compartment, so an endemic steady state can appear when R0 is above 1.

Vaccination-Aware SIR

S0 = N - I0 - v e N; R0,initial = v e N; Re = (beta / gamma)(S / N)

This version moves effectively immunized people into the recovered compartment before the epidemic starts. It shows how coverage and effectiveness reduce the initial susceptible pool and the effective reproduction number.

Two-Group Mixing Model

lambda1 = beta(c11 I1/N1 + c12 I2/N2); lambda2 = beta(c21 I1/N1 + c22 I2/N2)

Heterogeneous mixing lets different activity or age groups experience different force of infection. This simple two-group calculator uses a contact matrix to estimate each group's infection pressure and a next-generation R0.