Shannon Entropy Calculator
Measure Shannon entropy in your browser: bits per character and the total for the pasted text. Empty scores zero, not an error.
What this shannon entropy calculator does
The page counts how often each character occurs and sums minus p times log base two of p over the whole text, printing bits per character and the total with the length beside them. A single repeated character reads zero, because nothing varies; hello world reads about two point eight four five four bits per character. Empty input scores zeros rather than refusing, because nothing pasted is a measurement, not a mistake.
How to use it
Shannon Entropy Calculator: paste the text into the box above, and press Run to get the entropy below.
Worked example
Input:
hello world
Output:
H = 2.8454 bits/char, total = 31.2989 bits (11 chars)
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns entropy; reloading the page discards both.
The page counts how often each character occurs and sums minus p times log base two of p over the whole text, printing bits per character and the total with the length beside them. A single repeated character reads zero, because nothing varies; hello world reads about two point eight four five four bits per character. Empty input scores zeros rather than refusing, because nothing pasted is a measurement, not a mistake.
Measure Shannon entropy in your browser: bits per character and the total for the pasted text. Empty scores zero, not an error.
How to use it
Shannon Entropy Calculator: paste the text into the box above, and press Run to get the entropy below.
Why it runs in your browser
The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns entropy; reloading the page discards both.
What to Expect
Best for
- Converting text to entropy when the data is already on screen.
What this tool keeps
- Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.
Sample input
hello world
Sample output
H = 2.8454 bits/char, total = 31.2989 bits (11 chars)
Frequently asked questions
How do I use the shannon entropy calculator?
Shannon Entropy Calculator: paste the text into the box above, and press Run to get the entropy below.
Is my input uploaded?
No. The text is parsed on this page with JavaScript and is never posted to a server.
Is there a size limit?
Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.