UnitConv

Logarithm Calculator (log)

Instantly compute logₐ(x) from a value and base. Also shows natural log (ln), common log (log₁₀) and binary log (log₂), with a function graph.

log10(1000)
Result
3
Result
3
Natural log (ln)
6.90775527898
Common log (log₁₀)
3
Binary log (log₂)
9.96578428466

Logarithm function graph

Calculation steps

log_10(1000) = ln(1000) / ln(10)
= 6.90775527898 / 2.30258509299 = 3

Formula

log_b(x) = ln(x) / ln(b)
ln(x) = log_e(x), log(x) = log₁₀(x)
log_b(x) = y ⇔ bʸ = x

The logarithm logₐ(x) answers "to what power must the base a be raised to get x?" Change of base uses the ratio of natural logs.

What is a logarithm?

The logarithm logₐ(x) is the exponent that answers "to what power must the base a be raised to get x?" It is the inverse of exponentiation — for example log₂(8) = 3 because 2³ = 8. Logs turn multiplication into addition and help handle quantities that span many orders of magnitude.

How to use

Enter the positive number you want the log of in "Value" and the positive base (other than 1) in "Base". Alongside the result, the calculator also shows the natural log (ln), common log (log₁₀) and binary log (log₂).

Formula

Change of base: logₐ(x) = ln(x) / ln(a). ln(x) = logₑ(x) is the natural log and log(x) = log₁₀(x) is the common log. By definition, logₐ(x) = y ⇔ aʸ = x.

Reading the result

The result tells you what power the base a must be raised to in order to reach the value x. Each time it increases by 1, the value multiplies by the base. If the value is ≤ 0, or the base is ≤ 0 or equal to 1, the logarithm is undefined and you get an error.

Frequently asked questions

What is the difference between ln and log?

ln is the natural log with base e (≈2.718); log usually means the common log with base 10. This calculator shows both at once.

How do I choose the base?

It depends on the use case: base 2 in information theory and computing, base 10 in many sciences, and base e (natural log) in calculus and analysis.

Can the value be negative or zero?

No. The real logarithm is only defined for a positive value (x > 0), so entering 0 or a negative number returns an error.

What is the change-of-base formula?

logₐ(x) = ln(x) / ln(a). As long as you can compute a natural (or common) log, you can find the log to any base.

What are logarithms used for?

They are used for pH, decibels, earthquake magnitude, compound-interest time calculations and many other quantities that vary over a wide range.

This calculator is a general-purpose tool for learning and quick checks.