Part of the Math & Statistics suite · 235 calculators

Entropy Calculator (Shannon)

How much information a probability distribution carries — Shannon entropy in bits, with the redundancy and the perplexity.

H = −Σ pᵢ log₂ pᵢ.

Comma-separated; normalized automatically
Results update as you type
Results
Entropy
1.742738
Maximum possible entropy
Efficiency (H ÷ max)
Redundancy
In nats
Perplexity (equivalent number of equal outcomes)
Outcomes
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows US usage (math, parentheses, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About entropy calculator (shannon)

How the entropy calculator (shannon) works

H = −Σ pᵢ log₂ pᵢ. Each outcome contributes its probability times its surprize, and the sum is the average number of bits needed to encode one draw.

Entropy is maximized when everything is equally likely — log₂ n bits — and falls to zero when one outcome is certain. It is the theoretical floor for lossless compression, which is why it also measures redundancy.

Formula: H = −Σ pᵢ log₂ pᵢ

Worked examples

InputsEntropyNote
Four unequal outcomes1.7427381.74 bits of a possible 2
A fair coin1exactly 1 bit
A certainty00 bits

Frequently asked questions

What is Shannon entropy?

The average information content of a draw from a distribution, measured in bits — equivalently, the minimum bits per symbol any lossless code can achieve.

Why is a fair coin exactly one bit?

Because two equally likely outcomes need exactly one binary digit to distinguish them. That is the definition of the bit.

What does zero entropy mean?

No uncertainty — the outcome is already known, so observing it tells you nothing.

What is perplexity?

2^H — the number of equally likely options that would carry the same uncertainty. Language models are scored on it.

How does this relate to compression?

Entropy is the hard floor. English text has an entropy of roughly 1 to 1.5 bits per character against the 8 bits of ASCII, which is why text compresses so well.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.