MyCalCute
Install
Calculators / Math / Binary Shannon entropy

Binary Shannon entropy calculator

Measure uncertainty in a two-outcome probability distribution; equal chances yield one bit, while a certain outcome yields zero bits.

On this page

Your result

Entropy1bits

Calculator controls

How to calculate

Measure uncertainty in a two-outcome probability distribution; equal chances yield one bit, while a certain outcome yields zero bits.

Entropy = -(p/100*ln(p/100+1e-300)+(1-p/100)*ln(1-p/100+1e-300))/ln(2) bits

Worked example

Probability of outcome A (%): 50.

Entropy: 1 bits.

Assumptions and limits

Measure uncertainty in a two-outcome probability distribution; equal chances yield one bit, while a certain outcome yields zero bits. Binary Shannon information entropy in bits. Complementary outcomes sum to 100%; deterministic outcomes have zero entropy.

Results are rounded for display; calculations use unrounded values. Read our calculation methodology.

Understanding the result

Measure uncertainty in a two-outcome probability distribution; equal chances yield one bit, while a certain outcome yields zero bits.

When this tool is useful

Entropy = -(p/100*ln(p/100+1e-300)+(1-p/100)*ln(1-p/100+1e-300))/ln(2) bits

Understanding your inputs

InputWhat to enter
Probability of outcome A (%)Enter a number of at least 0 and no more than 100.

Frequently asked questions

What assumptions does this calculation use?

Measure uncertainty in a two-outcome probability distribution; equal chances yield one bit, while a certain outcome yields zero bits. Binary Shannon information entropy in bits. Complementary outcomes sum to 100%; deterministic outcomes have zero entropy.

How is the result calculated?

Entropy = -(p/100*ln(p/100+1e-300)+(1-p/100)*ln(1-p/100+1e-300))/ln(2) bits