Shannon Diversity Index
GeneralShannon Diversity Index (Shannon-Wiener Index)
A measure of species diversity in a community that accounts for both the number of species present and how evenly individuals are distributed among them.
Definition
The Shannon Diversity Index, also called the Shannon-Wiener Index and denoted H', is a widely used measure of species diversity within an ecological community. Unlike a simple species count, it incorporates both richness (how many different species are present) and evenness (how equally individuals are distributed among those species), producing a single number that better reflects real-world biodiversity.
Ecologists use the Shannon Index to compare biodiversity across habitats, track changes in an ecosystem over time, and assess the impact of disturbances such as pollution, deforestation, or invasive species. A habitat's diversity is closely linked to its carrying capacity, since environments that can sustain more species at healthy population levels tend to show higher, more stable H' values, while degraded or resource-stressed habitats often show one species dominating and a correspondingly lower index.
The formula was adapted from Claude Shannon's information theory, where it originally measured uncertainty in a message โ in ecology, "uncertainty" translates to how hard it would be to predict the species of a randomly selected individual, which is higher when diversity is greater. The Shannon Diversity Index Calculator computes H' directly from a list of species counts.
Formula
H' = โฮฃ (pแตข ร ln(pแตข))
Where:
- H' = Shannon Diversity Index
- pแตข = proportion of individuals belonging to species i (species i's count divided by total individuals)
- ln = natural logarithm
- ฮฃ = sum across all species in the sample
The maximum possible H' for a given number of species S occurs when all species are equally abundant, and equals ln(S). Dividing H' by ln(S) gives evenness, a normalized 0-to-1 score of how equally distributed the species are.
Worked Example
A survey of a wetland plot finds 4 species with the following individual counts: Species A = 40, Species B = 30, Species C = 20, Species D = 10 (Total = 100 individuals).
Proportions: pA = 0.40, pB = 0.30, pC = 0.20, pD = 0.10
Calculate each term (pแตข ร ln(pแตข)):
- A: 0.40 ร ln(0.40) = 0.40 ร (โ0.916) = โ0.367
- B: 0.30 ร ln(0.30) = 0.30 ร (โ1.204) = โ0.361
- C: 0.20 ร ln(0.20) = 0.20 ร (โ1.609) = โ0.322
- D: 0.10 ร ln(0.10) = 0.10 ร (โ2.303) = โ0.230
Sum = โ0.367 โ 0.361 โ 0.322 โ 0.230 = โ1.280
H' = โ(โ1.280) = 1.28
Maximum possible H' for 4 species = ln(4) = 1.386, so evenness = 1.28 / 1.386 โ 0.92 โ indicating a fairly evenly distributed community. Use the Shannon Diversity Index Calculator to run this calculation directly from raw species counts.
Key Things to Know
- Higher H' means more diverse, but context matters: A value of 1.28 might be high for a specialized alpine habitat with few species but low for a tropical rainforest plot, so H' values should be compared within similar ecosystem types and sampling scales, not across radically different habitats.
- Evenness and richness both drive the score: Two sites with the same number of species can have very different H' values if one has an evenly distributed community and the other is dominated by a single species, which is why evenness is usually reported alongside H'.
- Links to carrying capacity: Habitats operating well within their carrying capacity for multiple species tend to sustain higher, more stable diversity indices, while resource-limited or degraded environments often show a collapse toward single-species dominance and lower H'.
- Sampling consistency is essential: Because H' is calculated from proportions in a sample, comparing surveys taken with different plot sizes, durations, or methods can produce misleading differences that reflect sampling artifacts rather than real ecological change.
- Zero indicates no diversity, not an error: An H' of exactly zero simply means only one species was found in the sample โ it is a valid, meaningful result at the low end of the diversity scale, not a calculation failure.
Related Terms
Frequently Asked Questions