LotkaVolterra Calculator
 What are the LotkaVolterra equations? Population dynamics
 How do I calculate the LotkaVolterra model for a predatorprey population?
 Fixed points in the LotkaVolterra equations
 The attofox problem
 How to represent the LotkaVolterra equations?
 How to use our calculator for the LotkaVolterra equations
 FAQ
The LotkaVolterra calculator enables you to understand and simulate the dynamics of populations in a generic biologic system. But there's much more to it! Keep reading to learn:
 What the LotkaVolterra equations are and the predatorprey model;
 The differential equations defining the dynamics of a predator and prey population;
 Reallife examples of the LotkaVolterra predatorprey model;
 How to use our LotkaVolterra model calculator;
 And much more!
What are the LotkaVolterra equations? Population dynamics
The LotkaVolterra equations in the competitive case are a system of two differential equations that describe the dynamics of a biological system where a predator species coexist with a prey population. The system models the oscillation of the populations in time.
🙋 The LotkaVolterra equations take the name of the two scientists, Alfred Lotka and Vito Volterra, who independently developed the equations to describe phenomena of their interest between 1925 and 1926.
Observations of reallife systems confirmed the existence of a correlation between the sizes of populations of predators and prey. They are highly dependent on each other, making this model one of the first development of mathematical biology. We find evidence of the correctness of the LotkaVolterra model everywhere: from rabbit populations to the constant fight of bacteria and the viruses bacteriophages (you can discover how quickly bacteria multiply by visiting the generation time calculator), but also in economy, and other sciences.
To introduce the model, we need to explain the assumptions used in its definition:
 The prey population has access to unlimited food supplies;
 The food supply of the predator population consists only of the prey population;
 Bigger populations grow faster than small populations (the rate of change of a population depends on its size);
 Environmental and genetic effects are excluded or assumed to be negligible; and
 Predators won't stop feeding on the prey population.
Once the assumptions are clear, we can introduce the elements of the model:
 The prey population, with a number of individuals $x$; and
 The predator population, with a number of individuals $y$.
Here are the equations of the LotkaVolterra model for a predatorprey competition:
Let's take a deeper look at these equations. The first thing we notice is that on the lefthand side, the populations appear differentiated in time. As these equations are differential equations, we are studying the evolution of the population in time. While technically, we can find the instantaneous value of these quantities (it would correspond to the variation of a given population for a set of parameters), we are more interested in calculating the LotkaVolterra model as it evolves with time.
On the righthand side, we see the populations in their familiar form: instantaneous number of individuals; here we can also identify four characteristic quantities of the LotkaVolterra model) and their interactions with the populations:

$\alpha x$ — This term represents the exponential growth of a population under an unlimited supply of resources. We discussed a similar quantity in our exponential growth calculator.

$\beta x y$ — This factor models the rate of predation. Its magnitude depends on the size of both the prey and the predator population. Notice how we add a negative sign.

$\delta x y$ — In the case of the variation of the predator population, we model a growth that depends on the size of both the prey and the predator population. As the food supply is limited, we must consider this (when the prey population dwindles, the predator one also follows suit).

$\gamma y$ — The reduction of the size of the predator population depends on this term. Here we assume that the predator population is subject to a decrease due to natural death or other causes. Notice how this factor properly models the natural behavior of predators' populations, and it doesn't apply to the prey one.
We can assign names to the parameters of the equations:

$\alpha$ — The natural reproduction rate of the prey in absence of predation. If you want to know something about a realistic model for this parameter, visit our carrying capacity calculator.

$\beta$ — The death rate per encounter between predator and prey (how many hunts are successful).

$\gamma$ — The natural death rate of the predator population in absence of resources.

$\delta$ — The resource conversion rate in new individuals (how many new predators can find sustainment at each encounter).
🙋 Do you know you can simulate more than predators and prey with the LotkaVolterra model? We did it with our humans vs. vampires calculator.
How do I calculate the LotkaVolterra model for a predatorprey population?
When we "calculate the LotkaVolterra model," we are computing its behavior over time. To do so, we need to solve simultaneously the two equations (as they interact with each other). There are techniques that allow you to do so precisely, but they are limited to specific points of the dynamics: the LotkaVolterra model is usually solved by numerical means. In this case, we need to follow some simple steps:

Define the initial conditions of the problem. In our case, defining the initial populations of prey and predator will suffice.

Apply any implicit or explicit iterator that takes the values of the population at each moment in time and calculates the next step. Commonly used iterative methods are the RungeKutta methods.

Proceed until you reach the desired number of iterations or until the populations collapse to a stable state (e.g., both species go extinct).
What is an iterative method?
An iterative method is a numerical technique used to solve differential equations or systems of differential equations. Iterative methods, both explicitly and implicitly, approximate the solution to the desired equation(s) starting from its value at a given initial point (the initial conditions). Though they differ in execution, the purpose is to find the value of $f(x+\mathrm{d}t)$, $f$ being the function of interest, starting from $f(x)$. The value of $\mathrm{d}t$ is the step size and corresponds to the "resolution" of the final result.
Iterative methods vary in complexity, from simple ones such as the Euler method to the powerful yet computationally expensive 6^{th} RungeKutta method implemented with an adaptive step size. The choice of which one to use is up to you!
Our calculator does exactly this, iterating the equations with the conditions and parameters you passed to the tool. Is there something you can calculate by hand in the LotkaVolterra model?
Fixed points in the LotkaVolterra equations
There are two possible fixed points in any system described by LotkaVolterra's equations. A fixed point is a state where the system's dynamics stop, and, in the case of populations, the number of individuals doesn't change. You can find two types of fixed points:

