How this branching process calculator works
A Galton–Watson branching process tracks how populations reproduce in discrete generations when each individual produces a random number of offspring. It is the same mathematical skeleton behind nuclear chain reactions, family names persisting across centuries, viral content, and even extinction risk in conservation biology. Each individual’s children are independent draws from a fixed distribution. The key question is whether the family tree will eventually die out, grow without bound, or hover on the knife’s edge between those outcomes. This calculator lets you explore that threshold by feeding in an offspring distribution, calculating the mean and variance, and propagating extinction probabilities generation by generation.
The reproduction law is summarized by its probability generating function (PGF) G(s), where the coefficient of sk equals the probability of having k offspring. If we denote the probability of eventual extinction by q, the fundamental fixed-point equation is:
The smallest root in the interval [0,1] is the extinction probability for a single founder; for multiple initial individuals, the combined probability is qn. Criticality depends on the mean number of offspring m = G’(1). If m < 1 the process is subcritical and extinction is certain; if m = 1 the process is critical with slow growth and eventual extinction; if m > 1 there is a positive chance of survival.
The tool evaluates your chosen distribution in three ways. First, it computes the mean m and variance. Second, it iterates the PGF to generate extinction probabilities for each generation, starting with q0 = 0 (no extinction at generation zero) and applying qt+1 = G(qt). Third, it multiplies those probabilities across the initial population to show the likelihood that everyone has died out by generation t. Because the process is memoryless apart from the current generation size, the iteration captures the full trajectory without simulating individual lineages.
Interpreting mean, variance, and criticality
The mean number of offspring m tells you whether growth is expected to fade or explode. Variance describes volatility: two distributions with the same mean can have very different extinction risks because highly variable families can sometimes fail to produce a next generation entirely. Here are typical distributions supported in the calculator:
- Poisson(λ): suitable for random counts like radioactive decay or spontaneous branching. Mean and variance both equal λ.
- Binomial(n, p): caps offspring at n and reflects repeated Bernoulli trials, such as seeds germinating.
- Custom discrete: enter explicit probabilities to mirror real data, e.g., certain species litters or fertility surveys.
The fixed-point equation reveals that subcritical and critical processes have extinction probability one. Supercritical processes have a nontrivial root below one; that root shrinks as the mean increases. The calculator solves this root numerically via iteration until convergence, providing you with the eventual extinction probability alongside the generation-by-generation path.
Worked example
Imagine a pathogen where each infected person passes the virus to a Poisson-distributed number of others with λ = 0.8. Starting with five index cases, what is the chance the outbreak fizzles by the 10th generation? The mean m = 0.8 indicates a subcritical process, so extinction is guaranteed in the long run. Iterating the PGF yields extinction probabilities approaching one quickly: by generation 5, q5 is around 0.74 for each index case; by generation 10 it exceeds 0.93. Raising these to the fifth power shows the entire cluster is 69% likely to be gone by generation 5 and over 73% gone by generation 10. The table below compares this scenario with a critical and supercritical variant:
| Scenario | Mean offspring m | Extinction by gen 10 (one founder) | Eventual extinction probability |
| Subcritical Poisson λ = 0.8 | 0.8 | 0.93 | 1.00 |
| Critical Poisson λ = 1.0 | 1.0 | 0.83 | 1.00 |
| Supercritical Poisson λ = 1.3 | 1.3 | 0.59 | 0.23 |
Limitations and assumptions
This tool assumes independent, identically distributed reproduction across individuals and generations. It does not incorporate age structure, resource limits, or feedback where population size influences fertility. For large generation counts, floating-point rounding can slightly affect the iterative path, though the eventual extinction root remains stable. Custom distributions must sum to one; if inputs are inconsistent, the calculator rescales them but warns you. Finally, while branching processes illuminate many real systems, they are idealized; real-world dynamics like migration, immunity, or social behavior may alter outcomes.