Shannon Entropy Calculator

Find the Shannon entropy of a probability distribution.

Entropy (bits) 2

Formula: H = −Σ pᵢ·log₂(pᵢ)

Step-by-step with your numbers:
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 we solve your problem today?

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.

FAQ

Why log base 2?

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