Logarithm Calculator

Calculate the logarithm of any positive number with base 10, base e (natural log), base 2 or any custom base. Free, instant and private — all math happens in your browser.

log₁₀(x)
ln(x)
log₂(x)

How to use the Logarithm Calculator

  1. Enter the number. Type the positive value x you want the logarithm of — for example 1000.
  2. Pick the base. Choose base 10 (common log), e (natural log, ln), base 2 (binary log) or select Custom and type any positive base except 1.
  3. Read and copy the result. The answer updates instantly, together with log₁₀, ln and log₂ of the same number and a change-of-base breakdown for custom bases.

About this tool

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. This free online logarithm calculator handles the three bases used most often — base 10 for scientific notation, pH and decibels, base e for growth and decay problems in calculus, and base 2 for computer science and information theory — plus any custom base via the change-of-base formula log_b(x) = ln(x) ÷ ln(b). Results that land exactly on a whole number are shown exactly, and other values are given to 12 significant digits.

Everything is computed locally in your browser with double-precision math; nothing is uploaded or stored. It pairs naturally with our Exponent Calculator (the inverse operation) and the full Scientific Calculator when you need more functions in one place.

Frequently asked questions

Can I take the logarithm of zero or a negative number?

No. Logarithms are only defined for positive numbers: no real power of a positive base can produce 0 or a negative value. The calculator shows an error if you try, rather than returning a misleading answer.

What is the difference between log, ln and log₂?

“log” usually means base 10 (the common logarithm), “ln” is base e ≈ 2.71828 (the natural logarithm) and log₂ is base 2 (the binary logarithm). They only differ by a constant factor — that is exactly what the change-of-base formula expresses.

How do I calculate a log with a base my calculator doesn't have?

Use the change-of-base formula: log_b(x) = ln(x) ÷ ln(b), or equivalently log₁₀(x) ÷ log₁₀(b). This tool does it automatically for any custom base and even shows you the intermediate division.

Why is base 1 not allowed?

Because 1 raised to any power is always 1, the equation 1^y = x has no solution for any x other than 1 (and infinitely many for x = 1). Log base 1 is therefore undefined, just like on any scientific calculator.