Advertisement
Advertisement
ECOLOGY

Lotka-Volterra Calculator — predator-prey cycles from four coefficients

Integrate the classic predator-prey equations, find the equilibrium point and see the cycle the model produces — and why real populations do not obey it.

α is the prey's per-capita birth rate with no predators present. β scales how often an encounter removes a prey individual.
δ converts consumed prey into new predators. γ is the per-capita predator death rate when no prey are available.
Integration is fourth-order Runge-Kutta at a fixed step. The run is capped at 400,000 steps; ask for more and the tool says so rather than freezing your browser.
Linearised cycle period
 
 
0
Equilibrium prey γ/δ
0
Equilibrium predators α/β
0
Prey at end of run
0
Predators at end of run
Peak prey
0
Trough prey
0
Peak predators
0
Trough predators
0
Tip: the model has a conserved quantity, so an exact solution retraces the same closed loop forever. Watching how far that quantity drifts across a run is the cleanest test of whether your step size is small enough.
Advertisement

The Lotka-Volterra calculator above integrates the classic predator-prey equations forward in time from four coefficients and two starting populations. It reports the equilibrium point, the period the linearised system predicts, the peaks and troughs the simulation actually reached, and how far the model's conserved quantity drifted during the run. That last number is a diagnostic rather than biology, and it is included because a predator-prey plot that looks plausible can still be an artefact of a bad step size.

This is a teaching model and Arb Digital presents it as one. The equations are the standard textbook introduction to coupled non-linear dynamics, and they are genuinely illuminating about the mechanism of delayed feedback between two populations. They are also a poor description of any real ecosystem, for reasons set out in full below. Use the page to understand the mathematics, not to predict a population.

The Equations and What Each Term Means

Two coupled ordinary differential equations describe the system. For prey, dx/dt = αx − βxy: prey reproduce in proportion to their own number and are removed in proportion to the number of prey-predator encounters. For predators, dy/dt = δxy − γy: predators are added in proportion to those same encounters and die at a constant per-capita rate.

The xy product is the heart of the model. It assumes encounters occur at a rate proportional to the product of the two densities, exactly as in the law of mass action for chemical reactions — which is where the formulation came from, since Alfred Lotka arrived at it through autocatalytic chemistry and Vito Volterra through fish catch records in the Adriatic. Everything interesting and everything wrong about the model traces back to that single assumption.

Two coefficients are per-capita rates with units of one over time: α, the prey growth rate, and γ, the predator death rate. The other two, β and δ, are interaction coefficients whose units depend on how populations are counted, which is why the numbers here are dimensionless by convention. Doubling the units in which you count prey changes β and δ without changing the dynamics.

How to Use It

  1. Set the four coefficients. Larger α makes prey rebound faster; larger γ makes predators starve faster. β and δ together control how tightly the two populations are coupled.
  2. Set the starting populations. Any starting point that is not the equilibrium produces a closed orbit, and the further from equilibrium you start the larger the swings.
  3. Choose a time span. Compare it to the linearised period in the hero. Ten periods is usually enough to see the pattern and to reveal integration drift.
  4. Reduce the step size until the answer stops changing. If halving h changes the peaks noticeably, the previous run was not converged.
  5. Try the equilibrium preset. Starting exactly at γ/δ and α/β should leave both populations perfectly constant, which is a useful check on the integrator.

Equilibria, the Period and the Conserved Quantity

Setting both derivatives to zero gives two fixed points. The trivial one is extinction of both species at the origin, which is a saddle: it is unstable, and almost every trajectory moves away from it. The interesting one is the coexistence equilibrium at x* = γ/δ and y* = α/β. With the default coefficients that is 4 prey and 2.75 predators.

Note what that equilibrium implies, because it is counter-intuitive and it is the model's most famous result. The equilibrium prey population depends only on the predator's parameters, and the equilibrium predator population depends only on the prey's. Improving the prey's birth rate does not raise the average prey population at all — it raises the number of predators. That is the mathematical core of the paradox of enrichment, and it is a genuine, checkable property of these equations rather than a modelling artefact.

Linearising about the coexistence point gives purely imaginary eigenvalues, so small oscillations have angular frequency √(αγ) and period 2π/√(αγ). With α = 1.1 and γ = 0.4 that is 2π/√0.44, about 9.47 time units. Larger orbits run slower than this, so treat the hero figure as the small-amplitude limit rather than the period of your particular loop. The system also conserves V = δx − γ ln x + βy − α ln y, which is why orbits are closed curves rather than spirals.

Advertisement

Integration Method and Why the Step Size Matters

This page uses the classical fourth-order Runge-Kutta method with a fixed step h, evaluating the derivatives four times per step and combining them with the standard weights. The number of steps is the time span divided by h, and it is capped at 400,000. Beyond that the tool stops and says so in writing rather than locking the browser tab.

Fixed-step Runge-Kutta is not symplectic, so it does not conserve V exactly. Over a long run the numerical orbit slowly drifts off the true closed curve — with this method the drift is small, but it is not zero, and a first-order method such as forward Euler would drift outward fast enough to look like a genuine ecological instability. That is a trap worth knowing about: many published-looking predator-prey spirals are numerical artefacts rather than results.

The conserved-quantity drift reported under the results is the honest way to check. Halve h and the drift should fall by roughly a factor of sixteen for a fourth-order method. If it does not, the step size is too large for the stiffness of your coefficients, and the peaks and troughs on this page should not be trusted. The exponential growth calculator shows the uncoupled case, where prey grow without limit if β is zero.

