How to calculate
For every positive probability p, multiply p by its logarithm. Sum those terms and change the sign. Zero-count categories contribute zero.
Worked example
Use Symbol or category and count per line A, 10 / B, 10 · Logarithm base Base 2 (bits). The result is ≈ 1 bits.
Input and result notes
Enter numbers using the same units. Rounded results are marked with ≈.