Ursa Eco-Tech

Diversity index calculator

Copy "species, count" or "zone, species, count" from Excel and paste it in to get Shannon-Wiener, evenness, Simpson and Margalef indices at once. H′ is given in three bases: ln, log₁₀ and log₂.

Input

One record per line. Two columns are "species, count"; three are "zone, species, count". Separate with tabs (Excel) or commas; repeated species within a zone are added up. For herbs, enter percentage cover.
Values are
The file is read in your browser and never uploaded. UTF-8 and Windows-1252 encodings are supported.

Everything is calculated in your browser. This page never sends the data you paste to any server, and it uses no cookies or tracking.

Formulas and symbols

Below, pᵢ = nᵢ / N, where nᵢ is the count (or cover) of species i, N is the total, and S is the number of species.

Shannon-Wiener diversity H′

H′ = −Σ pᵢ log pᵢ

The logarithm base changes the value of H′: with the natural log (ln) it is ln 10 ≈ 2.3026 times the log₁₀ value, and ln 2 ≈ 0.6931 times the log₂ value. Values in different bases cannot be compared directly, so a report must state which base it used.

Pielou evenness J′

J′ = H′ / log S

The numerator and denominator use the same base, so evenness does not depend on it. With a single species, J′ is defined as 0.

Simpson indices

λ = Σ pᵢ²  1 − λ  1 / λ

λ is dominance (the chance that two individuals drawn at random are the same species), 1 − λ is often called Simpson diversity, and 1 / λ is the inverse Simpson index, also Hill number N2. The literature does not agree on which of these "the Simpson index" means, so quote the formula. For whole counts the unbiased estimate λ̂ = Σ nᵢ(nᵢ − 1) / [N(N − 1)] is listed too.

Margalef richness

D = (S − 1) / ln N

Effective number of species, Hill N1

N1 = eH′(ln) = 10H′(log₁₀)

N1 is the number of equally common species that would give the same diversity. It does not depend on the base, which makes it good for comparing sites and years.

Frequently asked questions

Should a report use ln or log₁₀?

Use the base your guidelines or contract require, and state it in the report together with each index's name, formula and symbols. In Taiwan, EIA documents and monitoring reports use the natural logarithm from 1 December 2026. This calculator lists all three bases side by side, so old and new reports can be compared.

Can percentage cover be used instead of counts?

Yes. Herbaceous plants are often recorded as percentage cover and entered into the same formulas. Set "Values are" to cover: Margalef richness and the unbiased Simpson index need whole counts, so they show "—".

Is my data uploaded?

No. Every calculation runs in your browser, and the site's security policy stops the page from sending data to any other server.