Guide
Diversity indices: Shannon, Simpson, evenness and richness from species counts
How diverse is a community of plants, insects, microbes or words? There are two ingredients: how many species there are, called richness, and how evenly the individuals are spread among them, called evenness. Diversity indices combine the two into one number so that sites, seasons or treatments can be compared. This calculator takes the count of each species and returns the standard indices, with the table of proportions behind them.
Entering the counts
Type one species per line as name: count, for example Oak: 52, or just the counts, one per line. Species with a count of 0 are ignored, counts cannot be negative, and decimals are allowed for abundance data, though Chao1 and the unbiased Simpson need integers. Choose the logarithm for Shannon’s index: natural (nats, the usual choice), base 2 (bits) or base 10. The page opens on a five-species woodland plot of 100 individuals.
Shannon’s index
Shannon’s H′ = −Σ pᵢ ln pᵢ measures the uncertainty in predicting the species of a randomly chosen individual: higher when there are more species and when they are more even. For the woodland plot with proportions 0.52, 0.30, 0.12, 0.05 and 0.01, H′ = 1.1515035. The maximum for S species is ln S, reached when all are equally common, which gives the evenness J = H′ / ln S = 0.71546938 for this plot, and 1 for four species of 25 each, where H′ = 1.3862944.
The Simpson family
Simpson’s index Σ pᵢ² is the probability that two individuals drawn at random are of the same species: 0.3774 for the woodland. The Gini-Simpson index 1 − Σ pᵢ², 0.6226, is the probability that they differ and is more intuitive as a measure of diversity. For counts, the unbiased version 1 − Σ nᵢ(nᵢ − 1) / N(N − 1) corrects for sampling without replacement: 0.62888889. The inverse Simpson 1 / Σ pᵢ² is 2.6497085, an effective number of species.
Dominance and richness measures
Berger-Parker dominance is the share of the commonest species: 52% in the woodland and 90% in the community dominated by one species. Margalef’s richness (S − 1) / ln N is 0.86858896 and Menhinick’s S / √N is 0.5 for the plot; both try to correct richness for sample size. Chao1 estimates how many species there are including those missed: it adds f₁(f₁ − 1) / (2(f₂ + 1)) to the observed S, where f₁ and f₂ are the numbers of species with exactly one and two individuals.
Worked examples
The woodland (Oak 52, Beech 30, Birch 12, Hazel 5, Rowan 1): S = 5, N = 100, H′ = 1.1515035, e^H′ = 3.162945, Berger-Parker 0.52, Chao1 5. Even community of four species with 25 each: H′ = 1.3862944, Simpson 0.25, Gini-Simpson 0.75 and inverse Simpson 4. A community of five with counts 90, 4, 3, 2 and 1: H′ = 0.4530684, evenness 0.28150722, Gini-Simpson 0.187 and inverse Simpson 1.2300123, so five species but effectively just over one. Counts 10, 10, 5, 3, 1, 1 in bits give H′ = 2.1467876.
Reading the results
Compare the same kind of index across samples of similar size and effort, because diversity measures rise as you sample more. A single value has no universal meaning: H′ of 1.15 is high for one habitat and low for another. Evenness helps interpret the pattern, since two sites with the same richness can differ greatly in how dominated they are. Report which index and which logarithm you used, and the number of individuals, so readers can reproduce it.
Limits
Indices summarise the counts you give them and say nothing about which species are present, whether they are native or how rare they are conservation-wise. They depend on sampling effort and method, and the tool does not rarefy samples to a common size or compute confidence intervals. A higher index is not automatically better: an invasive species can raise the diversity of a site. Chao1 is a lower-bound estimate and is only defined for integer counts.
Related tools
- Average Calculator summarises repeated measures per plot.
- Standard Error Calculator gives the precision of a mean index across several plots.
- Chi-Square Calculator compares counts between sites.
- Punnett Square Calculator is another probability tool for biology students.
Checked against the current version of the Diversity Index Calculator on .

