Logarithm Calculator

Enter a number and choose a base to get its logarithm.

Results

log₁₀(x)
3
ln(x)
6.9077553
log₂(x)
9.9657843

A logarithm is the inverse of a power: “10 to what power gives 1,000?” is answered by log₁₀(1,000) = 3. Earthquake magnitude, loudness in decibels and pH are all logarithmic scales.

Three bases are used most: 10 (the common logarithm), e ≈ 2.718 (the natural logarithm, ln) and 2 (in computer science). The calculator shows all three alongside the base you pick.

How to calculate Logarithms

  1. Enter a positive number.
  2. Choose the base, or enter your own.
  3. Read the result and the same logarithm in the other common bases.

Logarithms formula

  • log_b(x) = y ⇔ bʸ = x
  • Change of base: log_b(x) = ln(x) ÷ ln(b)
  • log(a × b) = log(a) + log(b)

Logarithms example

log₁₀(1,000) = 3 because 10³ = 1,000. The natural log of the same number is ln(1,000) = 6.9077553 and its base-2 log is 9.9657843.

Logarithms: common questions

Can you take the log of a negative number?

Not in the real numbers. Logarithms are defined only for positive numbers, and the log of zero does not exist either.

What is the difference between log and ln?

log usually means base 10 and ln means base e (about 2.718). ln(x) = 2.3026 × log₁₀(x).

Why can the base not be 1?

Every power of 1 is 1, so no other number can ever be reached; the logarithm is undefined.