keepcalculator

07 Lab Science

Species Evenness Calculator (Shannon and Pielou)

Card No. 07·0032 · Updated · Standard formula, shown below

Shannon index H 1.2799
Pielou evenness J
0.9232
Result
Simpson diversity 1 − D
0.7000
Result
Total individuals
100
Result
You enter
Species 1 count, Species 2 count, Species 3 count, Species 4 count
You get
Shannon index H, Pielou evenness J, Simpson diversity 1 − D, Total individuals
Rounding
4 dp · 0 dp

This calculator measures how evenly individuals are spread across four species. Enter the count of each species; you get the Shannon diversity index H, Pielou’s evenness J (0 to 1) and the Simpson diversity 1 − D.

Formula

With pᵢ = countᵢ ÷ total: Shannon H = −Σ pᵢ ln pᵢ. Evenness J = H ÷ ln S, where S is the number of species (4 here), so J = 1 means all species are equally common. Simpson diversity = 1 − Σ pᵢ².

  • a, b, c, d: individuals counted of each species
  • ln: natural logarithm

Worked Example

Counts 40, 30, 20, 10 (total 100).

  1. p = 0.4, 0.3, 0.2, 0.1
  2. p ln p = −0.3665, −0.3612, −0.3219, −0.2303; H = 1.2799
  3. ln 4 = 1.3863; J = 1.2799 ÷ 1.3863 = 0.9232
  4. Σp² = 0.16 + 0.09 + 0.04 + 0.01 = 0.30; 1 − D = 0.7000

Limits and common mistakes

  • Every count must be at least 1: a species with 0 individuals is not present, so count fewer species (ln 0 cannot be computed).
  • H depends on the log base; this page uses the natural log (some texts use log₂, giving bits).
  • Evenness from small samples is noisy; count enough individuals.
Formula used
in a | Species 1 count | - | 40 | 1
in b | Species 2 count | - | 30 | 1
in c | Species 3 count | - | 20 | 1
in d | Species 4 count | - | 10 | 1
out h | Shannon index H | - | -((a/(a+b+c+d))*ln(a/(a+b+c+d)) + (b/(a+b+c+d))*ln(b/(a+b+c+d)) + (c/(a+b+c+d))*ln(c/(a+b+c+d)) + (d/(a+b+c+d))*ln(d/(a+b+c+d))) | 4
out j | Pielou evenness J | - | h / ln(4) | 4
out si | Simpson diversity 1 − D | - | 1 - ((a/(a+b+c+d))^2 + (b/(a+b+c+d))^2 + (c/(a+b+c+d))^2 + (d/(a+b+c+d))^2) | 4
out nt | Total individuals | - | a + b + c + d | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Photo collage: a meadow with mixed wildflowers and a close-up of several different beetles on leaves.
Save this card: a 1000 × 1500 image of Species Evenness Calculator (Shannon and Pielou).

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Lab Science drawer →