calculator.onl
Categories50

Species diversity and evenness indices

Calculate observed richness, Shannon diversity, Gini–Simpson diversity, inverse Simpson diversity and evenness from species counts.

A worked example

Keep ten observations and three species. How does a more even split change diversity?

H (ln)1.02971−D0.62S3N100
Individuals counted per species nᵢ

Updates as you type

Use a dot or comma for decimals. No thousands separators.

YOUR RESULT

H (ln)

1.0297

Calculated from your inputs

1−D0.62
1/D2.6316
J0.9372
S3
N100
exp(H)2.8001
The numbers, at a glance
pᵢ · Species rank by abundance
Species rank by abundance: 1 · pᵢ: 0.5Species rank by abundance: 2 · pᵢ: 0.3Species rank by abundance: 3 · pᵢ: 0.20.5013Species rank by abundance: 1 · pᵢ: 0.5
Table and calculation details
Species rank by abundancepᵢ
10.5
20.3
30.2

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

A more even split raises Shannon diversity in this sample even though the species list and total count stay the same. Change “Individuals counted per species nᵢ” from 50, 30, 20 to 40, 30, 30 and keep the other inputs from the worked example. The value for “H (ln)” goes from 1.0297 to 1.0889. For a related calculation, try Two-event probability calculator.

An ecological survey can contain the same number of individuals and the same number of species as another survey yet distribute its observations very differently. One sample might divide almost evenly among species, while another includes a single very common species and many occasional records. A single species list hides that distinction. This calculator takes abundance counts, retains their relative sizes, and reports several complementary summaries along with a rank-abundance graph. Enter one nonnegative integer for each species after combining repeated records of the same species.

The first useful controls are observed richness and sample size. Richness counts only species with positive abundance. Sample size is the sum of all recorded individuals. When a zero is present in a master species list, the zero does not contribute to richness or to either diversity sum. It also does not demonstrate absence from the wider habitat. A blank field is not interpreted as a survey of zero species. At least one positive abundance is necessary to turn counts into proportions that add to one.

The Shannon index uses a natural logarithm for each positive species share and weights each logarithm by that share. It is zero in a sample containing just one species. If four species are equally abundant, it equals the natural logarithm of four. Exponentiating the Shannon index converts it to an effective number of equally abundant species. This gives an intuitive comparison with observed richness. A sample may contain many rare taxa yet behave like a much smaller uniform assemblage by this abundance-weighted measure.

Simpson concentration sums the squared shares. This page reports both its complement and its reciprocal under explicit labels to avoid confusion between different index conventions. The complement can be read as the probability of two independent draws from the empirical proportions yielding different species. Drawing two recorded individuals without replacement is a different experiment in a finite sample. The reciprocal expresses diversity on an effective species scale and responds strongly to common species because their proportions carry large squared weights.

For counts fifty, thirty and twenty, the empirical shares are one half, three tenths and one fifth. Their squared shares sum to 0.38. The Gini–Simpson value is therefore 0.62, while inverse Simpson diversity is approximately 2.63. If all three species had equal counts, inverse Simpson diversity would be three. Pielou evenness compares the observed Shannon value with the maximum available at the observed richness. When there is a single species that maximum is zero, so the evenness ratio is undefined and the display uses a dash.

Read the rank-abundance graph from the most numerous species to the least numerous species. Species identities are deliberately absent from the graph, so changing the input order changes none of the indices. Multiplying every count by the same positive integer also preserves the curve and the indices because proportions stay fixed, even though sample size rises. Different sampling effort, gear or taxonomic resolution can shift the observed species set. Document those choices before comparing sites. Rarefaction, confidence intervals and between-site turnover address additional sampling questions and are outside this single-assemblage summary.

What to enter

InputWhat it meansExample value
Individuals counted per species nᵢIndividuals counted per species nᵢ50, 30, 20

How the calculation works

  1. Enter one observed count per species, separated by commas, semicolons or whitespace. Do not substitute percentages for counts.
  2. Read richness and total abundance alongside Shannon, Gini–Simpson and inverse Simpson diversity.
  3. Use the ranked abundance plot and evenness to compare the distribution of individuals among observed species.
The formulapᵢ = nᵢ/N, H = −Σpᵢ ln pᵢ, D = Σpᵢ², J = H/ln S

A worked example

With counts 50, 30 and 20, the shares are 0.5, 0.3 and 0.2. H = 1.029653, 1−D = 0.62, 1/D = 2.631579 and evenness J ≈ 0.93723.

Example you can load

What to enter
Result for this example · H (ln)1.0297

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Up to 200 nonnegative whole-number species counts, with at least one positive count. Shannon diversity uses natural logarithms. Evenness is undefined for one observed species.

Frequently asked questions

Which Simpson index is displayed?

The page reports the complement 1−D and the reciprocal 1/D, where D is the sum of squared species proportions.

Should zero-count species be included?

You can enter zeros. They contribute neither a positive observed species nor a term in H or D.

Why is evenness blank for one species?

Pielou evenness divides by ln S. With S = 1 the denominator is zero. The other applicable indices still have numerical values.