Shannon Diversity Index Calculator
The Shannon diversity index calculator is a tool which helps you to estimate the diversity of species within a community. Knowing what the Shannon diversity index is can provide ecologists with useful information about a given habitat.
Read on to learn what the Shannon–Wiener diversity index is, what it can tell you, and how to use the Shannon diversity index formula.
What is the Shannon diversity index?
The Shannon diversity index (a.k.a. the Shannon–Wiener diversity index) is a popular metric used in ecology. It's based on Claude Shannon's formula for entropy and estimates species diversity. The index takes into account the number of species living in a habitat (richness) and their relative abundance (evenness).
How to use the Shannon diversity index calculator?
To get the ShannonWiener diversity index for your data set, input the number of individuals in each species into the calculator. You can enter up to 40 samples.
At the bottom, you'll see the results  Shannon diversity index, evenness, richness, the total number of individuals, and average population size. The default results are rounded to three significant figures. You can change the rounding in the advanced mode
of the Shannon diversity index calculator.
Another thing you can set up in the advanced mode
is the base of the logarithm used in a formula for the Shannon index. By default, the calculator uses the natural logarithm.
Shannon diversity index formula
What is the Shannon diversity index mathematically? Have a look at the equation:
H = ∑[(p_{i}) * log(p_{i})]
,
where:

H
 Shannon diversity index; 
p_{i}
 Proportion of individuals of ith species in a whole community:p_{i} = n / N
, where:n
 individuals of a given type/species; andN
 total number of individuals in a community,

∑
 Sum symbol; and 
log
 Usually the natural logarithm, but the base of the logarithm is arbitrary (10 and 2 based logarithms are also used).
How to calculate the Shannon diversity index?
Use the Shannon diversity index formula:
H = ∑[(p_{i}) × ln(p_{i})]

Calculate the proportion (p_{i}) of each species  divide the number of individuals in a species by the total number of individuals in the community.

For each species, multiply the proportion by the logarithm of the proportion.

Sum all the numbers from step 2.

Multiply the sum by 1.
Example of how to calculate Shannon diversity index
Imagine we need to assess the species diversity in a part of a rain forest. We know that 5 scarlet macaws, 13 blue morpho butterflies, 2 capybaras, 5 threetoed sloths, and 1 jaguar live in the region we are interested in.
Species  Number of individuals (n)  Proportion p_{i} = n / N  ln(p_{i})  P_{i} * ln(p_{i}) 

Scarlet Macaw  
Blue Morpho Butterfly  
Capybara  
ThreeToed Sloth  
Jaguar 
To calculate diversity, we will use the Shannon diversity index formula:
H = ∑[(p_{i}) * ln(p_{i})]

First of all, we need the total number of individuals:
N = 5 + 12 + 2 + 5 + 1 = 25
. 
For each species, calculate its proportion in the whole community (third column of the table).

Multiply ln(p_{i}) by p_{i} and round the answer to three decimal places (fourth column).

Sum all the results from the final column according to the ShannonWiener diversity index equation. Since we were going to multiply them by 1, we can do it straight away and ignore the minus signs:
H = 0.322 + 0.352 + 0.202 + 0.322 + 0.129 = 1.327

Here's our rounded ShannonWiener diversity index:
H ≈ 1.3
.
Shannon diversity index's range of values
The minimum value the Shannon diversity index can take is 0. Such a number would tell us that there's no diversity  only one species is found in that habitat.
There's no upper limit to the index. The maximum value occurs when all species have the same number of individuals. It equals log(k)
, where k
is the number of species.
To give you some perspective on the Shannon diversity index's range of values (using the natural logarithm as the base): for 100 species, the maximum possible value would be 4.605
, for 1,000 species: 6.908
, for 10,000 species: 9.21
, for 1,000,000 species: 13.816
. For all eukaryotic species discovered on Earth, the maximum possible would equal log(8,700,000) = 15.98
.
In realworld ecological data, the Shannon diversity index's range of values is usually 1.5  3.5.
FAQ
What does the Shannon diversity index tell you?
The Shannon diversity index tells you how diverse the species in a given community are. It rises with the number of species and the evenness of their abundance.
How to interpret the Shannon diversity index?
The higher the index, the more diverse the species are in the habitat. If the index equals 0, only one species is present in the community.
It may be easier to interpret the result if you calculate the evenness: E = H / ln(k)
, where k
is the number of species. Evenness gives you a value between 0 and 1 (so you can think of it as a percentage). Remember: the lower the evenness, the higher the diversity.
Can Shannon diversity index be over 1?
Yes, Shannon diversity index can go over 1. For example, the index for a community of 6 species with 100 individuals each equals around 1.79. The Shannon index shouldn't be confused with evenness, another commonly used metric in ecology, which takes values between 0 and 1.