Why Real Populations Do Not Behave Like This

The model assumes prey grow exponentially without any resource limit. There is no carrying capacity, so removing the predator sends prey to infinity rather than to a plateau. Adding a logistic term is the standard first repair, and it changes the qualitative behaviour completely: the neutral cycles become a stable spiral into a fixed point. The carrying capacity calculator covers that logistic side of the same subject.

It assumes every individual is identical. Real populations have age structure, and juveniles are usually far more vulnerable than adults, which introduces delays that the instantaneous xy term cannot represent. It assumes predators never satiate, so a predator's consumption rises linearly with prey density forever; real functional responses saturate, and the saturating forms produce different dynamics including genuine limit cycles.

It assumes a closed, homogeneous, constant environment with one predator and one prey. There is no weather, no migration, no refuge where prey can hide, no alternative food source, no disease and no other species. Any one of those additions changes the outcome. OpenStax Biology 2e, section 45.3 on environmental limits to population growth, sets out the density-dependent and density-independent factors that the bare Lotka-Volterra system omits entirely.

Most importantly, the neutral cycles are themselves an artefact. Because the system is conservative, the amplitude of the oscillation is set entirely by the initial conditions and is never corrected. A single disturbance permanently changes the orbit. Real ecological cycles that persist do so because something restores them, and that restoring mechanism is exactly what this model lacks. Wolfram MathWorld's entry on the Lotka-Volterra equations gives the formal statement of the system and its fixed points.

The Famous Hare and Lynx Data, Read Carefully

Nearly every textbook pairs these equations with the Hudson's Bay Company records of snowshoe hare and Canada lynx pelts, which oscillate with a roughly ten-year period. The visual match is striking and the inference is weaker than it looks. The series records pelts traded, not animals alive, so it mixes population with trapping effort and market prices.

Subsequent ecological work has attributed the hare cycle to a combination of predation and food supply, with vegetation quality and predator-induced stress both implicated, and in some analyses the phase relationship runs the opposite way to the simple two-species story. The lesson is not that the model is useless; it is that agreement between a two-parameter curve and a noisy time series is very weak evidence for a mechanism.

Need a website that loads fast and actually works?

Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.

Browse All Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Fitting the four coefficients to real data and calling it a prediction — the model has no carrying capacity and no environmental variation, so a fit does not confer forecasting ability.
  • Reading a slow numerical spiral as an ecological trend — the true orbits are closed, so any inward or outward drift is integration error.
  • Using the linearised period for a large orbit — 2π/√(αγ) is the small-amplitude limit, and big loops take measurably longer.
  • Expecting more prey when the prey breed faster — raising α raises the equilibrium predator count, not the equilibrium prey count.
  • Comparing coefficients between studies — β and δ depend on the units in which populations are counted, so they are not portable numbers.

Related Free Tools From Arb Digital

For the density-limited version of population growth, use the carrying capacity calculator, and for the unlimited case the exponential growth calculator. The percentage change calculator helps when comparing peaks between runs, and the matrix calculator is useful for working through the Jacobian and its eigenvalues by hand. For applied ecology, see the water demand calculator and the Kaya identity calculator. The full free online tools hub lists everything.

Frequently Asked Questions

What are the Lotka-Volterra equations?

Two coupled differential equations describing a predator and a prey population. Prey grow exponentially and are eaten at a rate proportional to the product of the two populations; predators gain from that same product and die at a constant per-capita rate. They were derived independently by Alfred Lotka and Vito Volterra in the 1920s.

Where is the equilibrium point?

At prey equal to gamma divided by delta and predators equal to alpha divided by beta, plus the trivial extinction point at the origin. Notice that the equilibrium prey level depends only on the predator's parameters and the equilibrium predator level only on the prey's.

What integration method does this tool use?

Classical fourth-order Runge-Kutta at the fixed step size you enter, with the total number of steps capped at 400,000. If your time span divided by the step exceeds that cap the tool reports it in writing instead of attempting the run.

Why does the orbit drift slowly outwards or inwards?

That is numerical error, not ecology. The exact system conserves a quantity that keeps every orbit closed, but fixed-step Runge-Kutta is not symplectic and accumulates a small drift. Reducing the step size should cut the drift by roughly a factor of sixteen each time you halve it.

Why is the cycle period longer than the tool says?

Because the hero figure is the linearised period, 2 pi over the square root of alpha times gamma, which applies only to small oscillations near the equilibrium. Large-amplitude orbits spend a long time at low densities and take measurably longer to complete.

Can I use this to predict a real population?

No. The model assumes no carrying capacity, no age structure, no environmental variation, no predator satiation, no migration and no other species. Real populations violate every one of those assumptions, and the persistent neutral cycles the model produces are a consequence of them rather than a finding about nature.

What about the hare and lynx data?

The Hudson's Bay Company pelt records oscillate with roughly a ten-year period and are the traditional illustration, but they count pelts traded rather than animals alive. Later ecological work implicates food supply and predator-induced stress alongside predation, so the visual match is weak evidence for the two-species mechanism.

This tool is provided for education. It integrates a simplified teaching model whose assumptions no real ecosystem satisfies, and its output should not be used for population management, conservation planning or any decision about a real species.

Advertisement
Advertisement

Take it further