Shannon Entropy Calculator
Measure information uncertainty in bits from event probabilities or character frequencies in a message.
About Shannon entropy
Shannon entropy examples
Compare balanced and uneven probability distributions.
| Distribution | Entropy | Interpretation |
|---|---|---|
| 0.5, 0.5 | 1 bit | A fair binary outcome has maximum uncertainty for two possibilities. |
| 0.25, 0.25, 0.25, 0.25 | 2 bits | Four equally likely outcomes require two bits on average. |
| 0.7, 0.2, 0.1 | 1.15678 bits | The dominant first outcome makes this distribution more predictable. |
How to use the Shannon entropy calculator
- Choose Probabilities to analyze a known distribution or Text message to derive character frequencies.
- Enter positive probabilities that total 1, or type the message you want to analyze.
- Select Calculate Entropy to apply the base-2 Shannon formula.
- Compare the entropy with the displayed maximum for the number of observed symbols.
Shannon entropy FAQ
What does Shannon entropy measure?
It measures the average uncertainty or information associated with an outcome. Higher entropy means the outcome is less predictable under the supplied distribution.
Why is entropy measured in bits?
This calculator uses logarithms with base 2, so its unit is the bit. Other logarithm bases produce units such as nats or hartleys.
Can Shannon entropy be zero?
Yes, entropy is zero when one outcome is certain. Observing a guaranteed outcome provides no new information.
When is entropy at its maximum?
For a fixed number of outcomes, entropy is highest when all outcomes are equally likely. The maximum is log base 2 of the number of outcomes.
Does high text entropy mean encryption is secure?
No, character entropy is only one descriptive statistic. Secure encryption requires sound algorithms, keys, randomness, and analysis beyond a frequency calculation.