Shannon and Simpson Diversity Index Calculator
Shannon H′, Simpson's D, 1 − D and 1/D, Pielou's evenness and species richness from species counts.
Shannon index: H′ = −Σ pᵢ ln pᵢ, where pᵢ is each species' share of all individuals. Simpson's index for a finite sample: D = Σ n(n − 1) / [N(N − 1)], the chance two individuals drawn at random are the same species; Simpson's index of diversity is 1 − D and the reciprocal index is 1/D, both higher for more diverse communities. Species richness S is the number of species, and Pielou's evenness is J′ = H′ / ln S.
Free, runs in your browser. Nothing you enter is uploaded.
How to use it
- Enter one species per line with its count, or paste two columns from a spreadsheet.
- Read Shannon H′, Simpson's indices, evenness and richness.
- Open the table and working to see p and −p ln p for each species.
What you enter
- Species names and counts (or counts only)
What you get
- Shannon H′ (ln and log₂)
- Simpson's D, 1 − D and 1/D
- Pielou's evenness
- Species richness and total individuals
- Effective number of species
- Berger-Parker dominance
- Margalef and Menhinick richness
Formula
H′ = −Σ pᵢ ln pᵢ | D = Σ nᵢ(nᵢ − 1) / [N(N − 1)] | 1 − D | 1/D | J′ = H′ / ln S | Gini-Simpson = 1 − Σpᵢ² | Margalef = (S − 1)/ln N | Menhinick = S/√N
pᵢ = nᵢ/N. D uses the unbiased finite-sample form; Gini-Simpson (1 − Σp²) is the version used for very large samples. The effective number of species is e^H′.
Worked example: six tree species
Input: Oak 35, Maple 20, Birch 18, Pine 15, Ash 8, Willow 4 (N = 100)
Result: H′ = 1.613, D = 0.218, 1 − D = 0.782, 1/D = 4.60, J′ = 0.900
Fairly even woodland: oak is most common, but no species dominates.
Questions
How do you calculate Simpson's diversity index?
For each species multiply its count n by n − 1, add these up, and divide by N(N − 1), where N is the total number of individuals. That gives D. Report 1 − D (index of diversity) or 1/D (reciprocal index) if you want higher numbers to mean more diversity.
How do you calculate the Shannon diversity index?
Divide each species' count by the total to get p, multiply each p by ln p, add them up and change the sign. A community with one species has H′ = 0; typical field values fall between about 1.5 and 3.5.
What is the difference between Shannon and Simpson?
Shannon is more sensitive to rare species; Simpson is weighted towards the most common ones. Reporting both, plus richness and evenness, gives a fuller picture.
What does a high Simpson's index mean?
It depends which form you use. A high D means low diversity, because two random individuals are likely to be the same species. A high 1 − D or 1/D means high diversity.
What is evenness?
How equally individuals are spread across species. Pielou's J′ = H′ / ln S runs from near 0 (one species dominates) to 1 (all species equally common).
Limitations
- Both indices depend on sample size; compare sites only with similar sampling effort or after rarefaction.
- Counts must be of individuals; cover or biomass data need different methods.
References
- Simpson EH (1949) Nature 163:688.
- Shannon CE (1948) Bell System Technical Journal 27:379-423.
- Pielou EC (1966) Journal of Theoretical Biology 13:131-144.
- Magurran AE (2004) Blackwell Publishing.
Related reading
- Shannon Diversity Index: Formula and Calculation Examples
- Simpson Diversity Index: Formula, Calculation and Examples
- What Is Shannon Entropy? Definition, Formula and Examples
More Ecology
All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.