Skip to content
FiftyCalc Free calculators for all 50 states

Shannon Diversity Index Calculator

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Enter how many individuals you counted of each species (one number per species) to measure the diversity of the sample.

Result

Sample figures

Shannon index (H′; natural log)—

Pielou's evenness (J′) —

  • Simpson's diversity index (1 − D)—
  • Number of species (S)—
  • Total individuals (N)—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Shannon Diversity Index Calculator

Individuals per species (separated by commas, spaces or new lines): type or paste your values. Prefilled example: 5, 15, 30.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Individuals per species (separated by commas, spaces or new lines): type or paste your values.
  2. Read the result: Shannon index (H′; natural log); the panel also shows Pielou's evenness (J′), Simpson's diversity index (1 − D), Number of species (S) and Total individuals (N).

How this calculator works

Shannon index (Shannon, 1948): H′ = −Σ pᵢ ln pᵢ, where pᵢ = nᵢ ÷ N is the share of species i among the N individuals counted. It grows with both the number of species and how evenly individuals are spread among them.

Pielou's evenness (Pielou, 1966): J′ = H′ ÷ ln S, from 0 to 1, where S is the number of species; 1 means every species has the same count.

Simpson's diversity index (Simpson, 1949, form for a finite sample): 1 − D with D = Σ nᵢ(nᵢ − 1) ÷ (N(N − 1)), the probability that two individuals drawn at random without replacement belong to different species.

Worked example

Individuals per species (separated by commas, spaces or new lines)5, 15, 30
Shannon index (H′; natural log)0.8979
Pielou's evenness (J′)0.8173
Simpson's diversity index (1 − D)0.551
Number of species (S)3
Total individuals (N)50

Frequently asked questions

What is the Shannon index for four species of 10 individuals each?

H′ = ln 4 ≈ 1.3863 and the evenness is 1, the most even spread possible for four species.

Which logarithm does the Shannon index use?

Ecology usually uses the natural logarithm, as here. With log base 2 the value is H′ ÷ ln 2, in bits.

Related calculators