How this calculation works
Interpolate expected observed richness and its exact finite-population sampling variance under individual-based rarefaction.
E[S_m]=Σ_i{1−C(N−n_i,m)/C(N,m)}; covariance uses joint absence C(N−n_i−n_j,m)/C(N,m).A worked example
The default abundances 5,4,3,2,1 have 15 individuals and 5 observed categories. A five-individual subsample has expected richness≈3.4032634033 and variance≈0.4784042686.
Good to know
1–200 positive integer category abundances with total≤100000; subsample size 0–N. Without-replacement hypergeometric absence formulas with log-gamma arithmetic and covariance checks. Interpolation within observed individuals only; no unseen-species extrapolation, replacement sampling, confidence intervals or unknown detection correction.
Reference: vegan authors: rarefaction and expected species richness (opens in a new tab) ↗
Rarefaction asks a smaller-sample question
Observed richness tends to increase as more individuals are examined. Individual-based rarefaction asks how many of the observed categories would be expected in a random subsample containing a specified number of those individuals. It is an interpolation of an already observed finite population, not an estimate of all categories that could exist outside the sample.
That distinction separates this calculation from unseen-richness estimators such as Chao1. A category absent from the entered abundance table cannot appear in a rarefied subsample of that same table. The result helps compare sampling effort under a stated random-subset model, without claiming that the observed population represents every possible species.
Compare this with the Chao1 species richness and sample coverage calculator from abundance counts. Interpolate the expected richness after drawing fewer individuals without replacement from the observed sample; Chao1 estimates unseen richness beyond observed categories from singleton/doubleton frequencies.
Counts represent individuals, not presence records
Enter one positive integer abundance for each observed category. The total N is the sum of these counts, and observed richness is the number of entered categories. A count row is not a probability, a percentage or the number of sampling locations in which a species was present.
The subsample size m ranges from zero to N. Sampling is without replacement from the listed individuals, so an individual cannot be drawn twice. Incidence-based rarefaction across sampling units is a different design and should not be represented by relabeling site-presence counts as though they were individual abundances.
Calculate absence before adding presences
For a category with n_i individuals, the number of m-person subsets that miss it is the combination of N minus n_i choose m. Dividing by the total number of subsets gives its absence probability. One minus that value is the probability the category is represented, even if several of its individuals are drawn.
Expected richness is the sum of these representation probabilities. It does not require independent category presences, because expectation is additive. Large combinatorial values are evaluated through stable log-gamma differences rather than forming factorials directly, with impossible absence combinations treated as probability zero under the finite-population model.
Variance must include shared sampling
Presence indicators for different categories are dependent because they share a fixed-size subsample. Adding only their individual Bernoulli variances would ignore that competition for sampled positions. The covariance term uses the probability that both categories are absent, obtained by removing both abundance counts before forming the combination ratio.
The resulting variance describes variation among equally likely without-replacement subsets of the entered population. It is not uncertainty about the abundance population itself and is not automatically a confidence interval for underlying ecological richness. Numerical cancellation near deterministic endpoints is checked rather than treating every tiny negative rounded variance as a real possibility.
Work through five categories and fifteen individuals
The example abundances are five, four, three, two and one. They total fifteen individuals in five categories. A random subsample of five individuals can represent different numbers of categories depending on which individuals are chosen, so its richness is not simply five times five divided by fifteen.
Summing the five hypergeometric representation probabilities gives expected richness approximately 3.4032634033. Including all pairwise covariance terms gives variance approximately 0.4784042686. Exhaustively listing all five-individual subsets in this small example provides an independent check, because each subset is equally likely under the specified model.
Read the interpolation curve carefully
The curve shows expected richness over a bounded set of subsample sizes between zero and the observed total. It must begin at zero and finish at the observed category count. With positive category counts, the expected richness cannot decrease when another individual is added to a without-replacement subsample.
The curve is conditional on the observed abundance composition. Two populations with the same total and observed richness can have different curves if one has more rare categories. Equalizing sample size can help describe that difference, but does not adjust for unequal detection, nonrandom sampling or habitats whose composition changes with the survey design.
Boundary checks and excluded extrapolation
At m equal to zero, every category is absent and richness is zero with zero variance. At m equal to N, all listed categories are present and variance is again zero. If all observations belong to one category, every nonempty subsample has richness one. These exact limits provide useful implementation checks.
No curve is extended beyond N, since doing so requires a different inference problem about unseen individuals or species. The page also does not sample with replacement, fit an abundance distribution or construct bootstrap intervals. Its expected value and variance answer the finite-subset question only, with the mathematical and numerical conventions reported alongside the results.
A few questions, answered
Can rarefaction predict unseen species?
No. It interpolates subsets of the entered observed abundance population and cannot introduce an unlisted category.
Is the reported variance a confidence interval?
No. It is sampling variance across finite without-replacement subsets, not a confidence interval for true ecological richness.
Can I use incidence across sampling sites?
Not with this individual-based formula. Incidence-based rarefaction needs a different sampling-unit model.
What happens at the full sample size?
Every entered category is present, so expected richness equals observed richness and variance is zero.