Herd model
Guinea pig herd planner
How long a herd takes to grow, with no selling or neutering.
Starting with guinea pigs, you'd have …
Herd size
The average of all the ways the herd could go, on a log scale. Starting pigs are mature and unrelated, and the sows are bred on day 0. Daughters first give birth at age M + gestation, then every interval until they die or stop breeding. Births need a fertile boar, floor space (if limited) and are reduced by inbreeding. The Luck tab shows how far real herds stray from this line.
Show the herd table
| Day | Sows | Boars | Total | Inbreeding F |
|---|
Self-checks: running…
The herd over time
From the average model. The inbreeding chart adds the Monte Carlo spread once the Luck tab has run.
Who is in the herd
What the losses are
Inbreeding of newborn pups
Floor space and running cost
Simulates every pig one by one, many times over. Luck only uses your assumptions exactly; luck plus input uncertainty also redraws litter size, first-litter size, pup survival, lost litters, the interval between litters, sow risks, mortality and inbreeding load in each run, each within ±u%. Runs are split between the two, spread over your processor cores and shown as they finish; Stop keeps what has finished. 100,000 runs to 10,000 pigs take a few minutes.
How long it takes, run by run
Chance of reaching N by each date
Herd size over time
Have the results settled?
Repeats the luck-only simulation for starting herds of 2 to 40 unrelated pigs, with the sex split set in your assumptions, and plots the days to reach N and the share of runs that never get there.
Press Run. With 500 runs per size this takes about a minute on a typical laptop for 10,000 pigs.
Deaths by age: published study vs simulated herds
Share dying in each half-year of age. Dots are the published study of UK pet guinea pigs (Mata, PeerJ 2025); the dashed line is the table the model uses; the solid line and shaded band are what pigs in the luck-only runs actually experienced (all pigs pooled, and the middle 80% of runs).
Which assumption matters most
Days to reach N when each assumption is moved 10% down or up, with everything else held fixed. The longer the bar, the more the answer depends on getting that assumption right.
How the model works
One trip around the loop is a generation: a sow's daughters grow up and become breeding sows themselves. Every arrow can lose pigs, and the numbers follow your assumptions.
With your assumptions
Inputs
A is a sow's age at her first litter, aj her age at litter j, R the age she stops breeding, and c the expected surviving daughters per later litter (L litter size, s pup survival, f female share).
Adjustments per litter
Sow survival combines background mortality with an extra hazard hb while breeding (from age M until she stops):
Background survival ℓ(a) is either flat, (1−m)a/365, or the table below, with a constant daily hazard inside each half-year band k:
Source and caveats. This is not an official mortality table. It comes from one study (Mata, PeerJ 2025): Kaplan–Meier on the ages at death of 675 pet guinea pigs that died under UK vet care in 2019 (Royal Veterinary College VetCompass records), in half-year intervals with no censoring.
- It is the age-at-death distribution of one year's deaths, not a cohort followed from birth. Treating it as death probabilities by age assumes the pet population was stable over time, which is untested.
- Only animals that reached a vet are included. Pups that die at breeders or before sale (~6–8 weeks) are mostly missing, so early-age deaths are likely understated. Pup losses are modelled separately through s.
- These are pets, not breeding sows. Sows that breed repeatedly likely die faster at the same age; d and hb cover that, but hb is an assumption with no data behind it.
- The tail rests on very few animals: the 7.5–8 yr value (0.27) is smoothed to 0.46, and values past 8.5 years are extrapolated.
ρ1 ≈ 0.8: first litters averaged 3.2–3.5 pups vs 3.6–4.7 for later ones in a breeding colony (Rowlands, J. Hygiene, 1949). φ: pups of sows over 900 days survived 0.43 vs 0.71 in a lab colony (ratio 0.61).
Daughters per sow (R₀) and growth rate (Euler–Lotka)
This counts litters by number (j), which is exact for an uncrowded herd with a boar present. The simulation tracks, for each age group, the share of sows that haven't had a litter yet, so a sow that misses a cycle (crowding, no boar) still gets the smaller first litter when she finally breeds.
The herd grows if and only if R₀ > 1; the right side falls as r rises, so there is exactly one root. T̄ is the generation time (average age of mothers). This r is the growth rate of an uncrowded, non-inbred herd; crowding and inbreeding only slow it.
Boar availability
The chance a fertile boar was alive at conception: all nb starting boars dead, and no young fertile male (Poisson approximation, Mb = expected males born on day b). β → 1 as the herd grows.
Crowding (no selling or neutering)
A sow conceives with probability δ at conception time; a sow that doesn't waits for her next cycle. With no culling, births fall to zero as the herd fills its space, so it levels off near K. A fast-growing herd can overshoot K for a while (by ~15% with no deaths and back-to-back litters) because pregnancies already underway still deliver. If N > K, the herd never reaches N. This logistic form is an assumption: guinea pigs breed less when crowded, but the exact curve isn't measured.
Inbreeding
Nf = sows of breeding age, Nm = fertile boars, θ = average relatedness (coancestry) of the breeders, F = inbreeding of pups born now. Starting pigs are assumed unrelated. 2B is the number of lethal equivalents: about 3.1 is the median for juvenile survival across 40 zoo mammal populations (Ralls, Ballou & Templeton, Conservation Biology 1988; the exact figure couldn't be checked against the paper). At F = 0.25 (full-sib parents) that cuts pup survival by about 32%. This uses effective population size, not a full pedigree; the Monte Carlo uses the same approximation with actual counts. In the average model Ne comes from average herd sizes, which runs that died out pull down, so for very small starting herds (under ~10) it overstates inbreeding and runs a few percent to ~15% pessimistic; the Monte Carlo is the better guide there.
Whole-litter stillbirths
Same average, more variable outcomes; it only matters in the Monte Carlo.
Costs and space
Upkeep is summed over pig-days until the herd reaches N. Default prices are pet-owner prices; a breeder buying in bulk would pay less per pig.
Special case: Fibonacci-like
With no mortality, no retirement, ρ₁ = 1, and a first litter exactly two intervals after birth (A = 2I), set x = erI:
Sources: Mata, PeerJ 2025 (UK pet guinea pig lifetable); Rowlands, J. Hygiene 1949 (litter size by parity); Ralls, Ballou & Templeton, Conservation Biology 1988 (inbreeding); lab colony study, PMC10000240 (pup survival).
Code: github.com/justinalick/guinea-pig-calculator (MIT). Name, handle, punk and visual identity excluded, all rights reserved; see NOTICE.