Home / Science / Ecology and organisms / Ecology / Lotka-Volterra simulatorTool #304

Lotka-Volterra simulator: predator-prey and competition models with phase plane and equilibria

Simulate the Lotka-Volterra predator-prey model (with an optional prey carrying capacity) or two-species competition. See both populations over time, the phase plane with nullclines, every equilibrium with its eigenvalues and stability, and the predicted outcome.

Keep it one tap away for everyday use.

Bookmark Lotka-Volterra simulator?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Rates
  2. Simulate
  3. Phase plane
  4. Equilibria
Nothing is uploadedWorks offline once open

Model

dx/dt = αx(1 − x/K) − βxy, dy/dt = δxy − γy, with x the prey and y the predators.

α: prey birth rate with no predators. β: how fast each predator kills prey. δ: predators gained per prey eaten per predator. γ: predator death rate with no prey. K adds a carrying capacity for the prey; leave it blank for the classic model with endless cycles.

Solved with the fourth-order Runge-Kutta method; a smaller time step is more accurate but slower (up to 200,000 steps). The parameter values are a made-up example.

Result

Over time

Phase plane

Equilibria

Stability from the eigenvalues of the Jacobian at each point: negative real parts pull the populations in, positive ones push them away; a saddle attracts from one direction only; a centre circles forever.

Download

What it does

The Lotka-Volterra equations are the starting point for how two interacting species change in number. This simulator solves them step by step and shows what happens:

  • Predator-prey: prey x grow at rate α and are eaten at rate βxy; predators y gain δxy from eating and die at rate γ. Without a prey limit the populations cycle for ever. Add a carrying capacity K for the prey and the cycles shrink towards a steady state.
  • Competition: two species each grow logistically towards their own carrying capacity, and each counts against the other’s capacity through the competition coefficients α₁₂ and α₂₁. Depending on these, one species wins, they coexist, or the winner depends on who starts ahead.

For each model you get the populations over time, the phase plane (one population against the other) with the nullclines where each stops changing, and every equilibrium with the eigenvalues of the Jacobian that say whether it attracts or repels.

How to use it

  1. Pick Predator-prey or Competition.
  2. Enter the rates and the starting numbers. Every option has a one-line explanation on the page.
  3. Set how long to run and the time step. The default of 0.01 is accurate for rates around 1; use a smaller step if rates are large. Up to 200,000 steps are allowed.
  4. Download the simulated numbers as CSV (up to about 2,000 rows), or the report as an image, PDF or Word file.

Worked example

The predator-prey example is made up: α = 1, β = 0.1, δ = 0.075, γ = 1.5, starting with 10 prey and 5 predators, run for 50 time units. The page shows At t = 50: prey 15.02, predators 3.359. The coexistence point is (20, 10), where γ/δ = 20 prey just feed the predators and α/β = 10 predators just hold the prey in check. It is a centre with eigenvalues 0 ± 1.225i, so the populations circle it for ever. Small cycles would last 2π/√(αγ) = 5.130 time units; this run’s large cycle takes 5.480, with 9 prey peaks. Set K to 200 and the coexistence point moves to (20, 9) and becomes a stable spiral, eigenvalues −0.05 ± 1.161i.

The competition example (also made up) uses r₁ = 0.8, r₂ = 0.6, K₁ = 500, K₂ = 400, α₁₂ = 0.6, α₂₁ = 0.7, starting from 20 of each. Because α₁₂K₂ = 240 is below K₁ and α₂₁K₁ = 350 is below K₂, each species limits itself more than the other: they coexist at (448.3, 86.21), a stable node. The page shows At t = 50: species 1 447, species 2 88.14, still closing in on the coexistence point.

Tips

  • In the classic model, the size of the cycle is set by where you start, not by the parameters. Starting exactly at the coexistence point gives no cycle at all.
  • If the path spirals outwards or the numbers blow up, the time step is too large for the rates.
  • The model has no randomness, so populations never quite reach zero; in real life a deep trough can mean extinction.

Frequently asked questions

Why is the predator peak after the prey peak? Predators need prey to breed, so their numbers rise while prey are plentiful and keep rising for a while after the prey start to fall.

Can I fit these models to my field data? Not here; this is a simulator for exploring how the parameters shape the dynamics.

Is anything sent anywhere? No. Everything is worked out in your browser, and the page works offline once loaded.

Where the numbers come from

  • Models: A. J. Lotka (1925) and V. Volterra (1926); G. F. Gause (1934) for competition; the logistic prey term as in standard ecology texts (e.g. N. J. Gotelli, A Primer of Ecology, 4th ed. 2008). Numerical method: classic fourth-order Runge-Kutta. Formulas only; no tables are copied.
  • Checked in the tests against SciPy 1.x solve_ivp (RK45 with tolerances of 1e-12), numpy.linalg.eigvals for the equilibria and scipy.signal.find_peaks for the cycle period, plus the conserved quantity of the classic model.
  • The parameter values are made up.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Radioactive decay and specific activity calculator #99 Activity of F-18, Tc-99m, I-131, C-14, P-32 and 28 more nuclides (or any half-life) at any date and time, a printable decay table, when it falls to a given activity, carrier-free specific and molar activity, and the labelled fraction of your sample. Bq, MBq, GBq, µCi, mCi and Ci. Reaction kinetics fitter #81 Paste concentration against time to find the reaction order, the rate constant with its uncertainty and the half-life; paste k at several temperatures for the activation energy, A, ΔH‡ and ΔS‡. Biodiversity indices #39 Paste species counts for one or more sites and get Shannon, Simpson, evenness, Chao1 richness, rarefaction curves and Bray-Curtis similarity in one table. Runs in your browser. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser. Mark-recapture estimator #301 Estimate the size of an animal population from capture-mark-recapture counts. Two samples give the Lincoln-Petersen and Chapman estimates with Seber's variance and a log-normal, normal or Poisson interval; several samples give the Schnabel estimate with a closed-population check. Quadrat and transect analyser #302 Paste quadrat counts and cover, or line-intercept transect measurements, and get density, frequency, cover, relative values and the importance value for every species, with a chart and downloads. Runs in your browser.