Skip to content

Logarithm calculator

Calculate the logarithm of a number in any base, plus natural log (ln), log10 and log2.

log in base
3
ln (base e)6.907755
log₁₀3
log₂9.965784

The logarithm requires x > 0 and a positive base other than 1.

How the calculation works

A logarithm is the inverse of exponentiation. It answers: "to what exponent must I raise the base to get x?". If b^y = x, then log_b(x) = y.

To compute in any base, use change of base from the natural log (ln):

log_b(x) = ln(x) ÷ ln(b)

Step-by-step example

log₂(8) = ? Ask: 2 to what power is 8? 2³ = 8, so log₂(8) = 3.

Common bases

  • log (base 10): pH, decibels.
  • ln (base e ≈ 2.718): natural log, used in continuous interest and calculus.
  • log₂ (base 2): computing (bits, complexity).

Why logs turn multiplication into addition

A powerful property: log(a·b) = log(a) + log(b) — the basis of the old log tables.

Examples

  • log₁₀(1000) = 3, because 10³ = 1000.
  • log₂(1024) = 10, because 2¹⁰ = 1024.

Frequently asked questions

What is log base 10 of 1000?

3, because 10³ = 1000.

log vs ln?

log usually means base 10; ln is the natural log, base e (≈2.718). Same idea, different base.

Is there a log of a negative or zero?

Not in the real numbers: logs are only defined for positive values. log(0) tends to minus infinity.

Related calculators

More Math calculators

See all →

Updated on June 18, 2026 · by Rafael Rossi · Methodology & sources