Stable fixed points where the stability resists small perturbations (think of a static pendulum).

Unstable fixed points where the system is not resistant against perturbation: a small change and the system moves, usually toward a stable point (think of a broom balanced vertically).
In the case of the LotkaVolterra predatorprey model, we can find a trivial stable fixed point corresponding to the state:
Once both populations reach that point, the dynamics stop. The other point is more intriguing, as it represents a situation where the populations can reach stable numbers, from where, neglecting oscillations, the dynamics would stop.
To reach a stable point from an oscillatory model like the one we implemented in our tool, you would need to introduce a generic dissipationlike term in the equations that would contribute to the damping of the dynamics in the direction of stability.
The attofox problem
The description of populations using the LotkaVolterra equations suffers from an annoying problem that was rather funnily named the attofox problem. Atto is the metric prefix for $10^{18}$.
The populations described by the LotkaVolterra predatorprey model tend to recover even when their numbers dwindle to extreme lows (for example, the unrealistic $10^{18}$ fraction of a fox). In reallife, small populations with very few individuals (in particular prey ones) can quickly become extinct due to environmental factors, diseases, or even sheer bad luck. How do we deal with this problem? We consider a population with a single individual to be doomed: if the preys drop below $1$, the species go extinct. Notice how this would happen necessarily after reaching the first peak if the conditions are adequate.
How to represent the LotkaVolterra equations?
The LotkaVolterra equations depend on time: this makes their representation straightforward: place the time (or the number of iterations) on the horizontal axis, and plot the population drawing a dot for each data point. In this way, you can easily see the periodic behavior of the predatorprey model. If you choose the correct parameters, you may find situations where the model behaves astonishingly like a simple harmonic motion calculator. In fact, in these cases, the predator population is nothing but a rescaled copy of the prey population shifted by 90°.
However, we can find another representation of the evolution of the populations: the representation in the phase space. In the phase space, both the horizontal and vertical axis are associated with populations, and the relationship between the predator and the prey becomes easy to visualize.
In a phase diagram representation, we must assign a direction for the evolution of the dynamics, using arrows, for example. Otherwise, by following the curves in this wrong direction, we may get the impression that an increase in the number of predators may happen without justification, followed by a decline of the prey in the absence of predators.
How to use our calculator for the LotkaVolterra equations
Our LotkaVolterra calculator for the model of predatorprey populations is a simple tool. Input six fundamental values:

$\alpha$, $\beta$, $\gamma$, and $\delta$ — The four parameters of the simulation; and

The initial conditions, that is, the initial number of predators and prey.
At the bottom of the calculator, you can find additional parameters that can help you tune your simulation: the duration of the simulation, if you want to include extinction or not, and the time scale of your graph.
Play with our tool, and see what the results are! But be careful: you can easily stumble upon unsatisfactory conditions: as for many biological systems, the predatorprey dynamics is exceptionally sensitive to the setup of the problem!
🙋 We set up our calculator with initial conditions that produce a dynamics with a period of almost half a year and tuned the graph to frame its feature in the best possible way. Changing the initial conditions may cause the dynamics to change by a lot: tune the graphic visualization with the variable end of the simulation
. Changing the time scale will also return more manageable labels on the horizontal axis for a better understanding.
If you click on advanced mode
, you can also find the variable timestep. Choosing a value will force the simulation to run with the "resolution" you want. Don't increase it too much, or the details of the dynamics will go missing.
🙋 Under the plot of the dynamics, we added an additional representation of the LotkaVolterra predatorprey model: the phase space representation of the dynamics! Change the parameters, and observe the trajectories (or orbits) change. Do you see the orbits shrinking? Where are they going to shrink? You are correct if you are thinking "in the stable point"!
At the bottom of our tool, you can find a link to download a file containing the points of your simulation. Download it, and use it in your projects!
FAQ
What are the LotkaVolterra equations?
The LotkaVolterra equations are a couple of nonlinear differential equations that describe the dynamics of a population of prey hunted by a population of predators. The LotkaVolterra equations are:
dx/dt = αx  ßxy
dy/dt = δxy  γy
where:
α
,ß
,δ
, andγ
— Parameters related to growth and predation;x
andy
— The size of the pupulations; anddx/dt
anddy/dt
— The time derivatives of the populations' sizes.
How does a population of prey interact with a predator population?
A population of prey interacts with a population of predators in multiple ways.
 The population of prey tends to grow in an uncontrollable fashion (exponential growth).
 The predators keep the prey in check by hunting it. A given fraction of each encounter between the two species results in successful predation.
 Predators convert prey into new predators.
 Predators naturally die out in the absence of prey.
Putting together all these "rules", we can see how the populations peak and decrease in an almost alternating fashion.
How do I calculate the stable points of the LotkaVolterra model?
To calculate the stable points of the LotkaVolterra model, follow these easy steps:

Be sure to know the parameters of the LotkaVolterra equations. These are four numbers that multiply combinations of the populations' sizes:
α
,ß
,δ
, andγ
. 
To find the stable prey population, divide the coefficients of the predator dynamics:
stable prey population = α/ß

To find the predator population that doesn't oscillate with time, consider the coefficients of the prey's dynamics:
stable predator population = γ/δ
What are the assumptions of the LotkaVolterra model?
The LotkaVolterra model uses multiple assumptions to allow a satisfying simulation of predatorprey dynamics:
 Natural resources for the prey are unlimited.
 The predator population gets its only sustainment from the prey population.
 The rate of change of the populations' sizes depends on the size of the initial populations.
 External factors don't affect the dynamics.
 The predators keep predating the population at a constant rate.