← Biology

Ecology Evolution

Diversity index calculator (Shannon & Simpson)

Calculate diversity indices (Shannon, Simpson) from species or category counts. Shannon (ln/log2/log10) and Simpson (D, 1−D, 1/D) are shown together to avoid definition confusion.

All calculations run in your browser. Your data is not sent.

Other languages 日本語 | English | 简体中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

How to use (3 steps)

  1. Select an example or enter a count table (labels and counts).
  2. Adjust Shannon log base or display options if needed.
  3. Shannon, Simpson, and (optional) Hill numbers/evenness are shown.

Diversity indices depend on sampling and preprocessing (filtering, normalization, etc.). Interpret results together with conditions.

Input (count table)

Input mode

label count Actions
Paste (TSV/CSV)

Two columns: label, count (header optional).

Display options

Results (Shannon & Simpson)

N (total)
S (species/categories)
Shannon H
ln: —
Simpson
D: — / 1−D: — / 1/D: —
Hill numbers (q=0/1/2)
Evenness (Pielou J)

Relative abundance (p)

Shannon contribution (−p ln p)

Top categories

label count p

Outputs

How it’s calculated

When to use Shannon, Simpson, and Hill numbers

Use this page when you want one place to compare Shannon and Simpson without guessing which Simpson definition a paper used. It works for ecology datasets, classroom count tables, and any category-abundance list where you want richness and dominance summaries side by side.

Choose the sample layout first

Use single-sample mode when you are summarising one quadrat, trap, or classroom count table. Switch to multiple-sample mode when each column is a different site, treatment, or time point that should be compared with the same formula settings.

Read Shannon and Simpson together

Shannon is useful when you want sensitivity to rare categories, while Simpson is stronger when dominant categories drive the interpretation. Showing both helps you explain whether a change came from rare taxa, evenness, or one group taking over the dataset.

Next steps

FAQ

What is the difference between ln and log2 for Shannon?

Only the log base changes; rankings do not. Choose based on field conventions (default is ln).

Which one is the “Simpson index”?

Literature varies between D (Σp²), 1−D, and 1/D. This tool shows all three.

Is it okay to include zero counts?

Yes. They are treated as p=0 with zero contribution.

Can I compare samples?

Yes. Multi-sample (by columns) mode calculates indices for each column.

Are my inputs sent anywhere?

All calculations run in your browser. Your data is not sent.

Interpreting ecology and classroom datasets

Use the top-category table and the contribution chart together when you explain why two samples differ. A higher Shannon value can come from more evenness, while Simpson may still be dominated by one abundant category. That contrast is often exactly what a classroom discussion or ecology field note needs.

If your next question is about turnover between samples rather than within-sample diversity, move to beta diversity. If the next question is about stochastic change over generations, move to Wright-Fisher instead of forcing alpha-diversity indices to answer a population-drift problem.

Related tools

Comments (optional)

To reduce load, comments are fetched only when needed.