Formula: Shannon & Simpson Diversity Formula
- species1Count: Species1 Count (count)
- species2Count: Species2 Count (count)
- species3Count: Species3 Count (count)
- species4Count: Species4 Count (count)
Compute Shannon H′, Pielou evenness J′, Simpson’s Diversity (1−D), and Hill number exp(H′).
The calculator uses natural logarithms, and the unit of information for natural logs is the nat. Studies using base 2 report bits instead. Divide H′ by ln 2, about 0.693, to convert to bits, so the default 1.2353 nats becomes about 1.78 bits. Always compare H′ values calculated with the same log base.
You probably squared the proportions. That gives D = 0.325 and 1 − D = 0.675 for the default. The calculator uses n(n − 1) over N(N − 1), the without-replacement form for a finite sample, which gives 0.6818. The two converge as samples get larger. Both are standard, so state which one you report.
With the squared-proportions form the maximum for four equal species is 0.75. The without-replacement form used here can go a little higher in small samples. Four species with 25 individuals each give 0.758, because drawing one individual removes it from the pool and makes a second match slightly less likely. This is expected and shrinks as N grows.
It means every species in the sample has exactly the same count, so H′ equals ln S, its maximum. Four species of 25 each give J′ = 1 and an effective number of 4. The exception is a single-species sample, where the calculator also shows 1 even though evenness is undefined there; disregard J′ in that case.
Not necessarily. H′ rises with more species and a more even spread, but it does not know which species they are. A disturbed site invaded by several weedy species can score higher than an intact one dominated by a few native specialists. Use the indices to describe community structure, then interpret them with knowledge of the species involved.
Evenness is measured against the species still present. Setting the fourth count to zero leaves three species whose counts of 45, 30 and 15 are more balanced relative to ln 3 than the original four were relative to ln 4. J′ rises to 0.921 while H′ falls to 1.011. Diversity dropped; only the balance among survivors improved.
Whole-number percentages that add to 100 are accepted and give correct Shannon and evenness figures, because those use proportions only. Simpson's value then assumes a sample of 100 individuals, which may not be true. Fractions such as 0.45, or any decimal count, return an error asking for whole-number counts with at least 2 individuals in total.
The form only has four fields, so you would need to calculate by hand or in a spreadsheet. For each species, compute p as its count over N, then sum p times ln p and change the sign for H′. Divide by ln S for J′. For Simpson's, sum n(n − 1) and divide by N(N − 1). Do not merge species to fit the form.
Yes. Small samples tend to miss rare species, which lowers H′ and can inflate evenness. Proportional scaling alone does not change H′: multiplying every default count by ten keeps it at 1.235. What matters is whether larger effort finds additional species. Compare sites only when sampling effort is similar.
Report several, since each answers a different question. H′ and its effective number of species reflect richness and rare species. Simpson's diversity is driven by the dominant species. J′ isolates evenness. Including S and N lets readers judge sampling. For the default community that set is 4 species, 100 individuals, H′ 1.235, J′ 0.891 and Simpson's 0.682.
D is dominance, the chance two individuals belong to the same species, 0.3182 for the default. 1 − D, shown by the calculator as 0.682, is the chance they differ, so higher means more diverse. 1/D, about 3.14 here, is the Simpson effective number of species. All three carry the same information in different forms.
The default community has four species with counts of 45, 30, 15 and 10, so N is 100 and the proportions are simply 0.45, 0.30, 0.15 and 0.10. That makes it an easy sample to check with a pocket calculator.
For Shannon's index, multiply each proportion by its natural log and add the results. The four terms are about -0.359, -0.361, -0.285 and -0.230. Their sum is -1.235, and flipping the sign gives H′ = 1.235 nats, the headline figure. The interpretation line shows it to four places as 1.2353.
Pielou's evenness divides H′ by the largest value it could take with four species, which is ln 4, about 1.386. So J′ = 1.2353 ÷ 1.386 = 0.891. The effective number of species is e raised to H′, which comes to 3.44.
Simpson's figure is the one that surprises people, because doing it the textbook way with squared proportions does not match the screen. The next section explains why both numbers are right.
One habit helps with every check: keep four decimal places in the proportions and logs until the final step. Rounding each term to two places early can shift H′ in the third decimal, which is enough to make a hand result disagree with the calculator for no real reason.
The simplest form of Simpson's dominance squares each proportion and adds them. For the default that is 0.2025 + 0.09 + 0.0225 + 0.01 = 0.325, so 1 − D = 0.675. This is the probability that two individuals picked at random, with replacement, belong to different species.
The calculator uses the other common form, D = Σ n(n − 1) ÷ [N(N − 1)], which describes picking two individuals without replacement from the actual sample. The numerator multiplies each count by one less than itself, and the denominator is 100 × 99. That gives D = 0.3182 and a Simpson's diversity of 0.6818, shown as 0.682.
The difference comes from sample size, not from the shape of the community. Multiply every count by ten and the proportions do not change, so H′ stays at 1.235 and J′ at 0.891, but Simpson's diversity drops to 0.676, close to the Σp² value. With large samples the two forms converge. With small ones the without-replacement version is noticeably higher.
When you compare your figure with a paper or another tool, check which form they used. A gap in the third decimal place is almost always this, not an error.
Evenness asks how close the community is to every species being equally common. When all four species have 25 individuals, the calculator returns H′ = 1.386, exactly ln 4, so J′ is 1 and the effective number of species is 4. That is the ceiling for four species.
The default's 0.891 says the counts are fairly balanced, with one species ahead but none overwhelming. Push the community towards dominance and the numbers collapse. With counts of 97, 1, 1 and 1, H′ falls to 0.168, J′ to 0.121, Simpson's diversity to 0.059, and the effective number of species to 1.183. Four species are technically present, but the community behaves almost like a single one.
Note what J′ is relative to. It uses the number of species present in the sample, so it measures balance among the species you found, not completeness. A sample missing rare species can show high evenness simply because the rare ones were never counted.
Pielou's J′ is not the only evenness measure in use, and others built from Simpson's index or from Hill numbers can rank the same sites differently. If you compare your evenness with published values, confirm it is J′ = H′/ln S before reading anything into the gap.
Shannon's H′ is in nats, which is hard to picture. Raising e to the power H′ turns it into something intuitive: the number of equally common species that would give the same Shannon diversity. The default community, with four unequal species, is as diverse as a community of 3.44 perfectly equal ones.
This effective number, the Hill number of order one, has a property raw H′ lacks. If you combine two completely distinct communities of equal diversity, the effective number doubles. H′ itself does not double, which makes statements like "site A is twice as diverse as site B" misleading when made on H′ directly.
You can get a Simpson-based effective number too, though the calculator does not show it. Divide one by D. Using the calculator's D of 0.3182 gives about 3.14 species; using Σp² of 0.325 gives about 3.08. Both are lower than 3.44 because Simpson's measure gives more weight to the dominant species. Reporting the effective numbers side by side shows at a glance how much the common species drive the picture.
The presets change only the first species. Lowering it from 45 to 27 makes the community more balanced, since it now sits close to the second species at 30. H′ rises to 1.301, J′ to 0.939 and Simpson's diversity to 0.718, with N falling to 82. Raising it to 68 does the opposite: N becomes 123, H′ drops to 1.132, J′ to 0.817 and Simpson's diversity to 0.618.
Changing a rare species shows how the indices differ. Cut the fourth species from 10 to 1, keeping the others at the defaults, and H′ falls from 1.235 to 1.061 while Simpson's diversity moves only from 0.682 to 0.626. Shannon's index is more sensitive to rare species; Simpson's is driven mostly by the common ones.
Removing a species entirely can produce a result that looks backwards. Set the fourth count to zero and the calculator drops it, leaving three species. H′ falls to 1.011 and the effective number to 2.75, as you would expect, but J′ rises to 0.921. The remaining three species are more evenly matched with each other than the original four were, and J′ is now measured against ln 3 instead of ln 4.
Each field expects the number of individuals counted for that species. The Shannon and evenness figures depend only on proportions, but Simpson's without-replacement formula uses the actual counts, so the size of the numbers matters.
Proportions are not accepted. Entering 0.45, 0.30, 0.15 and 0.10 returns an error asking for whole-number counts of individuals, with at least 2 individuals in total. The same applies to decimal counts such as 4.5. If your data are already in proportions, go back to the raw tallies, because Simpson's figure cannot be computed honestly without them.
If you only have percentage cover or relative abundance, entering whole-number percentages such as 45, 30, 15 and 10 is accepted and treats the sample as 100 individuals. Shannon and evenness will be correct, because they depend only on proportions. Simpson's value, though, will carry a small-sample adjustment that does not reflect any real count, so label it clearly if you report it.
The form has room for four species. A real plot often holds many more, and the calculator cannot take them. For larger communities, use the formulas at the top of the page in a spreadsheet; the hand method in the first section works for any number of species.
Zero counts are removed before the calculation, so S is the number of non-zero fields. A single species with 50 individuals gives H′ of 0, Simpson's diversity of 0 and one effective species, which is correct. J′ shows 1 in that case, but evenness has no meaning with one species because ln 1 is zero; ignore that line.
Very small samples are unreliable. The form needs at least 2 individuals in total, but passing that minimum does not make a sample meaningful. With only a handful of individuals, Simpson's correction is large and Shannon's index is strongly biased downward, because rare species are unlikely to be caught at all.
Diversity indices are most useful as comparisons between sites or dates, and only when the samples were collected the same way. More sampling effort finds more rare species and raises H′, so a site surveyed for longer will tend to look more diverse. Match effort, area and method before comparing numbers, or standardise sample sizes first.
The calculator uses natural logs, so H′ is in nats. Some studies use base 2, giving bits, and some use base 10. To convert, divide H′ in nats by ln 2, about 0.693, for bits, or by ln 10, about 2.303, for base 10. The default 1.2353 nats is about 1.78 bits. Evenness and the effective number of species do not depend on the base, as long as you use the same base throughout.
When writing up, report S and N alongside H′, J′ and Simpson's diversity. A reader can then tell whether a difference between sites comes from more species, a more even spread, or simply a bigger sample.