Species richness is simply the number of different species found in a given area or sample, and calculating it can be as straightforward as counting every species you see. The challenge is that this raw count almost always underestimates the true number of species present, because some organisms are rare, hard to spot, or active only at certain times. Moving beyond a bare count to a fuller picture of diversity means choosing among a family of indices and estimation techniques, each designed to capture a slightly different aspect of how species are distributed. The choice matters because two communities with the same species count can look and function very differently if one is dominated by a single species while the other spreads individuals evenly across many.
Species Richness Versus Species Diversity
People often use “richness” and “diversity” interchangeably, but ecologists treat them as related yet distinct concepts. Richness is the simplest possible measure: how many species are present. It tells you nothing about how many individuals belong to each species. Diversity indices fold in that extra information, typically weighting species by their relative abundance so that a community where every species is equally common scores differently from one where a single species makes up most of the individuals.
Even richness, though, is not entirely free from abundance effects. Because rare species are the hardest to detect, the number of species you record in a sample depends partly on how individuals are distributed among species. A site with many very rare species will appear less rich than it truly is unless you sample intensively enough to catch those rarities. As one conceptual review put it, there is no way to fully eliminate the effect of relative abundance from estimates of any diversity metric, including species richness itself.
The Two Most Common Diversity Indices
If you want a single number that blends richness with evenness, two indices dominate the literature: the Shannon index and the Simpson index. They ask slightly different questions about a community, and understanding the difference helps you pick the right one.
The Shannon index (often written H′) comes from information theory. It treats each species as a category and asks how uncertain you would be about the identity of a randomly chosen individual. A community with many equally abundant species creates high uncertainty, and thus a high Shannon value. In practice, the index rises with both more species and more even abundances. Research comparing the two indices in forest surveys found the Shannon index to be particularly useful for reflecting both richness and evenness together, while the Simpson index was more suited for characterizing dominance patterns in species diversity.1PubMed Central. Calculating forest species diversity with information-theory based indices using sentinel-2A sensor’s of Mahavir Swami Wildlife Sanctuary
The Simpson index approaches diversity from the opposite direction. It calculates the probability that two individuals drawn at random from a community belong to the same species. When one species dominates, that probability is high. The index is derived from the squared proportional abundances of each species, making it especially sensitive to common species and less affected by rare ones.2Heliyon. New indices regarding the dominance and diversity of communities, derived from sample variance and standard deviation People sometimes report the complement (1 minus Simpson) or the reciprocal (1/Simpson) so that higher values mean more diversity, which can cause confusion if you are comparing across studies. Always check which version an author used.
A related tool is Pielou’s evenness index, which divides the Shannon index by the natural logarithm of the species count. The result ranges from 0 to 1: a value near 1 means individuals are spread almost equally across species, while a value near 0 means one species overwhelms everything else.3Statology. How to Calculate Species Richness and Diversity Evenness and richness together give a much richer portrait of a community than either alone.
Hill Numbers and the Unifying Framework
One frustration with having multiple indices is that each uses different units and scales, making direct comparison awkward. Hill numbers solve this by expressing diversity as an “effective number of species,” meaning the number of equally common species that would produce the same index value. A community with a Hill number of 20 at a given order is as diverse as a perfectly even community of 20 species.
The beauty of Hill numbers is that they form a continuous family controlled by a single parameter, often called q. When q equals 0, the Hill number is just the raw species count (richness). When q equals 1, it converges on the exponential of the Shannon index. When q equals 2, it equals the reciprocal of the Simpson index. Higher values of q give increasing weight to dominant species and less weight to rare ones. This framework is increasingly used to quantify species diversity because it lets you slide smoothly between emphasizing rare species and emphasizing common ones, and every point along that continuum has the same intuitive unit: effective number of species.4Annual Review of Ecology, Evolution, and Systematics. Unifying Species Diversity, Phylogenetic Diversity, Functional Diversity, and Related Similarity and Differentiation Measures Through Hill Numbers The framework has also been extended to incorporate evolutionary relationships among species, combining the traditional species-neutral approach with phylogenetic branch lengths.5PubMed Central. Phylogenetic diversity measures based on Hill numbers
Why Raw Counts Are Almost Always Wrong
Walk through any habitat, count every species you encounter, and you will undercount. This is not a minor quibble: simulations and field studies consistently show that raw species counts are biased low, sometimes substantially.6PubMed. Evaluating species richness: Biased ecological inference results from spatial heterogeneity in detection probabilities The problem has two layers. First, rare species may simply not appear in your sample. Second, even species that are present can go undetected because of cryptic behavior, seasonal dormancy, or human error.
Field tests of plant censuses illustrate the scale of the problem. After a full hour of searching, single observers still missed roughly 20 to 30 percent of the species actually present. The proportion of missed species varied between observers, and the gap between observers actually grew with longer sampling times rather than shrinking.7Journal of Vegetation Science. Effects of sampling time, species richness and observer on the exhaustiveness of plant censuses That finding undercuts the intuition that simply spending more time in the field will close the gap. Replicated surveys and statistical correction are more reliable.
Detection probability also varies spatially. A species that is easy to spot in open grassland may be nearly invisible in dense forest. When detection probability changes across sites due to habitat features, any comparison of raw richness between those sites confounds real differences in biodiversity with differences in how easy it is to see things. Occupancy models that explicitly estimate detection probability for each species offer a way around this, producing less biased and more precise richness estimates than raw counts or simple correction formulas.6PubMed. Evaluating species richness: Biased ecological inference results from spatial heterogeneity in detection probabilities
Species Accumulation Curves and Rarefaction
One of the most intuitive tools for understanding sampling completeness is the species accumulation curve. Plot the number of new species found against sampling effort (number of individuals collected, number of traps checked, number of hours spent surveying), and you get a curve that rises steeply at first and gradually levels off. The shape tells you how close you are to catching everything: a curve still climbing steeply means many species remain undiscovered, while one approaching a flat asymptote suggests you have found most of what is there.8PubMed Central. Applications of species accumulation curves in large-scale biological data analysis
Accumulation curves also let you standardize comparisons. Suppose you sampled one meadow with 500 net sweeps and another with 200. Comparing raw species counts is unfair because the first meadow simply received more effort. Instead, you can use the accumulation curve to ask: how many species would each site have yielded at equal effort? This procedure, called rarefaction, randomly subsamples the larger dataset down to the size of the smaller one, repeated many times to produce an average. The result is a fair apples-to-apples comparison.
There are two flavors of rarefaction, and they do not always agree. Size-based rarefaction standardizes to the same number of individuals or samples. Coverage-based rarefaction standardizes to the same “sample coverage,” a measure of how completely your sample represents the underlying community. Research comparing the two approaches has found that they can yield different conclusions about richness changes between times or places, because they are quantifying different aspects of the same data.9PubMed Central. On species richness and rarefaction: size- and coverage-based techniques quantify different characteristics of richness change in biodiversity Coverage-based rarefaction is often preferred when communities differ strongly in total abundance, because it adjusts for how much of the community’s membership has been captured rather than just how many individuals were counted.
A practical limitation: using accumulation curves to predict total richness works best when the curve is already close to leveling off. For extremely diverse communities where the curve is still climbing at the end of sampling, the estimates become unreliable.10Journal of Applied Ecology. Species accumulation curves and the measure of sampling effort This is a common situation in tropical insect surveys and microbial communities.
Non-Parametric Estimators for Total Richness
When you suspect many species remain undetected, non-parametric estimators try to fill the gap. The two most widely used are the Chao1 estimator and the jackknife estimator.
Chao1 works by looking at how many species were found exactly once (singletons) and exactly twice (doubletons) in your sample. The logic is that a community with many singletons probably still has plenty of species you have not seen at all. The estimator takes the observed species count and adds a correction term based on the ratio of singletons to doubletons. Chao showed that this formula provides a lower bound on the true richness, meaning the real number of species is at least as high as the estimate, and often higher.11Briefings in Bioinformatics. A comprehensive review and evaluation of species richness estimation
The jackknife estimator takes a different approach. It works by systematically leaving out one sample unit at a time and recalculating richness, then using the variation in those leave-one-out estimates to correct for undersampling. The first-order jackknife depends on the number of species found in only one sample unit, while the second-order version also incorporates species found in exactly two units.12PubMed. Estimating species richness using the jackknife procedure Both Chao1 and jackknife estimators are simple to compute and require no assumptions about the shape of the species-abundance distribution, which is why they remain popular. However, simulation studies show that both can still be significantly biased when detection probabilities vary across species or sites, so they are best treated as useful approximations rather than ground truth.6PubMed. Evaluating species richness: Biased ecological inference results from spatial heterogeneity in detection probabilities
Alpha, Beta, and Gamma Diversity
So far we have been talking about diversity at a single site. But ecologists often want to compare diversity across a landscape, which brings in three spatial scales of measurement.
Alpha diversity is the diversity within a single site or community. It is what you calculate with any of the indices described above. Gamma diversity is the total diversity across an entire region, pooling all sites together. Beta diversity captures the difference in species composition between sites. Two forests may each have moderate alpha diversity, but if they share almost no species, the beta diversity between them is high, and the gamma diversity for the region is much greater than either site alone.
When alpha and beta are expressed as effective numbers of species using Hill numbers, they relate to gamma through simple multiplication: alpha times beta equals gamma. This multiplicative relationship holds for all Hill-number orders, making it straightforward to decompose regional diversity into its local and turnover components.13PubMed. Partitioning diversity into independent alpha and beta components
Beta diversity can be measured in several ways depending on the question. For presence-absence data, the Jaccard index compares the species lists between two sites. For abundance-weighted comparisons, the Bray-Curtis dissimilarity is widely used. In microbiome research, UniFrac metrics that incorporate phylogenetic distances between organisms have become standard.14PubMed Central. The Power of Microbiome Studies: Some Considerations on Which Alpha and Beta Metrics to Use and How to Report Results Each metric highlights different ecological patterns: a study of pika gut microbiomes, for instance, found that diet diversity correlated with beta diversity of gut bacteria but not with alpha diversity, suggesting that dietary variation reshapes community composition across individuals without necessarily changing the number of species within any one gut.15PubMed Central. Diet Diversity Is Associated with Beta but not Alpha Diversity of Pika Gut Microbiota
Phylogenetic and Functional Diversity
Counting species treats every species as interchangeable. A community of ten closely related warblers and a community of ten species spanning mammals, birds, reptiles, and amphibians would score identically on richness, but they clearly differ in the breadth of evolutionary history they represent. Phylogenetic diversity metrics address this by measuring the total branch length on a phylogenetic tree connecting the species in a community. Faith’s PD, the most widely used version, sums up those branch lengths: communities that span more of the tree of life score higher.16Methods in Ecology and Evolution. Rarefaction and extrapolation of phylogenetic diversity The concept has found applications well beyond traditional field ecology, including microbiome characterization, where computing PD efficiently for trees with millions of branches has required algorithmic advances.17PubMed Central. Efficient computation of Faith’s phylogenetic diversity with applications in characterizing microbiomes
Functional diversity takes a different angle entirely. Instead of asking how many species are present or how distantly related they are, it asks how many different ecological roles or traits they represent. A forest community might contain species with wildly different root depths, leaf sizes, seed dispersal strategies, and wood densities. Functional diversity indices try to capture that variation. The concept breaks into components mirroring those of species diversity: functional richness (the volume of trait space filled), functional evenness (how evenly species are spaced through that space), and functional divergence (how spread out species are from the center of their trait space).18Oikos. Functional richness, functional evenness and functional divergence: the primary components of functional diversity Recent work has proposed aggregating these facets into a single overall index by taking their geometric mean, combining functional richness, biomass evenness, trait evenness, and dispersion into one number.19Methods in Ecology and Evolution. Measuring overall functional diversity by aggregating its multiple facets
Microbial Diversity and Sequence-Based Approaches
Calculating diversity for microbes involves a fundamental twist: you rarely see the organisms at all. Instead, you extract DNA from a soil sample, a water bottle, or a stool specimen, sequence it, and cluster the resulting reads into groups that function as stand-ins for species. These groups, called operational taxonomic units (OTUs), are typically defined by a genetic distance threshold, often 97 percent sequence similarity for bacteria. Software tools automate this clustering and then compute rarefaction curves, richness estimators, and diversity indices directly from the sequence data.20PubMed Central. Introducing DOTUR, a computer program for defining operational taxonomic units and estimating species richness
A newer alternative to OTU clustering uses amplicon sequence variants (ASVs), which resolve sequences down to single-nucleotide differences rather than lumping them into similarity-based bins. Both methods produce richness and diversity estimates, but they do not always agree on the numbers. A study comparing ASV-based and OTU-based analyses of soil fungal communities found that while the two methods produced consistent patterns in richness (both identified the same sites as richer or poorer), the absolute richness estimates differed.21Environmental DNA. Consistent Species Richness Patterns but Not Richness Estimates Based on Both ASV and OTU Inference Methods on ITS2‐Based Soil Fungal Communities This means you can trust relative comparisons between samples processed the same way, but you should be cautious about comparing absolute numbers generated by different pipelines.
Environmental DNA (eDNA) metabarcoding has extended these approaches to macroscopic organisms as well. Rather than electrofishing a stream, you can filter water and sequence the DNA shed by fish passing through. Comparisons between eDNA and traditional surveys found that eDNA detected more species and higher functional richness in both wet and dry seasons.22PubMed Central. Comparison Between Environmental DNA Metabarcoding and Traditional Survey Method to Identify Community Composition and Assembly of Stream Fish The technique is especially powerful for picking up rare or elusive species that traditional methods miss, though it comes with its own biases: DNA degrades at different rates depending on temperature and water chemistry, and primer choice influences which taxa get amplified.
Software for Computing Diversity
You do not need to calculate any of these indices by hand. A wide ecosystem of software packages handles everything from basic richness counts to phylogenetic and functional diversity decompositions. In the R programming language, the package adiv provides methods for species-based, trait-based, and phylogenetic diversity at the alpha, beta, and gamma levels, complementing older packages like vegan and picante.23Methods in Ecology and Evolution. adiv: An r package to analyse biodiversity in ecology For microbiome-specific work, tools like QIIME 2 and mothur handle the full pipeline from raw sequences to diversity statistics. The choice of software matters less than understanding what each index measures, since getting the computation right but choosing the wrong index for your question will still lead to misleading conclusions.
How Diversity Metrics Guide Conservation Decisions
These calculations are far from academic exercises. Conservation planners use species richness alongside ecological condition indices to prioritize which watersheds to protect, restore, or monitor. A study designed for California watersheds demonstrated how combining richness data with habitat quality scores could guide landscape-scale management decisions, offering a model transferable to other regions.24PubMed. Leveraging species richness and ecological condition indices to guide systematic conservation planning Sites with high richness and poor condition become restoration priorities; sites with high richness and good condition become protection priorities.
In marine systems, researchers studying sub-Antarctic seafloor communities argued that alpha diversity alone is insufficient for designing marine protected areas. Beta and functional diversity indices revealed ecological connectivity between assemblages that species counts alone could not capture, suggesting that protected area boundaries need to account for turnover and trait variation, not just local richness.25Diversity. The Roles of Alpha, Beta, and Functional Diversity Indices in the Ecological Connectivity between Two Sub-Antarctic Macrobenthic Assemblages The same logic applies on land: mining companies assessing restoration success at degraded limestone quarries use diversity indices to track whether reclaimed land is approaching the species composition and functional structure of undisturbed reference sites.26International Journal of Bio-resource and Stress Management. Quantitative Assessment of Vegetation Dynamics through Species Composition and Diversity Indices in Restoring Nandini Limestone Mines, Chhattisgarh
Common Pitfalls When Comparing Diversity Across Studies
Perhaps the most frequent mistake in practice is comparing diversity numbers generated under different conditions. A Shannon index from a study that sampled 1,000 individuals is not comparable to one from a study that sampled 100, because both richness and evenness are sensitive to sample size. Rarefying to a common depth or coverage level before comparing is essential, yet many published studies skip this step.
A related problem is conflating different versions of the same index. The Simpson index can appear as the dominance form (probability of same-species match), its complement (probability of different-species match), or its reciprocal (effective number of equally common species). All three are called “Simpson’s diversity” in different papers. If you are pulling numbers from the literature to compare, verify the formula used.
Finally, choosing between richness and a weighted diversity index is itself a decision that shapes conclusions. A site undergoing ecological disturbance might lose rare specialist species while gaining abundant generalists, resulting in unchanged or even increased richness despite a functional decline. A Shannon or Simpson index would flag the shift in evenness that the raw count misses. Conversely, richness remains the better metric when the question is specifically about how many distinct lineages a habitat supports, regardless of their population sizes. The right metric depends on the ecological question, and reporting more than one is almost always better than relying on a single number.