# Log Base 2 Calculator

URL: https://speedycalculator.com/calculators/math/log-2/
Last updated: 2026-10-30

> The log base 2 calculator finds log₂ x – how many times you must double 1 to reach x – and the number from a given log₂ value.

## Inputs

- Number x

## Results

- log₂ x
- Bits needed for whole numbers from 0 to x
- ln x

## Formula

```
log₂ x = ln x / ln 2,  2^(log₂ x) = x
```

## Explanation

Base-2 logarithms count doublings and halvings. They give the number of bits needed to store a number, the depth of a balanced binary tree, the number of steps of binary search, octaves in music and f-stops in photography.

### How to use the Log Base 2 Calculator

- **Number x**
- Every result field is editable: type into **log₂ x** and **Number x** plus every other field update to match.

Results update as you type, and everything is calculated in your browser.

### How it works

Enter x or type into the log₂ x field to go backwards.

### What each result means

- **log₂ x** = [ln x]([Number x])÷[ln x](2)
- **ln x** = [ln x]([Number x])

### Example values

How the main result changes when **Number x** changes and everything else stays at the example values above:

Number xlog₂ x51297689.5851,024101,28010.32191,53610.5852,04811

## Worked example

Inputs — Number x: 1,024.

Results — **log₂ x = 10**; Bits needed for whole numbers from 0 to x = 11; ln x = 6.931471805599.

## Key terms

- **Binary logarithm**: The logarithm to base 2.

## FAQ

**What is log₂ 1024?**
10.

**How many bits store the number 1000?**
10 bits (up to 1023).

**How many guesses does binary search need for 1,000,000 items?**
About log₂ 10⁶ ≈ 20.

**How many octaves between 55 Hz and 880 Hz?**
log₂ 16 = 4.


## Sources

- [OpenStax – College Algebra 2e](https://openstax.org/details/books/college-algebra-2e)
- [OpenStax – Precalculus 2e](https://openstax.org/details/books/precalculus-2e)
- [Wolfram MathWorld – Binary logarithm](https://mathworld.wolfram.com/BinaryLogarithm.html)
