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

Entropy Result

Enter text or probabilities on the left to compute entropy.

Symbol Frequency Table

Results appear here.
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

  1. Enter a text string in the input field, or switch to manual probability mode.
  2. The tool counts each unique character and calculates its frequency.
  3. Each symbol's probability p is used to compute self-information: -log2(p) bits.
  4. Shannon entropy H is the probability-weighted average: H = -sum(p * log2(p)).
  5. 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

Last updated: 2026-07-01 · Reviewed by Nham Vu