Shannon and Simpson Diversity Index Calculator

Diversity indices combine how many species a sample contains (richness) with how evenly the individuals are spread among them. Paste the count of each species and this calculator gives the Shannon index H′, Pielou’s evenness, Simpson’s index in its common forms (D, 1 − D and 1/D) and the effective number of species.

Inputs

Results

Shannon diversity index, H′
1.575
Pielou’s evenness, J′ = H′/H′max
0.8095
Effective number of species, exp(H′)
4.832
Simpson’s index, D = Σ n(n − 1)/[N(N − 1)]
0.2424
Simpson’s index of diversity, 1 − D
0.7576
Simpson’s reciprocal index, 1/D
4.125
Simpson’s λ = Σ p² (sampling with replacement)
0.2509
Species richness, S
7
Individuals counted, N
90

    RefBIO-ECO-003
    MethodH′ = −Σ pᵢ ln pᵢ; J′ = H′/ln S; D = Σ nᵢ(nᵢ − 1)/[N(N − 1)]; λ = Σ pᵢ²; effective number of species = exp(H′)
    UnitsSI
    Date2026-11-24

    Working

    Calculated in SI base units; inputs are converted from the units you choose.

    1. TotalsS = 7 species, N = 90 individuals
    2. Proportionspᵢ = nᵢ ÷ NOak 35/90 = 0.3889; Beech 22/90 = 0.2444; Ash 14/90 = 0.1556; Birch 9/90 = 0.1 …
    3. Shannon indexH′ = −Σ pᵢ ln pᵢ1.57527 nats
    4. EvennessJ′ = H′ ÷ ln S1.57527 ÷ ln 7 = 0.8095
    5. Simpson’s indexD = Σ nᵢ(nᵢ − 1) ÷ [N(N − 1)]D = 0.24245; 1 − D = 0.75755; 1/D = 4.1246
    6. Effective numbers of speciesexp(H′) and 1/λ, λ = Σ pᵢ²exp(1.5753) = 4.8321; λ = 0.25086, 1/λ = 3.9862

    Species, proportions and terms

    SpeciesCount, nProportion, p−p ln pp²n(n − 1)
    Oak350.388890.367290.151231,190
    Beech220.244440.344370.059753462
    Ash140.155560.289450.024198182
    Birch90.10.230260.0172
    Holly60.0666670.180540.004444430
    Hawthorn30.0333330.113370.00111116
    Yew10.0111110.0499980.000123460

    Shannon and Simpson

    The Shannon index H′ = −Σ pᵢ ln pᵢ comes from information theory: it is the uncertainty in predicting the species of an individual picked at random, and it rises with both richness and evenness. Dividing by ln S, its maximum when all species are equally common, gives Pielou’s evenness J′ between 0 and 1. Simpson’s index D is the probability that two individuals drawn without replacement are the same species, so a higher D means lower diversity; it is therefore usually reported as 1 − D (the chance two individuals differ) or 1/D. Exp(H′) and 1/λ convert the indices into an effective number of equally common species, which makes samples easier to compare.

    Assumptions and limits

    • All individuals in the sample were identified and counted, with the same effort for every species.
    • Simpson’s D uses the finite-sample form Σ n(n − 1)/[N(N − 1)]; λ = Σ p² is the form for an infinite population.
    • Indices depend on sample size: compare samples of similar size or use rarefaction.

    References

    • Shannon, C. E. (1948), A mathematical theory of communication, Bell System Technical Journal 27, 379–423 and 623–656.
    • Simpson, E. H. (1949), Measurement of diversity, Nature 163, 688.
    • Pielou, E. C. (1966), The measurement of diversity in different types of biological collections, Journal of Theoretical Biology 13, 131–144.
    • Hill, M. O. (1973), Diversity and evenness: a unifying notation and its consequences, Ecology 54(2), 427–432.
    • Magurran, A. E. (2004), Measuring Biological Diversity, Blackwell Publishing.

    Questions

    What are the Shannon and Simpson indices for the example woodland sample?
    For 90 trees of 7 species (oak 35, beech 22, ash 14, birch 9, holly 6, hawthorn 3, yew 1), H′ = 1.575 (2.273 in bits), evenness J′ = 0.810, D = 0.2424, 1 − D = 0.7576 and 1/D = 4.125. The effective number of species, exp(H′), is 4.83.
    Is a higher Simpson’s index more or less diverse?
    D itself is a dominance measure: higher D means less diversity. That is why 1 − D and 1/D, which rise with diversity, are usually reported. Check which form a paper or exam uses.
    Does the log base matter for the Shannon index?
    Only for the number itself: H′ in bits (log₂) is H′ in nats (ln) divided by ln 2. Evenness and the effective number of species are the same whichever base you use.

    This calculator is a design aid. Check results against the governing code or standard and have critical work verified by a qualified engineer. Read the disclaimer.