Is log the same as ln? Log vs ln explained
Last reviewed on 2 October 2026.
Short answer: no. On a calculator, log means the base-10 logarithm and ln means the natural logarithm, base e ≈ 2.71828. They always differ by the same factor:
ln(x) = 2.302585 × log(x)
log(x) = 0.434294 × ln(x)
The one catch: in calculus, statistics, physics and most programming languages, a bare "log" is usually written to mean ln. So the keys are different, but the word "log" on its own depends on who wrote it.
Two logarithm keys sit next to each other on the SCI panel of the calculator: log and ln. They look almost identical and they behave almost identically, which is exactly why people pick the wrong one. This page explains what each key computes, how the two are related, which one your textbook or software means, and when each is the natural choice.
Log vs ln at a glance
log (common log) | ln (natural log) | |
|---|---|---|
| Base | 10 | e ≈ 2.718281828 |
| Also written | log₁₀, lg | logₑ, and often just "log" in maths, statistics and code |
| Question it answers | 10 to what power gives x? | e to what power gives x? |
| Undone by | 10ˣ | eˣ |
| Value at 10 | log(10) = 1 | ln(10) ≈ 2.302585 |
| Value at e | log(e) ≈ 0.434294 | ln(e) = 1 |
| Value at 1 | 0 | 0 |
| Derivative | 1 / (x · ln 10) | 1 / x |
| Typical uses | pH, decibels, earthquake magnitude, orders of magnitude | growth and decay, interest, calculus, statistics, machine learning |
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". log and ln are simply the two bases common enough to get their own keys.
How log and ln are related
Because every logarithm is a scaled copy of every other, ln and log are always in the same ratio: ln(x) is ln(10) ≈ 2.302585 times log(x), for every positive x. Some values side by side:
| x | log(x) | ln(x) | log₂(x) |
|---|---|---|---|
| 0.5 | −0.301030 | −0.693147 | −1 |
| 1 | 0 | 0 | 0 |
| 2 | 0.301030 | 0.693147 | 1 |
| e ≈ 2.718 | 0.434294 | 1 | 1.442695 |
| 10 | 1 | 2.302585 | 3.321928 |
| 100 | 2 | 4.605170 | 6.643856 |
| 1000 | 3 | 6.907755 | 9.965784 |
On a graph the two curves have the same shape. Both cross zero at x = 1, both are negative between 0 and 1, both grow without limit but ever more slowly, and neither is defined for zero or negative numbers. The ln curve is simply stretched vertically by a factor of 2.303.
That also answers a common side question: is ln(x) bigger than log(x)? For x greater than 1, yes — about 2.3 times bigger. For x between 0 and 1, both are negative and ln(x) is the more negative one. At x = 1 they are equal, both zero.
Which "log" does your book, field or software mean?
The keys on a calculator are unambiguous. The word "log" in a formula is not. This is the source of most "is log the same as ln" confusion:
| Where you see "log" | What it usually means |
|---|---|
| Calculator keys (this one, Casio, TI, phone calculators) | Base 10 — use ln for natural log |
| School algebra, chemistry, engineering, acoustics | Base 10 |
| University mathematics, calculus, physics | Natural log (ln) |
| Statistics, economics, finance, machine learning and AI | Natural log (log-likelihood, log returns, cross-entropy) |
| Computer science (algorithm analysis, information theory) | Often base 2 — written log₂ or lg |
Excel and Google Sheets LOG(x) | Base 10 (with an optional second argument for the base); LN(x) is natural log |
Python math.log, NumPy np.log, JavaScript Math.log, R log(), MATLAB log | Natural log — base 10 is log10 |
| ISO 80000-2 standard notation | ln = base e, lg = base 10, lb = base 2 |
Notation also varies by country. Textbooks in much of continental Europe, Russia and parts of Asia write lg for base 10 and keep log for a general base or for ln; English-language school books more often write log for base 10. If a formula comes from a source you do not know, a quick test is to check a known value: if the source treats log(100) as 2, it means base 10.
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:
- pH. The pH of a solution is
−log₁₀of the hydrogen ion activity. A pH of 4 means an activity of 10⁻⁴ moles per litre. - Decibels. Sound intensity in decibels is
10 × log₁₀(I / I₀). A 10 dB jump means ten times the intensity. - Earthquake magnitude. Each whole-number step on the moment magnitude scale corresponds to about 10 times the ground motion and roughly 31.6 times the energy.
- Counting digits. The number of digits in a positive integer N is
floor(log₁₀(N)) + 1. - Log-scale charts. Axes labelled 1, 10, 100, 1000 are base-10 logarithmic scales.
When natural log is the natural choice
Natural logarithms come up wherever continuous growth or continuous decay is involved, because the exponential function eˣ has the special property that its rate of change is itself.
- Compound interest, continuous case. Money growing at rate r compounded continuously turns into
P × e^(rt)after t years. To solve for time given a final amount, take ln of both sides. - Half-life and decay. A quantity that decays exponentially follows
N(t) = N₀ × e^(−kt). The half-life isln(2) / k, roughly 0.693 over the decay constant. - Calculus. The derivative of
ln(x)is1/xand the integral of1/xisln|x| + C. The derivative oflog₁₀(x)is1 / (x × ln(10))— clean only with the natural log. This is why calculus books write "log" and mean ln. - Statistics and economics. Log returns, log-linear regression, elasticities and log-likelihoods all use ln. A useful property: for small changes, the difference in ln is approximately the percentage change.
ln(1.05)≈ 0.0488, close to 5%;log(1.05)≈ 0.0212 has no such reading. - Machine learning and AI. Cross-entropy loss, log-probabilities and softmax are defined with natural logs. When a paper writes log without a base, assume ln.
- Information theory. Entropy measured with ln is in nats; with log₂ it is in bits. The factor between the two is
ln(2).
Is log base 2 the same as ln?
No. log₂ answers "2 to what power gives x?", ln answers "e to what power gives x?". Because 2 is smaller than e, log₂ grows faster: log₂(x) = ln(x) / ln(2) ≈ 1.4427 × ln(x). For example, log₂(8) = 3 but ln(8) ≈ 2.079. The calculator has no log₂ key; type ln(8) / ln(2) or log(8) / log(2) instead.
Solving exponential equations: does it matter which key you use?
Not for the final answer, as long as you use the same key on both sides. To solve 2ˣ = 50, take a logarithm of both sides and divide:
x = log(50) / log(2) = 5.643856…
x = ln(50) / ln(2) = 5.643856…
Both give the same result because the conversion factor cancels. The choice only matters when the base of the exponential is e — then ln undoes it in one step (ln(eˣ) = x) and log would leave a stray factor of 0.4343. The laws of logarithms — product, quotient and power rules — are identical for log, ln and every other base.
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 of 4% per year. How long does that take? 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.14 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 about 19.3 — wrong by a factor of 2.303, 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
- Mixing up the keys mid-problem. If a textbook formula looks like
−log(...)for pH or decibels, never substitute ln. They differ by a factor of about 2.303. - Copying a formula from code or a paper into a calculator.
np.log(x)or a "log" in a statistics paper is ln. Pressln, notlog. - Taking the log of zero or a negative number. Both keys return an error. If your problem is heading there, double-check the model — the input to a real logarithm must be strictly positive.
- Forgetting parentheses.
log10xlooks fine on paper but on the calculator you must typelog(10x)orlog(10) × x, depending on what you mean. The keys insertlog(orln(for you, which helps. - Assuming log(a + b) = log(a) + log(b). The product rule is
log(a × b) = log(a) + log(b). There is no simple rule for the log of a sum, in any base.
Decision checklist
- Is the formula about continuous growth, decay, calculus, statistics or machine learning? Use
ln. - Is the formula about pH, decibels, magnitudes, or digit counting? Use
log. - Solving
aˣ = bfor x? Either key works:log(b) / log(a). - Do you need a different base entirely? Apply the change-of-base formula.
- Is the input zero or negative? Stop and re-check the problem.
Frequently asked questions
Is ln the same as log?
No. On a calculator, log is base 10 and ln is base e. ln(x) is always about 2.302585 times log(x). In calculus, statistics and programming, though, "log" written on its own usually means ln.
Is log10 the same as ln?
No. log₁₀(10) = 1 but ln(10) ≈ 2.302585. log₁₀ is the log key; ln is the natural log key.
Why do we use ln instead of log in most of mathematics?
Because base e makes calculus clean. The derivative of eˣ is eˣ, and the derivative of ln(x) is 1/x, with no extra constant. Any other base drags a factor of ln(base) through every formula.
When someone in AI or machine learning writes log, do they mean ln?
Almost always, yes. Log-likelihoods, cross-entropy and log-probabilities use the natural log unless a base is stated. Information-theory work sometimes uses log₂ and says so.
Can ln be used for any log problem?
Yes, with the change-of-base formula: log_b(x) = ln(x) / ln(b). Any logarithm can be computed with ln alone, and the same is true of log.
What does lg mean?
In the ISO notation used in many European and Asian textbooks, lg is the base-10 logarithm — the same as the log key. In some computer-science texts lg means log₂, so check the context.
Do the laws of logarithms work the same for log and ln?
Yes. The product, quotient, power and change-of-base rules hold for every base, including 10 and e.