Log Calculator

Calculate logarithms in any base (log₁₀, ln, log₂ or your own), and antilogs. The picture shows what a logarithm counts: how many times you multiply by the base to get from 1 to your number. Drag the number or click any value to type it.

Answer

log base 2 of 32

5

Check2^5 = 32
ln x3.4657359
log₁₀ x1.50514998
log₂ x5

Counting multiplications

0.52^-112^022^142^282^3162^4322^5642^6start at 1base 2x = 32log = 5Replay ↻

Each arc is one multiplication by 2, starting from 1. The number of arcs to reach x is the logarithm; a partial arc means a fractional answer, and arcs to the left (dividing) mean a negative one. Drag the red handle or click base, x or log to type.

Why this answer

  1. Definition. log_b(x) = y means b^y = x: 2^5 = 32.
  2. Change of base. log_b(x) = ln x ÷ ln b = 3.465736 ÷ 0.693147 = 5. Any base can be computed with ln or log₁₀.
  3. Rules. log(xy) = log x + log y, log(x/y) = log x − log y, log(xⁿ) = n log x: multiplying turns into adding.

Why it works

What does a logarithm count?

0.52^-112^022^142^2start at 1log = 0.00014426Replay ↻

Step 1 of 3

Count the doublings

Start at 1 and keep doubling: 2, 4, 8… How many doublings until you reach 32?

Make a prediction, then watch the hops.

Put it to use

Where logs show up

Earthquake magnitudes, decibels and pH are logarithmic: each step up is a multiplication (an M6 quake shakes 10 times as much as an M5). Logs also answer “how long until money doubles?” (log(2) ÷ log(1 + r)) and “how many bits for N values?” (log₂ N). See the Exponent Calculator for the reverse direction.

How it works

The log calculator computes logarithms in any base, including the common log (base 10), the natural log (base e) and the binary log (base 2), and antilogs (the base raised to a power).

log_b(x) = y means b^y = x: the logarithm is the exponent, or how many times you multiply by the base to get from 1 to x. Numbers between 0 and 1 have negative logs; the log of 1 is 0; there is no real log of 0 or negative numbers.

Any base can be computed from natural logs with the change-of-base formula: log_b(x) = ln x / ln b.

log_b(x) = y ⇔ b^y = xlog_b(x) = ln x ÷ ln blog(xy) = log x + log ylog(xⁿ) = n · log x

Worked example: log₂ 32 and log₁₀ 0.01

  1. 2⁵ = 32, so log₂ 32 = 5.
  2. 10⁻² = 0.01, so log₁₀ 0.01 = −2.
  3. ln 10 = 2.302585.
  4. Change of base: log₂ 10 = ln 10 / ln 2 = 3.3219.

Common mistakes

  • Taking the log of 0 or a negative number.
  • Assuming log(x + y) = log x + log y.
  • Mixing up ln (base e) and log (base 10).
  • Forgetting that log of a number below 1 is negative.

Frequently asked questions

What is a logarithm?

The exponent you need: log₁₀ 1000 = 3 because 10³ = 1000.

What is the difference between log and ln?

log usually means base 10; ln is the natural log, base e ≈ 2.71828.

How do you calculate a log in a different base?

Use change of base: log_b(x) = ln x ÷ ln b (or log x ÷ log b).

What is an antilog?

The inverse of a log: the antilog of y in base b is b^y. The antilog of 3 (base 10) is 1000.

Why is log of 1 equal to 0?

Because any base to the power 0 is 1: you don't multiply at all.