Shannon entropy calculator
Paste a probability distribution and get its Shannon entropy H = −Σ p·log p in bits — the average information per outcome. It also shows the maximum possible entropy (a uniform distribution) and the redundancy, how far below that maximum you are.
Related tools
All Discrete maths & graphs tools →The Shannon entropy calculator turns Probabilities (sum to 1) into Entropy (bits), Maximum entropy (bits), Redundancy, instantly and for free. For instance, with Probabilities (sum to 1) = 0.25, 0.25, 0.25, 0.25 it returns Entropy (bits) = 2, Maximum entropy (bits) = 2 and Redundancy = 0%.
How to use it
- Enter your values: Probabilities (sum to 1).
- Read the result instantly: Entropy (bits), Maximum entropy (bits), Redundancy.
Frequently asked questions
How does the Shannon entropy calculator work?
It takes Probabilities (sum to 1) and derives Entropy (bits), Maximum entropy (bits) and Redundancy from them. The calculation is live as you type, so the result updates on every change.
Which values does the calculator ask for?
A single value: Probabilities (sum to 1). Nothing else is required — no account, no file upload.
What does a typical calculation look like?
With Probabilities (sum to 1) = 0.25, 0.25, 0.25, 0.25, the calculator returns Entropy (bits) = 2, Maximum entropy (bits) = 2 and Redundancy = 0%. Those figures come from running this exact tool, so you can reproduce them by entering the same values.
How much does the result change with different inputs?
It moves a lot. Using Probabilities (sum to 1) = 0.25, 0.26, 0.28, 0.29 instead, Entropy (bits) goes from 2 to 1.998 — which is why it is worth testing a few scenarios rather than trusting a single figure.
What does it give for smaller values?
Scaled down to Probabilities (sum to 1) = 0.25, 0.25, Entropy (bits) comes out at 1. The relationship is worth checking at both ends before you rely on a single result.
When would I actually use this?
Anything modelled as points and connections: a shortest route, a network's capacity, a schedule with dependencies, or a circuit reduced to its logic.
What is the most common mistake?
Assuming a shortest path stays shortest when a weight changes sign. Negative edges break the greedy argument Dijkstra rests on, and the algorithm returns a confident wrong answer rather than an error.
Where do the figures come from, and how current are they?
The algorithms are the textbook ones and their results are exact for the graph you enter. What varies is cost: several of these problems have no known efficient solution, so large inputs are answered by heuristic and the tool says when that is the case.