Skip to content

Advertisement
Advertisement unavailable offline
The page content remains available.

Entropy calculator

Paste nonnegative counts, weights or probabilities. The calculator normalizes them to sum to one.

Entropy H: —

Fill in the fields above — the result is computed on this page.

Categories
—
Positive categories
—
Weight total
—
Maximum entropy
—
Normalized entropy
—
Effective categories
—

Category contributions

Category Weight p −p log(p)
Fill in the fields above — the result is computed on this page.
What do these numbers mean?
  • Input values do not need to sum to one.
  • Zeros are allowed and contribute nothing to entropy.

Entropy describes category shares but ignores ordering and similarity between categories. Small-sample estimates can be biased.

How do I use this page?
  1. Paste weights for all categories.
  2. Choose the logarithm base.
  3. Read H, normalized entropy and each category contribution.

What this page does not do: Entropy describes category shares but ignores ordering and similarity between categories. Small-sample estimates can be biased.

Further reading

Theory — what does Shannon entropy measure?

Shannon entropy measures the uncertainty or diversity of a data distribution. It equals zero when all the mass falls on a single category and reaches its maximum when every share is equal. With a logarithm base of 2 the result is expressed in bits, and normalized entropy divides that value by the maximum possible for the given number of categories. You can paste either raw counts or ready-made probabilities into the calculator — it normalizes them to sum to one automatically.

Frequently asked questions

Can I enter counts instead of probabilities?
Yes. The calculator divides every value by the total of all positive weights.
When is entropy largest?
When all positive categories have equal probability.

See also

← All calculators

Advertisement
Advertisement unavailable offline
The page content remains available.
Offline app and draw notifications

My saved selections

Selections saved only in this browser. Numbers are shown exactly as saved; this is not a lottery ticket.

Open the My saved selections hub
Restore with preview

Restore in the hub: review the file and confirm first. Both old backups and the complete selections + journal backup are supported. Nothing is uploaded.