Skip to content
Omnikalc

Marginal value theorem calculator

Enter the maximum gain from a patch, the time to gain half of it, the travel time between patches and a chosen residence time to get the optimal time to leave, the best gain rate and the loss from leaving earlier or later.

Updated on
Your inputs
kJ

Value out of range

min

Value out of range

min

Value out of range

min

Value out of range

Results

Optimal residence time

7.071 min

Best long-term gain rate

3.4315 kJ/min

Chosen rate as a share of the best rate

87.4 %

Gain per patch at the optimum
58.579 kJ
Instantaneous rate at leaving (equal to the best rate)
3.4315 kJ/min
Gain rate with the chosen residence time
3.0000 kJ/min
Share of time spent in patches at the optimum
41.4 %
Share of the patch gain taken at the optimum
58.6 %

The marginal value theorem calculator gives the optimal time to stay in a patch, the best long-term gain rate and the cost of staying too long or leaving too early for a forager that moves between patches, from the maximum gain, the time to gain half of it and the travel time.

How the calculation works

  • Enter the maximum gain G and the time to gain half h.
  • Enter the travel time between patches and a residence time to compare.
  • Read the optimal time, the best rate and the loss.

Example

With a patch gain of 100 kJ, a half-gain time of 5 min and a travel time of 10 min, the forager should leave after 7.071 min, taking 58.6 % of the patch gain, 58.579 kJ. The best rate is 3.4315 kJ/min, equal to the instantaneous rate at leaving, 3.4315 kJ/min. Staying 15 min gives 3.0000 kJ/min, which is 87.4 % of the best rate.

Why it matters

The calculator helps behavioral ecology students and researchers, birdwatchers, naturalists and also anyone who studies optimal stopping in search tasks such as picking berries, fishing spots or browsing, and wants to check how long to stay at a source before moving on.

Good to know

The formula uses a gain curve of the form G·t / (t + h), where gain rises quickly and then slows. Other curves give other optimal times, so choose the model according to the patch. Times are in minutes and gains in kilojoules, but any units work if they are used consistently. The theorem assumes identical patches, no risk and a forager with perfect knowledge. Real animals use noisy cues and often stay a little longer than predicted.

The Holling functional response calculator models consumption by density, the Michaelis-Menten calculator has the same saturating shape, the logistic growth calculator models a population and the Lotka-Volterra calculator models predators and prey.

Frequently asked questions

What is the marginal value theorem?

Proposed by Eric Charnov in 1976, the marginal value theorem says that a forager exploiting patches of food should leave a patch when the instantaneous rate of gain in it falls to the average rate of gain of the whole habitat, including travel time. Patches deplete, so the rate falls as time passes, and leaving too soon or too late lowers the long-term average.

How is the optimal time computed?

With the diminishing gain function g(t) = G × t / (t + h), the optimal residence time is t* = sqrt(h × τ), where h is the time to gain half the maximum and τ the travel time. With h = 5 minutes and τ = 10 minutes, it is about 7.07 minutes, with a gain of about 58.6 per patch and a long-term rate of 3.43 per minute.

How does travel time change the answer?

Longer travel between patches raises the optimal residence time, since it is worth extracting more from each patch when moving is costly. If τ doubles from 10 to 20 minutes, t* rises from 7.07 to 10 minutes. In rich habitats with short travel, foragers should leave patches early, taking only the easy part.

What does staying too long cost?

The rate is flat near the optimum, so small errors cost little, but large ones cost more. With a residence of 15 minutes instead of 7.07, the rate falls from 3.43 to 3.0, a loss of about 13 %. Leaving much too early also reduces the rate. The theorem predicts the average behavior, not each forager.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.