Math

Log Base 2 Calculator

Calculate the base-2 logarithm of a number.


Log Base 2 Calculator

The base-2 logarithm, common in computer science for bits, binary search depth, and data-doubling problems.

How it works

The base-2 logarithm asks “2 raised to what power gives this number,” computed directly using the natural-log change-of-base relationship.

What this does not include

This does not include other logarithm bases — this calculator is specifically for base 2.

How to use this calculator

  1. Enter a positive number.

Frequently asked questions

Why is base 2 especially useful in computer science?

Binary computing is built on powers of 2, so log base 2 directly answers questions like “how many bits are needed to represent this many values” or “how many times can this be halved.”

What is log base 2 of a number less than 1?

It’s negative — for example, log base 2 of 0.5 is −1, since 2⁻¹ equals 0.5.

Is log base 2 of 1 always zero?

Yes — any number raised to the power of zero equals 1, which is why the logarithm of 1, in any base, is always zero.

Be the first to rate this

Written and checked by the Calculator Folks editorial team. How we write and review

Related calculators