🔢 Math & Science

Logarithm Calculator

Calculate the logarithm of a number in any base, plus the natural log (ln) and common log (log₁₀). Uses the change-of-base formula and shows the steps.

log10(1000)

3

change of base: ln(1000) ÷ ln(10) = 3

This means 1031000.

A logarithm answers: to what power must the base be raised to get the value? log₁₀ is the common log, ln is the natural log (base e ≈ 2.718). Logs in any base are computed with the change-of-base formula log_b(x) = ln(x) ÷ ln(b).

Frequently Asked Questions

What is a logarithm?

A logarithm answers the question: to what power must I raise the base to get this number? For example, log₁₀(1000) = 3 because 10³ = 1000. Logs are the inverse of exponentiation.

What is the difference between log and ln?

log usually means the common logarithm with base 10, while ln means the natural logarithm with base e (≈2.718). So log(100) = 2, but ln(100) ≈ 4.605. This calculator can compute either, plus a logarithm in any base you choose.

How do I calculate a logarithm in any base?

Use the change-of-base formula: log_b(x) = ln(x) ÷ ln(b) (or log(x) ÷ log(b)). For example, log₂(8) = ln(8) ÷ ln(2) = 3. Select 'log base n' above and enter your own base.

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

Logarithms are only defined for positive numbers. There's no real power you can raise a positive base to that gives zero or a negative result, so log(0) and log of a negative are undefined in the real numbers.

What is log base 2 used for?

Log base 2 (the binary logarithm) is common in computer science and information theory — it tells you how many times you can halve a number, or how many bits are needed to represent it. For example, log₂(1024) = 10.