Skip to content

Biodiversity Index Calculator

Calculate the Shannon diversity index, Pielou evenness and Simpson's diversity index from species counts, with effective number of species and dominance.

Calculator Details

Shannon diversity index H′:1.593See results ↓

One species per line with its count (e.g. “Red oak 18”), or just the counts separated by commas.

Your Results

Shannon diversity index H′: 1.593

Shannon diversity index H′

1.593

Evenness J′ 0.819 · 7 species, 70 individuals

Simpson's index of diversity (1 − D)

0.771

Chance two individuals are different species; D = 0.2294

Inverse Simpson (1/D)

4.36

Σp² form: 1/λ = 4.16

Effective number of species

4.92

exp(H′): as diverse as this many equally common species

Berger–Parker dominance

35.7%

Share of the most common: Sugar maple

Maximum H′ for this richness

1.946

ln S, if all species were equally common

7 species and 70 individuals: Shannon H′ = 1.593 (evenness 0.819), Simpson's index of diversity 1 − D = 0.771. That is as diverse as 4.9 equally common species.

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Relative abundance (rank order)

Relative abundance (rank order)

Detailed Breakdown

Each species’ contribution
SpeciesCount nᵢProportion pᵢ−pᵢ ln pᵢnᵢ(nᵢ−1)/N(N−1)
Sugar maple250.35710.36770.1242
Red oak180.25710.34920.0634
White birch120.17140.30230.0273
Eastern hemlock80.11430.24790.0116
White ash40.05710.16360.0025
Black cherry20.02860.10160.0004
Basswood10.01430.06070

Column sums: H′ = 1.593, D = 0.2294.

How This Calculator Works

How it's calculated

pᵢ = nᵢ ÷ N

H′ = −Σ pᵢ ln pᵢ, J′ = H′ ÷ ln S

D = Σ nᵢ(nᵢ − 1) ÷ (N(N − 1)), diversity = 1 − D

effective species = exp(H′ in nats)

Your numbers: N = 70 individuals in S = 7 species. Adding −pᵢ ln pᵢ for each species gives H′ = 1.593; the most it could be with 7 species is ln 7 = 1.9459, so J′ = 0.8186. Adding nᵢ(nᵢ − 1) and dividing by 70 × 69 gives D = 0.2294, so 1 − D = 0.7706 and 1/D = 4.359.

Frequently Asked Questions

What is the Shannon diversity index?

H′ = −Σ pᵢ ln pᵢ, where pᵢ is each species’ share of the individuals counted. It rises with both the number of species and how evenly the individuals are spread among them. It is 0 for a single species and ln S when all S species are equally common. The default woodlot of 7 species scores 1.593; most real communities fall between about 1.5 and 3.5.

What is Simpson's diversity index?

Simpson's D = Σ nᵢ(nᵢ − 1) ÷ (N(N − 1)) is the probability that two individuals picked at random (without replacement) belong to the same species, so a low D means high diversity. Most people report 1 − D, the chance that the two are different species, or 1/D. The default sample has D = 0.229, so 1 − D = 0.771.

Shannon or Simpson: which should I use?

Shannon weights rare species more, so it is sensitive to how many species you found; Simpson is dominated by the common species and changes little when a rare species is added. Report both, and say which form of Simpson you used (D, 1 − D or 1/D), because papers use all three under the same name.

What does evenness mean?

Pielou's evenness J′ = H′ ÷ ln S compares the diversity with the most it could be for that many species. Four species of 25 each give J′ = 1.00; the same four species at 85, 5, 5 and 5 give J′ = 0.42, although the species list is the same.

What is the effective number of species?

The number of equally common species that would give the same index: exp(H′) for Shannon and 1/Σpᵢ² for Simpson (Hill numbers; Jost 2006). Unlike H′, it doubles when diversity doubles, so it is easier to compare between sites. The default woodlot is as diverse as 4.9 equally common species, although 7 were found.

Does the log base matter?

It changes the number, not the ranking: H′ in base 2 (bits) is H′ in nats divided by ln 2, about 1.44 times larger. Ecology papers mostly use the natural log; information theory uses base 2. The evenness and the effective number of species are the same in every base.

How many individuals do I need to count?

Enough that new species stop turning up as you add samples (a species accumulation curve flattens). Small samples underestimate richness and Shannon H′. Count the same way at every site, with the same area, time or number of traps, so the indices can be compared.

Can I use percent cover or biomass instead of counts?

Shannon H′ and Σpᵢ² work with any measure of abundance, because they use only the proportions. The unbiased Simpson D with nᵢ(nᵢ − 1) needs whole-number counts of individuals, so for cover or biomass use Σpᵢ² (λ) and its inverse, which the calculator also shows.

Alpha diversity of one sample from whole-number counts: Shannon H′ (Shannon 1948) with Pielou's evenness, Simpson's D for a finite sample (Simpson 1949) with 1 − D, 1/D and Σp², Hill-number effective species (Jost 2006) and Berger–Parker dominance, as set out in Magurran (2004). Not included: bias corrections for unseen species (Chao1, Chao–Shen), rarefaction and species accumulation curves, confidence intervals, beta diversity between sites (Jaccard, Bray–Curtis), and phylogenetic or functional diversity. Compare sites with scenario compare.

Biodiversity Index Calculator: Shannon and Simpson Diversity

By FindMySum · Last reviewed

