Statistics

Shannon Entropy Calculator

Find the Shannon entropy of a probability distribution.

Parameters Live Compute
Calculated Output
Entropy (bits) 2
Formula: H = −Σ pᵢ·log₂(pᵢ)
Step-by-Step Breakdown
1. Values used:
2. Probability 1 = 0.25
3. Probability 2 = 0.25
4. Probability 3 = 0.25
5. Probability 4 = 0.25
6.
7. Entropy = 2bits
Did this calculator solve your problem today?
Report issue to loopingon.com
Sponsored

Shannon entropy measures the average uncertainty (information) in a distribution.

The math behind it

H = −Σ pᵢ·log₂(pᵢ), in bits. It's maximized when all outcomes are equally likely.

Worked Example

Four equal probabilities (0.25 each) → 2 bits.

Frequently Asked Questions

Why log base 2?

It measures information in bits; natural log gives nats instead.

Advertisement