Logarithm Calculator

Find a logarithm in any base, plus natural, base-10 and base-2 logs.

log₁₀(x)
Natural log (ln)
Base-10 (log₁₀)
Base-2 (log₂)
Check: bᵃⁿˢ

The number must be positive, and the base positive and not 1. Logs are undefined otherwise.

The inverse of exponents

A logarithm undoes a power. Where an exponent asks "what is the base raised to this power?", a log asks the reverse: "what power gives this number?" They are two views of the same relationship.

logᵦ(x) = y ⟺ bʸ = x · logᵦ(x) = ln(x) ÷ ln(b)

The change-of-base rule means any logarithm can be built from the natural log. The calculator shows your chosen base alongside the three most common ones — e, 10 and 2.

Worked example

log base 10 of 1000 is 3, because 10³ = 1000. The same number has a natural log (ln) of about 6.908 and a base-2 log of about 9.966.

Where logs appear

Logarithms tame quantities that span huge ranges. The Richter scale, decibels, pH and stellar magnitudes are all logarithmic, and in computing, base-2 logs count how many times a value can be halved — the heart of many efficient algorithms.

Worth remembering

  • log of 1 is 0. Any base to the power 0 is 1.
  • Logs turn × into +. log(ab) = log a + log b.
  • Base matters. ln, log₁₀ and log₂ differ by a constant factor.

Frequently asked questions

What is a logarithm?
It answers the question "what power do I raise the base to, to get this number?" So log base 2 of 8 is 3, because 2³ = 8.
What are ln, log and lg?
ln is the natural log (base e ≈ 2.718), "log" usually means base 10, and "lg" or log2 is base 2. The calculator shows all of them alongside your chosen base.
How is a log in any base found?
With the change-of-base rule: log base b of x equals ln(x) ÷ ln(b). That lets a single natural-log function compute logs in any base.
Why must the number be positive?
Logarithms are only defined for positive numbers, and the base must be positive and not equal to 1. Zero and negatives have no real logarithm.