Productivity and Utilities

Shannon Entropy Calculator

Paste some text to measure the information in each character or byte.

Your numbers

Up to 1,000,000 characters. Nothing is uploaded.

Count

Result

Entropy

4.3855 bits per character

43 symbols, 27 different

Ideal size when compressed
23.6 bytes
Original size
43 bytes
Most information possible
4.7549 bits
Efficiency
92.2%

The 20 most common symbols

SymbolCountShareBits each
space818.60%2.426
o49.30%3.426
e36.98%3.841
h24.65%4.426
r24.65%4.426
t24.65%4.426
u24.65%4.426
a12.33%5.426
b12.33%5.426
c12.33%5.426
d12.33%5.426
f12.33%5.426
g12.33%5.426
i12.33%5.426
j12.33%5.426
k12.33%5.426
l12.33%5.426
m12.33%5.426
n12.33%5.426
p12.33%5.426
How this was calculated
  1. Share of each symbol p = its count / total symbols.
  2. Entropy H = - sum of p x log2(p), in bits per symbol.
  3. Ideal compressed size = H x number of symbols / 8 bytes, a lower limit for coding each symbol on its own.
  • This treats every symbol as independent. Real compressors also use patterns between symbols, so they can beat this figure on structured text.

Calculated using SumPanda.com · https://sumpanda.com/shannon-entropy-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the shannon entropy calculator

  1. Paste or type the text.
  2. Choose whether to count characters or UTF-8 bytes.
  3. Read the entropy in bits per symbol, the number of symbols and how many are different.
  4. Use the table to see how often each symbol appears and what it contributes.

Formula

p(s) = count of symbol s / total symbols

Entropy H = - sum over all symbols of p(s) x log base 2 of p(s)

Ideal size = H x number of symbols / 8 bytes

The result treats each symbol as independent. It measures the spread of symbol frequencies and nothing about order or meaning.

A pangram

In "the quick brown fox jumps over the lazy dog" there are 43 symbols and 27 different ones, since the spaces count as a symbol and several letters repeat. The entropy is 4.3855 bits per character. At that rate the text could ideally be stored in 23.6 bytes, compared with 43 bytes as plain text.

A string of one repeated letter has an entropy of 0, because it is fully predictable. The string abcdabcdabcdabcd has four equally common symbols, so its entropy is exactly 2 bits per character, the most that four symbols can have.

What entropy tells you

Entropy measures how surprising each symbol is on average. A text with a few very common symbols is more predictable and has lower entropy. A text where every symbol is equally likely has the highest entropy for its alphabet, which is the base 2 logarithm of the number of different symbols. The figure sets a lower limit on how far a simple code can compress the text if it uses symbol counts alone.

Real compressors do better by also using patterns such as repeated words, so the ideal size here is not a limit for them. It is a limit only for a code that treats each symbol on its own.

Cautions

Short texts give rough numbers because the counts are small. Entropy of a password string is not the same as its strength, since strength depends on how it was chosen, not on the letters it happens to contain. The Password Strength Checker looks at that question. See the Text Byte Size Calculator for the size of text in different encodings, the Word Frequency Counter for counts of words, and the LZW Compression Stepper to watch a real compression method work.

Assumptions and limits

  • Symbols are treated as independent, with probabilities taken from the text itself.
  • In byte mode the text is encoded as UTF-8 first, so accented letters count as two or more bytes.
  • The sample sentence is an example. Use your own text.
  • Everything is calculated in your browser and nothing is uploaded.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What is a bit per character?

It is the average number of yes or no answers needed to identify the next symbol, if you knew the symbol frequencies in advance.

Why is the ideal size smaller than the original?

Because common symbols could be given short codes. The figure assumes the best code that uses symbol frequencies alone.

Should I count characters or bytes?

Characters for text analysis. Bytes for files or data, where each byte value is a symbol and the maximum is 8 bits.

Does a higher number mean better randomness?

Only that symbols are spread more evenly. It does not prove the data is random or secure.