Meadow Learning Lab

Diversity calculator

Enter one species per line, with a count at the end of each line. Names are optional. You can paste two columns straight from a spreadsheet. Counts must be whole numbers, so percentage cover with decimals will be skipped.

One species per line. Blank lines are ignored, and so are counts of zero.

Formulas used

With ni individuals of species i, N individuals in all and pi = ni/N:

Measures
MeasureFormula
RichnessS, the number of species with a count above zero
ShannonH′ = −Σ pi ln pi
Pielou’s evennessJ′ = H′ / ln S
Simpson’s indexD = Σ pi2
Gini-Simpson1 − D
Finite-sample SimpsonΣ ni(ni − 1) / N(N − 1)
Hill number, order 1exp(H′)
Hill number, order 21/D
Chao1, bias-correctedS + f1(f1 − 1) / [2(f2 + 1)]

Worked example

An invented quadrat count: 40 of species A, 30 of B, 20 of C and 10 of D, for N = 100.

The proportions are 0.4, 0.3, 0.2 and 0.1. Shannon is −(0.4 ln 0.4 + 0.3 ln 0.3 + 0.2 ln 0.2 + 0.1 ln 0.1), which comes to 1.280. Simpson’s D is 0.16 + 0.09 + 0.04 + 0.01 = 0.300. So the Gini-Simpson is 0.700, and the effective numbers of species are exp(1.280) = 3.60 and 1/0.300 = 3.33. Evenness is 1.280/ln 4 = 0.923.

Reading the result

Compare samples only at equal effort, and preferably at equal numbers of individuals. A long tail of singletons means the list is incomplete, and Chao1 will sit well above S. Chao1 is a lower bound on richness, not a count. See What biodiversity measures for what these numbers do and do not show, and Quadrat sampling for how to collect them.