1. Home
  2. Calculators
  3. Diversity Index Calculator

Diversity Index Calculator

For ecology field work and coursework: summarise a sample of species counts in the standard diversity measures.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use Diversity Index Calculator

  1. Enter your numbers, or press a sample to see an example.
  2. Read the results and the table under them.
  3. Copy the results or download the table as a CSV file.

Features

  • Shannon H′ in nats, bits or base 10
  • Simpson, Gini-Simpson, unbiased and inverse Simpson
  • Evenness, Berger-Parker dominance and effective species
  • Margalef, Menhinick and Chao1 richness
  • Species proportions table

Supported formats

Input

  • Species counts, name: count per line

You get

  • On-screen results
  • Copyable text
  • CSV table

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Diversity Index Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Index values depend on sampling effort, so compare samples of similar size.
  • Chao1 needs integer counts.

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.

Checked against the current version of the Diversity Index Calculator on .

Frequently asked questions

What is the effective number of species?

It is the number of equally abundant species that would give the same diversity: e^H′ for Shannon and 1/Σpᵢ² for Simpson. The woodland plot has 5 species but behaves like about 3.16 equally common ones by Shannon and 2.65 by Simpson, because one species holds 52% of the individuals. The community of four equal species has an effective number of exactly 4.

Why does Chao1 give 7 for the counts 10, 10, 5, 3, 1, 1?

There are six species, two seen once (f₁ = 2) and none seen exactly twice (f₂ = 0), so Chao1 = 6 + 2 × 1 / (2 × (0 + 1)) = 7. The idea is that species seen once or twice hint at others that were missed. With no singletons, as in the woodland counts where only Rowan appears once, the estimate adds nothing, giving 5 for the woodland plot.

What is a good Shannon index?

There is no universal threshold: the value rises with richness and evenness, so compare samples of similar effort. For S equally common species H′ is ln S.

What does Chao1 estimate?

The number of species likely present including ones missed, from the numbers of species seen once and twice.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.