Energy & Environment

Lotka-Volterra Predator-Prey Model Calculator

Model predator and prey populations over time by solving the Lotka-Volterra equations with 4th-order Runge-Kutta. Enter the starting counts and the four rate parameters to read the coexistence equilibrium and the cycle.

Reviewed and updated

How to use
  1. Enter the starting prey and predator counts.
  2. Set the four rate parameters alpha, beta, gamma, and delta.
  3. Run the numerical solver.
Estimates based on typical values; your real usage and rates will vary.
Was this helpful?

Two equations that push each other in circles

The model tracks prey (x) and predators (y) as each one's growth depends on the other. Prey grow on their own but are eaten; predators starve on their own but grow by eating.

dx/dt = α x β x y
dy/dt = γ y + δ x y

The xy term is the contact between the two: it drains prey and feeds predators. Because that term couples the equations, neither population can be worked out on its own.

The cycle, in four stages

  • Prey rise. With few predators around, prey multiply.
  • Predators rise. Plenty of food, so predators breed — but with a lag.
  • Prey fall. Now heavily hunted, prey numbers drop.
  • Predators fall. Food runs short, predators decline, and the prey are free to climb again.

Equilibrium and period

The populations balance at one non-zero point. Nudge them off it and they orbit around it rather than returning to it — it is neutrally stable, not attracting.

equilibrium = ( γ/δ , α/β ),   period 2π / √(αγ)

The period near equilibrium depends only on the prey birth rate and the predator death rate, not on how fierce the hunting is. The far edges of a large orbit run slower than that estimate.

Common questions

Why do the two populations never settle down?

The classic Lotka-Volterra model has a conserved quantity, like energy in a frictionless pendulum, so it never loses the swing. Instead of reaching a steady state it cycles forever around the coexistence point, along whatever closed orbit the starting numbers set.

Why does the predator peak come after the prey peak?

Predators only grow once there is prey to eat, and that reproduction takes time. By the time predators are numerous, they have already eaten the prey down, so the predator curve lags the prey curve by about a quarter of a cycle.

What do the four parameters mean?

Alpha is how fast prey breed on their own. Beta is how effectively predators catch prey. Gamma is how fast predators die without food. Delta is how well eaten prey turns into new predators. The balance of the four sets the equilibrium and the period.

From the blog

Guides & how-tos

All articles →