A biodiversity index puts a number on how varied a community of living things is. Counting species is the first step, but two meadows with the same ten species can be very different: in one, every species is common; in the other, a single grass makes up nine plants in ten. Diversity indices combine the number of species (richness) with how evenly the individuals are spread among them (evenness). This calculator works out the two most widely used, the Shannon index and Simpson's index, from a list of species and counts, along with the evenness, the effective number of species and the dominance of the commonest species.

Entering your counts

Type one species per line followed by its count, such as "Red oak 18", or just the counts separated by commas if the names don't matter. Counts must be whole numbers: individuals of each species in your plot, transect, net haul or trap. A species with a count of 0 is left out of the richness. Every index is calculated from the proportions pᵢ = nᵢ ÷ N, where N is the total number of individuals.

The Shannon diversity index

The Shannon index H′ = −Σ pᵢ ln pᵢ measures how uncertain you would be about the species of the next individual you sample. With only one species there is no uncertainty and H′ = 0. With S species that are all equally common, H′ reaches its maximum, ln S. Real communities sit in between, usually between about 1.5 and 3.5 with natural logs.

Because the maximum depends on the number of species, H′ is often divided by ln S to give Pielou's evenness J′, from 0 (one species dominates completely) to 1 (all are equally common). The Shannon index gives rare species more weight than Simpson's does, so it rises noticeably when a sample turns up a few extra species seen only once.

Simpson's index

Simpson's D = Σ nᵢ(nᵢ − 1) ÷ (N(N − 1)) is the probability that two individuals picked at random, without putting the first back, are of the same species. It is a measure of dominance: high when one species is common. The calculator reports it with its two common transformations, the index of diversity 1 − D (the chance the two are different species) and the reciprocal 1/D. Simpson's index changes little when a rare species is added, which makes it more stable than Shannon's between small samples.

Effective number of species

Indices in different units are hard to compare, and their scale is not linear: doubling the diversity of a community does not double its H′. The effective number of species (Hill numbers, popularised for ecologists by Lou Jost in 2006) fixes that. It is the number of equally common species that would give the same index: exp(H′) for Shannon and 1/Σpᵢ² for Simpson. A value of 4.9 means "as diverse as 4.9 species of equal abundance", whatever the actual species count.

Worked example: a woodlot tree survey

The calculator opens on a survey of 70 trees in a mixed hardwood woodlot: 25 sugar maple, 18 red oak, 12 white birch, 8 eastern hemlock, 4 white ash, 2 black cherry and 1 basswood.

  • Proportions: sugar maple 25 ÷ 70 = 0.357, red oak 0.257, white birch 0.171, hemlock 0.114, ash 0.057, cherry 0.029, basswood 0.014.
  • Shannon: adding −p ln p for each species gives H′ = 1.593. The maximum for 7 species is ln 7 = 1.946, so the evenness J′ = 0.819.
  • Simpson: (25 × 24 + 18 × 17 + 12 × 11 + 8 × 7 + 4 × 3 + 2 × 1 + 1 × 0) ÷ (70 × 69) = 1,108 ÷ 4,830 = 0.2294. The index of diversity 1 − D is 0.771 and 1/D is 4.36.
  • Effective species: exp(1.593) = 4.92. Seven species were found, but the woodlot is as diverse as about five equally common ones, because sugar maple and red oak make up 61% of the trees.
  • Berger–Parker dominance: the commonest species, sugar maple, is 35.7% of the sample.

Getting comparable numbers

Diversity indices depend on how hard you looked. A bigger sample finds more rare species, which raises richness and Shannon's H′ more than Simpson's index. When you compare sites or years, keep the method the same: the same plot size, the same number of traps or minutes of searching, the same season and the same level of identification. If a species could only be identified to genus, count the genus as one "species" everywhere. A species accumulation curve (species found against individuals counted) shows whether you have sampled enough: when it flattens, extra effort adds few new species.

These indices describe diversity within one sample, called alpha diversity. Comparing which species two sites share (beta diversity) needs similarity measures such as Jaccard or Bray–Curtis, and correcting for species you missed needs estimators such as Chao1. Those are not part of this calculator.

More questions

Is the Shannon index the same as the Shannon–Wiener or Shannon–Weaver index?

Yes. The formula comes from Claude Shannon's 1948 paper on information theory; ecologists have called it the Shannon–Wiener and Shannon–Weaver index after other authors connected with it. All three names mean H′ = −Σ pᵢ ln pᵢ, although some older papers use base 2 or base 10, so check the base before comparing values.

Why do two papers report different Simpson values for the same data?

Because Simpson's name covers several numbers. D (or λ) is the probability that two individuals are the same species, which falls as diversity rises; 1 − D is the probability they differ; 1/D is the inverse. Some authors also use Σpᵢ² (sampling with replacement) instead of Σnᵢ(nᵢ − 1)/(N(N − 1)). For large samples the two forms are almost equal.

Can a diversity index tell me whether a habitat is healthy?

Not on its own. A disturbed site can gain weedy or invasive species and score higher than an intact one. Indices are best for comparing the same kind of habitat sampled the same way, over time or between sites, alongside which species are present: native, at risk, or indicators of water or soil quality.

What is species richness and why is it not enough?

Richness S is the number of species found. It ignores abundance: a pond with one common fish and nine species seen once has the same richness as a pond where all ten are equally common. Shannon and Simpson indices combine richness with evenness, so they separate those two ponds.

How do I compare two sites with the calculator?

Enter the first site's counts and save it as a scenario, then enter the second. Scenario compare shows both sets of indices side by side. The effective number of species is the clearest comparison: a site with 8 effective species is twice as diverse as one with 4, which H′ values of 2.08 and 1.39 do not make obvious.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy