ConvertThemAll

Logarithm calculator

Find the power a base must be raised to in order to give your number.

Formula Maths

Logarithm

Logarithm: 3

Natural log (ln x)
≈ 2.0794
Common log (log₁₀ x)
≈ 0.90309

How it works

The logarithm of x in base b is the exponent y for which bʸ = x. So log₁₀ 1000 = 3 because 10³ = 1000.

Any base can be worked out from natural logarithms with the change-of-base rule. When the answer is a whole number, the calculator checks it exactly so that log₂ 8 shows 3, not 2.9999999.

Formula

log_b(x) = y ⇔ bʸ = x
log_b(x) = ln x ÷ ln b
ln x = log_e(x), e ≈ 2.718281828

Worked example

log₂ 8 = 3, because 2³ = 8. For the same number, ln 8 ≈ 2.079441542 and log₁₀ 8 ≈ 0.903089987.

Questions people ask

What is the difference between log and ln?

On most calculators log means base 10 and ln means base e, the natural logarithm. In some maths and programming texts log means ln.

Why can’t I take the log of zero or a negative number?

No power of a positive base gives zero or a negative number, so the logarithm is undefined there for real numbers.

How do I undo a logarithm?

Raise the base to the result: if log₁₀ x = 2.5, then x = 10^2.5 ≈ 316.2.