Understanding science, for all. Home About
Novadette› 🧬 Biology› Ecology› Biodiversity Indices
🧬 Ecology

Biodiversity Indices

How diverse is a habitat? Enter how many individuals of each species you counted and get the two standard indices side by side: the Shannon index H′ with its evenness and effective number of species, and the Simpson index D, the chance that two individuals picked at random are the same species. Compare a meadow with a lawn, or a site before and after a change.

EcologyBiodiversityField work
Inputs
Input examples
Write each species with its count, separated by commas or on separate lines: Blackbird 12, Robin 9, Wren 4. Names are optional: 12, 9, 4 works too. Decimals use a dot. Species with a count of 0 are left out. The log base only changes the unit of H′ (natural log is the usual choice in ecology). For Simpson, choose Sample for counts from a sample (picking without putting back, the usual choice in field work) or Whole community to use the shares p² directly.
Shannon: log base
Simpson: formula

How is Diversity Measured?

Biodiversity has two sides: how many species there are (richness) and how evenly the individuals are spread over them (evenness). A wood with ten species where one makes up 90% of the trees feels less diverse than one where all ten are equally common.

The Shannon index H′ measures how uncertain you are about the species of the next individual you find: the more species and the more even they are, the harder it is to guess. Dividing by its maximum, ln S, gives the evenness J′; eH′ is the number of equally common species with the same H′.

The Simpson index D is the chance that two individuals taken at random are the same species, so a high D means low diversity; ecologists usually report 1 − D or 1/D. Because the shares are squared, Simpson is driven by the common species and hardly notices rare ones, while Shannon weighs rare species more. Reporting both shows which kind of change you are looking at.

all equalH′ = ln S, 1/D ≈ S
D near 1one species dominates
typical field dataH′ ≈ 1.5 – 3.5
rare speciescount in Shannon, barely in Simpson

Share of Each Species

H′
share of all individuals, most common first
share if all species were equally common
Result
Enter the species counts above

Species by Species

SpeciesCount nShare p−p log pp²n(n−1) / N(N−1)

Worked Techniques

Shares First

Divide the count of each species by the total number of individuals. The shares add up to 1.

Example: 12 blackbirds out of 40 birds: p = 0.30.
Shannon: Add Up −p ln p

Each species adds −p ln p; species with a share around 37% (1/e) add the most. J′ compares H′ with its maximum; eH′ turns it back into a number of species.

Example: the six woodland birds: H′ = 1.666, J′ = 0.93, 5.29 effective species.
Simpson: Two Picks

The chance that both picks are blackbirds: 12 of 40 the first time, then 11 of the remaining 39. Do this for every species and add up to get D.

Example: the woodland birds: D = 0.186, 1 − D = 0.814, 1/D = 5.38.

Sources & Verification

References
  1. A. E. Magurran, Measuring Biological Diversity, Blackwell, 2004 — Ch. 4 (Diversity statistics: the Shannon index, evenness, Simpson’s index, its reciprocal and the Berger–Parker index).
  2. C. J. Krebs, Ecological Methodology, 2nd ed., Benjamin Cummings, 1999 — Ch. 13 (Species diversity measures).
  3. E. H. Simpson, “Measurement of diversity”, Nature 163 (1949) 688 — the original index, with the n(n−1) form for samples.
  4. M. O. Hill, “Diversity and evenness: a unifying notation and its consequences”, Ecology 54 (1973) 427–432 — the effective number of species.