Skip to content
Omnikalc

Hamilton’s rule calculator

Choose the relatedness of the recipients, the benefit to each, the cost to the actor and the number of recipients to get the inclusive fitness gain, the net effect of rB − C, the benefit-to-cost ratio needed and the break-even number of relatives.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Results

Coefficient of relatedness r

0.50000

Net inclusive fitness effect k·r·B − C

0.5000

Benefit-to-cost ratio needed 1 / (k·r)

2.000

Indirect fitness gain k·r·B
1.5000
Benefit-to-cost ratio you entered
3.000
Altruism favored (1 yes, 0 no)
1
Maximum cost worth paying k·r·B
1.5000
Recipients needed to break even
0.667
Recipients needed to repay one life (B = 1)
2.00

The Hamilton’s rule calculator gives the net inclusive fitness effect r·B − C, the indirect fitness gain, the benefit-to-cost ratio needed and the break-even number of relatives for an altruistic act, from the relatedness of the recipients, the benefit to each, the cost to the actor and the number of recipients.

How the calculation works

  • Choose the relatedness of the recipients.
  • Enter the benefit to each recipient and the cost to the actor.
  • Enter the number of recipients and read the net effect and the threshold.

Example

With a relatedness of 0.50000, a benefit of 3 to each of 1 recipient(s) and a cost of 1, the indirect fitness gain is 1.5000 and the net effect is 0.5000. The benefit-to-cost ratio needed is 2.000 and the one entered is 3.000, so the code for altruism favored is 1. Break-even needs 0.667 recipients, and repaying one life needs 2.00.

Why it matters

The calculator helps students of evolution, behavioral ecology and genetics, teachers and curious readers who want to test Hamilton’s rule on examples such as helping at the nest, alarm calls or sharing food, and see how relatedness changes the balance between benefit and cost.

Good to know

Benefit and cost are measured in the same unit of reproductive success, such as the number of offspring gained or lost. The rule in this simple form assumes that effects add up and that the recipients are equally related to the actor. Relatedness values are averages and differ for inbred or haplodiploid species. A result favoring altruism describes selection on the gene and not a conscious choice by the animal.

The inbreeding coefficient calculator gives relatedness through pedigrees, the heritability calculator treats the response to selection, the selection coefficient calculator measures fitness differences and the genetic drift calculator covers chance changes in gene frequency.

Frequently asked questions

What is Hamilton’s rule?

Hamilton’s rule, formulated by W. D. Hamilton in 1964, says that a gene for altruistic behavior can spread if r × B > C. Here r is the genetic relatedness between actor and recipient, B the reproductive benefit to the recipient and C the reproductive cost to the actor. It explains how helping relatives can evolve through inclusive fitness, even when it lowers the actor’s own offspring.

What are the usual values of relatedness?

Relatedness is the probability that two individuals share a given gene by recent common descent. It is 1 for identical twins, 0.5 for parents, children and full siblings, 0.25 for half-siblings, grandparents, aunts, uncles, nieces and nephews, 0.125 for first cousins and 0.03125 for second cousins. In haplodiploid insects such as bees, full sisters share 0.75.

What does the benefit-to-cost ratio mean?

Altruism is favored when B / C exceeds 1 / r. For full siblings (r = 0.5) the benefit must be more than twice the cost. For first cousins (r = 0.125) it must exceed eight times the cost. In the default example, the benefit of 3 against a cost of 1 passes the threshold of 2, and the net effect is +0.5.

What is Haldane’s joke?

J. B. S. Haldane is said to have joked that he would lay down his life for two brothers or eight cousins. With r = 0.5, two brothers carry the equivalent of one of his own genomes, and with r = 0.125 eight cousins do. The calculator gives this as the number of recipients needed to repay one life when each recipient gains one unit.

Was this calculator helpful?

Thanks for your feedback!

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