Opening your learning space
Starting the app …
Opening your learning space
Starting the app …
The Shannon index (Shannon-Wiener index) measures the diversity of a community. It accounts for both species richness and the evenness with which individuals are distributed among the species.
Free to browse · flashcards or a multiple-choice quiz · import from Essential
Formula
H' and pi are dimensionless; pi = ni/N is a proportion (0…1)
| Symbol | Meaning | Unit |
|---|---|---|
| H' | Shannon diversity index (diversity of the community) | – |
| relative frequency of species i, that is ni/N | – | |
| number of individuals of species i | count | |
| total number of all individuals | count | |
| number of species (species richness) | count |
H' = -\sum_{i=1}^{S} p_i \cdot \ln(p_i)Original schematic by Quanta
Free with a Quanta account. Your download stays ready after registration.
Claude Shannon developed the measure in 1948 in information theory; ecology adopted it as a diversity measure. Usually the natural logarithm ln is used (unit "nats"), more rarely log2 or log10. H' is zero for a single species and becomes maximal () when all species are equally frequent. From H' and Hmax you compute the evenness '/ln S as a measure of even distribution (0…1).
Applies to diversity comparisons of communities whose species and individual counts are fully recorded or representatively sampled.
Each species contributes its information content −ln(pi), weighted by its frequency pi; the sum measures the uncertainty about which species a random individual belongs to.
Maximum diversity
Reached when all S species are equally frequent.
Evenness
Lies between 0 and 1; 1 means perfect even distribution.
Three species with 10, 6, 4 individuals . Compute H' and the evenness.
; 0.3; 0.2.
H' = −(0.5·ln0...2) = −(−0.347 − 0.361 − 0.322) = 1.030.
Hmax = ln3 = 1.099, so .
Four species with 25 individuals each . What is H'?
All .
H' = −4·(0.25·ln0.25) = −(ln0.25) = ln4 = 1.386 = Hmax, i.e. maximum diversity with evenness 1.
Using absolute counts instead of proportions pi.
The relative frequencies pi = ni/N enter the formula, not the raw numbers.
Forgetting the minus sign.
Since ln(pi) is negative for pi < 1, the leading minus makes H' positive.
Comparing H' values with different logarithms.
Only values with the same base (usually ln) are comparable.
Interpreting H' alone as evenness.
H' also depends on the number of species; the evenness '/ln S separates both.
Formula cluster
Connects species richness, probability and information theory.
Community with 3 species, individuals 10, 6, , so ; 0.3; 0.2. H' = −(0.5·ln0...2) = −(0.5·(−0.693) + 0.3·(−1.204) + 0.2·(−1.609)) = −(−0.347 − 0.361 − 0.322) = 1.030. The maximum would be Hmax = ln3 = 1.099, so the evenness is .
Ecology (comparing species diversity of habitats), environmental monitoring, evaluating restoration and disturbances, water quality
Here is how to work through a typical Shannon Index (Biodiversity) (H' = −Σ pᵢ·ln(pᵢ)) task step by step:
Task
Three species with 10, 6, 4 individuals . Compute H' and the evenness.
Solution path
; 0.3; 0.2.
H' = −(0.5·ln0...2) = −(−0.347 − 0.361 − 0.322) = 1.030.
Hmax = ln3 = 1.099, so .
Task
Four species with 25 individuals each . What is H'?
Solution path
All .
H' = −4·(0.25·ln0.25) = −(ln0.25) = ln4 = 1.386 = Hmax, i.e. maximum diversity with evenness 1.
First you determine the relative frequency pi of each species, that is the number of individuals of the species divided by the total number of all individuals. Then you compute the product pi·ln(pi) for each species, sum these values over all species and finally reverse the sign. The leading minus is needed because the logarithm of numbers below 1 is negative. Example: three species with 10, 6 and 4 individuals give the proportions 0.5, 0.3 and 0.2 at . Then H' = −(0.5·ln0...2) = −(−0.347 − 0.361 − 0.322) = 1.03. The larger H', the more diverse the community. It is important to always use the same logarithm, usually the natural ln.
A high Shannon index indicates great diversity. It is driven by two factors: species richness, that is how many species occur, and evenness, that is how uniformly the individuals are distributed among the species. The index is maximal exactly when many species occur and all are roughly equally frequent. If, by contrast, a single species dominates strongly, the index stays low even when many species are present. A low value therefore points to a species-poor community or one dominated by few species. In practice you compare the index between sites or over time to detect changes in species diversity, for example after a disturbance or restoration. Absolute values are only meaningfully comparable with the same logarithm base and similar sampling.
Evenness measures how uniformly the individuals are distributed among the species, independent of how many species there are. It follows from the Shannon index divided by its maximum: '/ln S, where S is the number of species. The maximum is reached when all species are equally frequent. Evenness lies between 0 and 1: a value near 1 means all species occur similarly often, a value near 0 that one species strongly dominates. Example: three species with proportions 0.5, 0.3 and 0.2 have H' = 1.03 and Hmax = ln3 = 1.099, so , a fairly even distribution. Evenness thus separates the even-distribution aspect from pure species richness, which H' alone mixes together.
In ecology the natural logarithm ln is most common; the unit is then called "nats". Some sources use the base-2 logarithm log2, giving units in "bits", or the base-10 logarithm log10. The choice only changes the numerical value, not the statement: a conversion factor transforms the values into each other, since . What matters is that you always use the same base within a comparison, otherwise the values are not comparable. The maximum also depends on the base: with ln, , with log2 it would be log2 S. For evenness the base cancels, because you divide H' by Hmax with the same base, so evenness always gives the same value between 0 and 1. Therefore check before every comparison which base was used.
Both measure diversity but weight differently. The Shannon index H' = −Σ pi·ln(pi) comes from information theory and reacts comparatively sensitively to rare species, because their information content −ln(pi) is large. The Simpson index D = Σ pi2 is the probability of drawing the same species twice and emphasises common, dominant species more strongly; rare species barely influence it. As a diversity measure one usually uses 1 − D or the reciprocal with the Simpson index, which increase with diversity, while D itself measures dominance. In practice both complement each other: the Shannon index suits cases where rare species matter, the Simpson index where the dominance structure is decisive. Often one computes both to get a complete picture of the diversity.
Quanta exam set
Curated exam set for "Shannon Index (Biodiversity)":
Question (front)
Which formula describes Shannon Index (Biodiversity)?
Answer in your set
Question (front)
How do you rearrange Shannon Index (Biodiversity) for Maximum diversity?
Answer in your set
Question (front)
Which common mistake happens with Shannon Index (Biodiversity)?
Answer in your set
+ 8 more cards: units, variables, derivation, example, exam task
The formula set contains 11 cards. After importing, review them and start practicing; your ratings determine later review intervals.
This list names subject references and further reading. A page or section number appears when it is part of the reference; these are not verbatim quotations.
Create a curated FSRS exam set for H' = −Σ pᵢ·ln(pᵢ): formula recall, variables, derivation, rearrangement, worked example, common mistakes and exam context.
Curated formula set · LaTeX · FSRS spaced repetition · import from Essential