Diversity Indices Calculator

Calculate Shannon diversity H', Pielou evenness J', and Simpson diversity for ecological communities.

e.g. counts per species
Please check your inputs and try again.

Richness, Evenness and Diversity

Diversity indices combine two distinct things, and separating them is what makes the numbers interpretable.

ComponentMeasuresExample
RichnessHow many species5 species present
EvennessHow equally abundant40:30:20:8:2 versus 200:5:3:2:1
DiversityBoth combinedShannon H′, Simpson D
H′ = −Σ(pi ln pi)     J′ = H′ / ln(S)

Pielou's J′ isolates evenness by dividing observed diversity by the maximum possible for that richness. It runs from 0 to 1, so a J′ of 0.83 means the community is close to perfectly even, while a value near 0.3 indicates strong dominance.

Two communities with identical species counts can therefore have very different H′. The five-species example at 40:30:20:8:2 gives H′ = 1.33 and J′ = 0.83; the same five species at 200:5:3:2:1 gives a far lower H′ because one species dominates.

Shannon or Simpson?

IndexWeightsSensitive toRange
Shannon H′Information-basedRare species0 to ln(S)
Simpson DProbability two individuals differDominant species0 to 1

Shannon responds strongly to rare species, so it rewards thorough sampling — and is correspondingly sensitive to sampling effort. Simpson is dominated by the common species and is more robust to missing rarities. Reporting both is standard practice, since they answer different questions.

Because Shannon rises with every additional rare species detected, comparing H′ between studies with different sampling effort is invalid. Rarefaction to a common sample size is necessary before comparison.

Worked Examples

Example 1: Balanced: [40,30,20,8,2]
H'=-Σ(pi×ln pi)=1.33
Result: J'=1.47/ln(5)=0.83 — high evenness
Near-equal species abundances
Example 2: Dominated: [200,5,3,2,1]
H' much lower
Result: J' near 0 — one species dominates
Single dominant species community
Example 3: Same richness, different evenness
[40,30,20,8,2] versus [200,5,3,2,1]
Result: H′ 1.33 versus 0.27
Five species in both cases. The second is overwhelmingly dominated by one species, so diversity collapses despite identical richness.
Example 4: Why J′ is bounded
H′ = 1.33, S = 5, ln(5) = 1.609
Result: J′ = 0.83
Dividing by the theoretical maximum normalises evenness to a 0–1 scale that is comparable across communities of different richness.

Common Mistakes

⚠️
Comparing Shannon indices across unequal sampling

H′ rises as more rare species are detected. Studies with different effort must be rarefied to a common sample size before comparison.

⚠️
Reporting diversity without evenness

Two communities with the same species count can differ enormously in structure. Pielou's J′ separates evenness from richness.

⚠️
Assuming Shannon and Simpson rank communities identically

Shannon weights rare species heavily and Simpson weights dominants. They can order the same set of communities differently.

⚠️
Treating H′ as having an absolute scale

Its maximum is ln(S), which depends on richness. A value of 2.0 means something different in a 10-species versus a 100-species community.

Frequently Asked Questions

Shannon vs Simpson?
Shannon H': sensitive to rare species (log gives more weight to rare). Simpson D: sensitive to dominant species (squares emphasize common). For conservation: both matter. H' better for comparisons; 1/D (true diversity) has intuitive meaning (effective species number).
Alpha diversity measures?
Species richness S: simplest. H': accounts for evenness. 1/D: Hill number q=2. Hill numbers family (0D=S, 1D=exp(H'), 2D=1/D): elegant unified framework. All equal when perfectly even, diverge when unequal abundances.
What is the difference between richness and evenness?
Richness counts species; evenness measures how equally abundant they are. Diversity indices combine both, which is why evenness should be reported separately.
Should I use Shannon or Simpson?
Shannon is sensitive to rare species and Simpson to dominant ones. Reporting both is standard, since they answer different ecological questions.
What does Pielou's J′ measure?
Evenness alone, normalised to a 0–1 scale by dividing observed Shannon diversity by its maximum for that species count.
Why can't I compare Shannon values across studies?
Because H′ increases as more rare species are detected, making it sensitive to sampling effort. Rarefaction to equal sample size is required first.