Home · Statistics · Descriptive Statistics · Shannon Entropy Calculator

Shannon Entropy Calculator

Shannon entropy of a probability distribution, in bits: the average information carried by one draw.

Your figures

Example result — edit the figures to make it yours

1.8464

Outcomes4
Maximum possible (log2 k)2

What this calculator does

Shannon entropy of a probability distribution, in bits: the average information carried by one draw. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

H = −Σ pᵢ log₂ pᵢ

Probabilities must sum to 1; terms with p = 0 contribute nothing.

The logarithm is base 2, so the result is in bits; the maximum for k equally likely outcomes is log₂(k).

Worked example

With the example inputs this page opens with, the result is 1.8464. Change any figure and the result updates with the same formula.

Quick reference

Quick reference — the worked example in full
FigureValue
Result1.8464
Outcomes4
Maximum possible (log2 k)2

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

What does an entropy of about 1.85 bits mean here?

One draw from this four-outcome distribution carries about 1.85 bits of information — close to the 2-bit maximum for four equally likely outcomes.

When is entropy zero?

When one outcome has probability 1: the draw is completely predictable, so it carries no information.

How does the Shannon Entropy Calculator work?

Shannon entropy of a probability distribution, in bits: the average information carried by one draw. Probabilities → H = −Σ p·log₂(p) (bits). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Shannon Entropy Calculator need?

Probabilities → H = −Σ p·log₂(p) (bits). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.