Two populations, two coupled equations
Fox and rabbits is a live implementation of the Lotka-Volterra equations, independently proposed by Alfred Lotka (1925) and Vito Volterra (1926) to describe how a predator and a prey species regulate each other's numbers over time. Let R be the number of rabbits and F be the number of foxes:
dR/dt = α·R − β·R·F (rabbits grow, but are eaten by foxes) dF/dt = δ·R·F − γ·F (foxes need rabbits to grow, else starve)
Each term has a plain reading. α·R is exponential rabbit growth in the absence of foxes — plenty of grass, no predators, the population would simply explode. β·R·F is the rate rabbits get eaten, proportional to how often a fox and a rabbit meet, which itself scales with the product of the two populations. δ·R·F is how that predation converts into new foxes, and γ·F is foxes starving to death at a constant rate when there is nothing to eat.
Why the populations chase each other in circles
Plug in typical starting numbers and you get the pattern every biology student eventually recognises: rabbits multiply while foxes are scarce, the growing rabbit population feeds a growing fox population, the fox population then overshoots and eats rabbits faster than they can reproduce, rabbits crash, and with nothing left to eat the fox population crashes too — clearing the way for rabbits to recover and the cycle to repeat. Plotted as two lines over time, both populations oscillate; plotted against each other on a phase plane (rabbits on one axis, foxes on the other) the system traces a closed loop that repeats forever in the idealised model, with the fox curve consistently lagging behind the rabbit curve — predators respond to prey abundance, not the other way around.
This is not just a toy: the very first quantitative test came from real fur-trading records. The Hudson's Bay Company's nearly century-long ledger of lynx and snowshoe hare pelts, collected across Canada from the 1840s onward, shows almost exactly this kind of out-of-phase oscillation, and it remains one of ecology's most cited pieces of evidence for predator-prey cycling in the wild.
Where the idealised model breaks down
The classic Lotka-Volterra equations conserve a quantity analogous to energy, so in the pure mathematical model the oscillations never damp out or grow — an idealisation that assumes unlimited rabbit food, no other predators, no disease and no random fluctuations. Real ecosystems add friction: a carrying capacity term caps rabbit growth even without foxes (there is only so much grass), which tends to damp the oscillation toward a stable equilibrium point rather than an eternal loop. Add spatial structure, seasons, or a third species and the tidy closed loop can become far more irregular, sometimes even chaotic.
The version on this site keeps the classic two-term model, integrated one small time step at a time so the population curve you see building up on the chart really is being computed live, not replayed from a canned animation — nudge the sliders for growth or predation rate mid-run and the oscillation's period and amplitude visibly shift.
Frequently asked questions
Why do the fox and rabbit populations never settle at a fixed number?
In the classic Lotka-Volterra equations, growth and predation terms are perfectly balanced around a centre point, which produces a closed, repeating cycle rather than a stable equilibrium. Real ecosystems add extra effects like limited food and random events, which usually damp the oscillation toward a steadier balance.
Does this pattern actually happen in nature?
Yes — the best-known evidence is nearly a century of Hudson's Bay Company fur-trading records for Canadian lynx and snowshoe hares, which show the same out-of-phase boom-and-bust cycle the equations predict, with predator numbers consistently lagging behind prey numbers.
What happens if you remove all the foxes in the simulation?
With no predation term left, the rabbit population grows exponentially without limit in the idealised model, which is exactly what the α·R term describes — a reminder that predators are what keeps the ideal-model prey population from running away.
Try it live
Everything above runs in your browser — open Fox & Rabbits and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Fox & Rabbits simulation