Free · Exponents and logarithms calculators 🇪

Binary Logarithm & Power of Two

Find log₂(x) for a positive number, or recover x from its base-two logarithm.

  • Formula & worked example
  • Private in your browser
  • No signup
Go to tool

Calculator inputs

Loading calculator…

How to use this calculator

  1. Enter the known values in the units shown. Results update as you type.
  2. Where results are editable, change one to solve backwards. Lock a value to hold it fixed.
  3. Use the worked example to check the method. Reset restores the starting fields.

Private by default

Inputs and results stay in this browser tab. Bookify does not upload or store the values you enter.

Formula and method

log₂(64) is 6 because 2⁶ = 64. log₂(0.125) is −3 because 2⁻³ = 0.125.

y = log₂(x) = ln(x)/ln(2); x = 2^y

Worked example

Enter these known values and leave the other values blank.

Positive number (x)
64
Base-two logarithm
6

Assumptions and limitations

  • The input number x must be positive. Zero and negative arguments have no real base-two logarithm.
  • A logarithm can be negative, zero or positive. A negative output does not imply an invalid input.
  • The base is fixed at 2. Fractional results are numerical approximations rather than integer bit counts rounded up or down.

Common questions

When is a binary logarithm an integer?

For x equal to 2 raised to an integer power. Examples include 8 = 2³, 1 = 2⁰ and 0.5 = 2⁻¹.

Does this calculate the number of storage bits automatically?

It returns the mathematical logarithm. A storage or information problem may require rounding and additional conventions, which are not applied here.

References

The calculation equations, inverse formulas, units, and input rules were imported from this source. Bookify provides the interface and equation solver.

Explore exponents and logarithms calculators 🇪 or browse all math calculators.