Shannon Entropy Calculator
Paste any text string to instantly compute its Shannon entropy in bits, with a full symbol frequency and self-information table.
Input
Enter one probability per line (e.g. 0.5) or symbol: probability pairs. Values are auto-normalized to sum to 1.
Entropy Result
Enter text or probabilities on the left to compute entropy.
Shannon Entropy
—
bits / symbol
Max Entropy
—
bits / symbol
Efficiency
—
% of max
Symbols:
—
Length:
—
Total bits:
—
0 bits
max — bits
Symbol Frequency Table
Results appear here.
| Symbol | Count | Probability | Self-info (bits) | Contribution |
|---|
Copied!
Summary
Paste any text string to instantly compute its Shannon entropy in bits, with a full symbol frequency and self-information table.
How it works
- Enter a text string in the input field, or switch to manual probability mode.
- The tool counts each unique character and calculates its frequency.
- Each symbol's probability p is used to compute self-information: -log2(p) bits.
- Shannon entropy H is the probability-weighted average: H = -sum(p * log2(p)).
- Results update in real time as you type, showing the full frequency table.
Use cases
- Estimate the compressibility of a string before applying compression.
- Verify the randomness quality of generated passwords or tokens.
- Analyze character distribution in dataset fields or log entries.
- Learn information theory by experimenting with different inputs.
- Check if a ciphertext has near-maximum entropy (8 bits/byte for good encryption).
- Compare entropy across different natural languages or encodings.
Frequently Asked Questions
Related tools
Last updated: 2026-05-23 ·
Reviewed by Nham Vu