Log to the base 2 calculator

Type a log base 2. MathBuddy finds the power of 2 and shows how.

Loading math input...

What this page covers

  • Exact values when the number is a power of 2, including fractions such as 18\frac{1}{8}.
  • Decimal values for other numbers, using the change of base rule.
  • Equations with a log base 2, such as log⁡2(x+3)=5\log_2(x + 3) = 5.
  • Not covered here: the natural log or base 10 on their own (use the logarithm calculator), and complex logarithms of negative numbers.

How to enter the problem

  • Type it or paste it. Write log_2 followed by the number in brackets, for example log_2(1/32).
  • Scan it. Fit the one problem in the frame.
  • Choose a photo. Several problems in one photo are solved as a list.
  • Then tap Solve.

Worked examples

Example 1

Problem

Find log⁡218\displaystyle \log_2 \frac{1}{8}.

Answer

Verified

The answer is

−3-3

Explanation

  1. Ask the question as a power
    log⁡218\log_2 \frac{1}{8} is the power kk with 2k=182^k = \frac{1}{8}.
  2. Write the number as a power of 2
    18=123=2−3\frac{1}{8} = \frac{1}{2^3} = 2^{-3}
  3. Read off the power
    So k=−3k = -3.

Example 2

Problem

Find log⁡220\displaystyle \log_2 20 to 4 decimal places.

Answer

Verified

The answer is

≈4.3219\approx 4.3219

Explanation

  1. Notice it is not a whole power
    24=162^4 = 16 and 25=322^5 = 32, so the answer lies between 4 and 5.
  2. Use change of base
    log⁡220=ln⁡20ln⁡2\log_2 20 = \frac{\ln 20}{\ln 2}
  3. Evaluate
    2.995730.69315=4.32193…\frac{2.99573}{0.69315} = 4.32193\ldots, which rounds to 4.32194.3219.

Example 3

Problem

Solve log⁡2(x+3)=5\displaystyle \log_2(x + 3) = 5.

Answer

Verified

The answer is

x=29x = 29

Explanation

  1. Rewrite as a power
    x+3=25=32x + 3 = 2^5 = 32
  2. Solve for xx
    x=32−3=29x = 32 - 3 = 29
  3. Check the domain
    x+3=32x + 3 = 32 is positive, so the answer is allowed.

Common mistakes

  • Dividing instead of finding a power: log⁡264\log_2 64 is 66, not 64÷2=3264 \div 2 = 32.
  • Losing the minus sign for fractions. Numbers between 0 and 1 have a negative log, so log⁡218=−3\log_2 \frac{1}{8} = -3, not 33.
  • Turning change of base upside down: ln⁡2ln⁡20\frac{\ln 2}{\ln 20} is about 0.230.23, not log⁡220\log_2 20.

Checks, assumptions and limits

  • Check by hand: raise 2 to the answer. 2−5=1322^{-5} = \frac{1}{32}, so the example is right.
  • Log base 2 is defined only for positive numbers. Zero and negative inputs have no real answer.
  • MathBuddy can make mistakes. Double check important steps.

Frequently asked questions

It is the power you raise 2 to in order to get the number. For example, log base 2 of 8 is 3 because 2 cubed is 8.

Use change of base: divide ln of the number by ln 2, or log of the number by log 2. Both give the same result.

Yes. Numbers between 0 and 1 give negative answers, and numbers that are not powers of 2 give non-whole answers.

1 math question to try today without signing in, 3 a day signed in, unlimited with Pro.

Ready to solve your next math problem?

Try one problem free in your browser. Create a free account for 3 math questions a day.

Last updated: · MathBuddy