Written and maintained by CASRAI Editorial Board
Last updated
The Simpson diversity index summarises how diverse a community is from the relative abundance of each species in a sample. It exists in three common forms that are easy to confuse: the sum of squared proportions (D), the Gini-Simpson index (1 − D), and the inverse Simpson index (1/D). Papers and software use the name “Simpson index” for each of them, so always state which one you computed.
What is the Simpson diversity index? A definition
The Simpson diversity index is a measure of diversity built on the proportion of individuals that belong to each species (or category) in a sample. It is one of the most commonly used diversity indices and belongs to the family described by Hill (1973), which also contains the Shannon index. Simpson (1949) is the usual origin reference. Because every proportion is squared and summed, the index is driven mainly by the most abundant species, and rare species change it very little.
Simpson diversity index formula
For a sample with S species, let pi be the proportion of all individuals that belong to species i, so that the pi sum to 1. The vegan R package documentation defines the base quantity as
D = Σ pi2 (summed over i = 1 to S)
and states that both variants of Simpson’s index are based on this D. In the formula, pi = ni / N, where ni is the count of species i and N is the total count of all individuals.
Simpson index vs Gini-Simpson index vs inverse Simpson index
The vegan documentation (function diversity) returns the two variants as follows: “simpson” returns 1 − D and “invsimpson” returns 1/D. The table also gives the range of each form, which follows directly from the formula.
| Form | Formula | Range | vegan name | Direction |
|---|---|---|---|---|
| Sum of squared proportions | D = Σ pi2 | 1/S to 1 | (base quantity) | Lower = more diverse |
| Gini-Simpson index (Simpson’s index of diversity) | 1 − D | 0 to 1 − 1/S | “simpson” | Higher = more diverse |
| Inverse Simpson index | 1 / D | 1 to S | “invsimpson” | Higher = more diverse |
The same vegan documentation notes that these indices are all very closely related (Hill 1973). For the Shannon counterpart, see our Shannon diversity index guide.
Unbiased version for small samples
Vegan also offers simpson.unb, which finds unbiased Simpson indices for discrete samples (Hurlbert 1971, eq. 5). The documentation states that it can only be calculated for data of integer counts, so it cannot be used on proportions or percentages. Separately, the vegan vignette notes that rarefied richness for two individuals is a finite-sample variant of the Simpson index, or more precisely of D1 + 1, where D1 is 1 − D.
How to calculate Simpson’s diversity index: worked example
A sample contains N = 100 individuals from S = 4 species, with counts 50, 30, 15 and 5.
| Species | Count ni | pi = ni / 100 | pi2 |
|---|---|---|---|
| A | 50 | 0.50 | 0.2500 |
| B | 30 | 0.30 | 0.0900 |
| C | 15 | 0.15 | 0.0225 |
| D | 5 | 0.05 | 0.0025 |
| Total | 100 | 1.00 | 0.3650 |
- Sum of squared proportions: D = 0.25 + 0.09 + 0.0225 + 0.0025 = 0.365.
- Gini-Simpson index: 1 − D = 1 − 0.365 = 0.635.
- Inverse Simpson index: 1 / D = 1 / 0.365 = 2.74 (2.7397 before rounding).
For contrast, take a second sample of 100 individuals with counts 94, 2, 2 and 2. Here D = 0.8836 + 0.0004 + 0.0004 + 0.0004 = 0.8848, so 1 − D = 0.115 and 1/D = 1.13. Both samples have four species, yet the second scores far lower because one species makes up 94% of the individuals. If all four species had 25 individuals each, D = 4 × 0.0625 = 0.25, giving the maxima for S = 4: 1 − D = 0.75 and 1/D = 4.
How to interpret the Simpson diversity index
Read the index in one direction: for 1 − D and 1/D, a higher value means a more diverse sample, and for D itself a lower value means a more diverse sample. The value reflects both how many species are present and how evenly the individuals are spread across them. The ranges below are mathematical consequences of the formula for a sample with S species.
| Situation | D | 1 − D | 1 / D |
|---|---|---|---|
| One species only | 1 | 0 | 1 |
| One species dominates (94, 2, 2, 2) | 0.885 | 0.115 | 1.13 |
| Uneven spread (50, 30, 15, 5) | 0.365 | 0.635 | 2.74 |
| All S species equally abundant (S = 4) | 0.25 (= 1/S) | 0.75 (= 1 − 1/S) | 4 (= S) |
The inverse Simpson index is on the scale of species counts: a value of 2.74 behaves like a community of about 2.74 equally abundant species. Use it, or 1 − D, to compare samples that were collected and identified the same way. There is no universal cut-off that separates “low” from “high” diversity, because the maximum depends on S.
Assumptions and common mistakes
- Mixing conventions. A reported “Simpson index” of 0.635 and one of 2.74 can describe the same sample. Name the form (D, 1 − D or 1/D) and the software.
- Proportions must sum to 1. Compute each pi from counts or abundances of the same kind. Do not mix counts with percentages.
- Using the unbiased version on non-count data. It needs integer counts.
- Comparing samples of very different size without saying so. The plain formula uses only proportions, so for small samples consider the unbiased form or rarefaction described above.
- Treating a single value as a verdict. The index compresses richness and evenness into one number; report S and N alongside it.
- Inconsistent identification. The result depends on how individuals are assigned to species or categories, so apply the same scheme to every sample. For biodiversity records, a shared standard such as Darwin Core keeps species names consistent.
How to report the Simpson diversity index (APA-style example)
State the form of the index, the software, and the sample size and richness it was computed from. For example:
Community diversity was summarised with the Gini-Simpson index (1 − D), calculated with the vegan package in R. The plot sample (N = 100 individuals, S = 4 species) had a Gini-Simpson index of 0.635 (inverse Simpson = 2.74).
Put the per-sample values in a table when you report several samples; our APA table guide covers layout. If the index is one descriptive result among others, descriptive and inferential statistics should be kept distinct in the text, and a test to compare groups can be chosen with the statistical test decision tree.
How to calculate Simpson’s diversity index in Excel, R or Python
Excel
With species counts in B2:B5:
Gini-Simpson (1 - D): =1-SUMPRODUCT((B2:B5/SUM(B2:B5))^2)
Inverse Simpson (1/D): =1/SUMPRODUCT((B2:B5/SUM(B2:B5))^2)
For the worked example these return 0.635 and 2.74.
R (vegan)
library(vegan)
x <- c(50, 30, 15, 5)
diversity(x, "simpson") # 1 - D = 0.635
diversity(x, "invsimpson") # 1 / D = 2.739726
Python (numpy)
import numpy as np
counts = np.array([50, 30, 15, 5])
p = counts / counts.sum()
D = (p ** 2).sum()
print(D, 1 - D, 1 / D) # 0.365 0.635 2.7397...
Simpson diversity index FAQ
Is a higher Simpson index more diverse?
For the Gini-Simpson index (1 − D) and the inverse Simpson index (1/D), yes. For D itself the direction is reversed: a lower D means a more diverse sample.
What is the maximum value of the Simpson diversity index?
It depends on the form and on the number of species S. 1 − D reaches 1 − 1/S when all species are equally abundant, so it approaches but never reaches 1. 1/D reaches S. D ranges from 1/S to 1.
What is a good Simpson diversity index value?
No universal threshold exists, because the possible range depends on S. Compare values across samples that use the same form of the index and comparable sampling, and report S and N with them.
How is the Simpson index different from the Shannon index?
Both combine richness and evenness. Simpson-based indices are weighted toward the most abundant species. See the Shannon diversity index guide for the Shannon formula.
Can I calculate it from percentages?
Yes for D, 1 − D and 1/D, once percentages are converted to proportions that sum to 1. The unbiased estimator in vegan needs integer counts.
Sources
- Oksanen, J., et al. vegan: an introduction to ordination (diversity-vegan vignette). The Comprehensive R Archive Network. cran.r-project.org/web/packages/vegan/vignettes/diversity-vegan.pdf (checked 2026-10-29).
- vegan reference manual, function diversity. search.r-project.org/CRAN/refmans/vegan/html/diversity.html (checked 2026-10-29).
- Simpson, E. H. (1949). Measurement of diversity. Nature, 163, 688. https://doi.org/10.1038/163688a0
- Hurlbert, S. H. (1971) and Hill, M. O. (1973), as cited in the vegan documentation above (checked 2026-10-29).








