Log vs ln: which logarithm should you use

Last reviewed on 30 April 2026.

Two logarithm keys sit next to each other on the SCI panel: log and ln. They look almost identical and they almost mean the same thing, which is exactly why people pick the wrong one. This page explains what each key computes, when each is the natural choice, and how to convert from one base to another in a single step.

What a logarithm answers

A logarithm answers a question about an exponent: "what power do I raise the base to in order to get this number?". log₁₀(1000) equals 3 because 10³ is 1000. log₂(8) equals 3 because 2³ is 8. The same idea works for any positive base other than 1.

If exponentiation undoes a logarithm, a logarithm undoes exponentiation. They are inverse operations, and most of the work you do with logarithms is some flavour of "solve for the exponent".

What the two keys compute

If your textbook simply writes "log" with no base, look at the context. Calculus and pure mathematics: ln. Chemistry, decibels, magnitude scales: base 10. Computer science: base 2 is common, written log₂ or lg.

When base 10 is the natural choice

Base-10 logarithms shine when the underlying scale is decimal. A few cases where you almost always want log:

When natural log is the natural choice

Natural logarithms come up wherever continuous growth or continuous decay is involved, because the exponential function e^x has the special property that its rate of change is itself.

The change-of-base formula

If you only have log and ln on the calculator but you need a logarithm in some other base — say base 2 or base 7 — use the change-of-base identity:

log_b(x) = log(x) / log(b)
log_b(x) = ln(x) / ln(b)

Both forms are correct; pick whichever key is closer. To compute log₂(64), type log(64) / log(2) and the calculator returns 6. To compute log₇(343), type ln(343) / ln(7) and you get 3. The same trick lets you reproduce one logarithm key from the other: log(x) = ln(x) / ln(10).

Worked example: continuously compounded interest

Suppose a deposit of 1,000 grows to 1,500 at a continuously compounded interest rate. How long does that take if the rate is 4% per year? The model is 1500 = 1000 × e^(0.04 × t). Divide both sides by 1,000, then take ln:

ln(1.5) = 0.04 × t
t = ln(1.5) / 0.04

Type ln(1.5) / 0.04 into the calculator and the result is about 10.13 years. Trying to solve the same problem with log works only if you also divide by log(e), which is roughly 0.4343 — easy to forget. This is the kind of problem where ln is unambiguously the right key.

Worked example: pH

A solution has a hydrogen ion activity of 4 × 10⁻⁹ mol/L. The pH is −log(4 × 10⁻⁹). Type -log(4 * 10^-9) and you get about 8.40. Using ln instead would give the wrong magnitude entirely, because the chemistry definition is locked to base 10.

Worked example: digits in a big number

How many digits does 2¹⁰⁰ have? Type log(2^100) and you get about 30.103. The integer part plus one is the digit count: 31 digits. The same calculation with ln would give a different number that needs a conversion factor, so log is the cleaner choice here.

Common mistakes

Decision checklist