🌿 Shannon Diversity Index Calculator
Calculate the Shannon diversity index and evenness for a community by entering the individual counts for each species.
What this calculator does
The Shannon diversity index (H’) is one of the most widely used measures of biodiversity in ecology. It combines two things into a single number: how many different species are present (richness) and how evenly individuals are distributed among those species (evenness). Enter the number of individuals counted for each species — leave unused species fields at zero.
How it’s calculated
For each species, the proportion of the total sample it represents (p) is calculated as its count divided by the total number of individuals (N). The index is then H’ = -sum(p x ln(p)) across all species present. A higher H’ means a more diverse community — either more species, more even representation among them, or both. The related evenness value (H’ divided by the maximum possible H’ for that many species, ln(S)) ranges from 0 to 1 and shows how balanced the community is independent of species count: a value near 1 means individuals are spread fairly evenly across species, while a low value means one or two species dominate.
This index is a relative comparison tool — it’s most useful for comparing diversity between sites, time periods, or sampling methods, rather than as an absolute standalone score, and results depend heavily on sample size and how consistently species were counted.