Log vs Ln on a Calculator: Which Key to Use

calcsolver

On a scientific calculator, log is the base-10 logarithm and ln is the natural logarithm, which uses base e (about 2.718). Both ask the same question, “what exponent gives this number?”, but with a different base, so log(100) = 2 while ln(100) ≈ 4.605. Use log for powers of 10, ln for powers of e, and a change of base for anything else.

In this guide
  1. What Is the Difference Between Log and Ln?
  2. Which Key Should You Press?
  3. How Do You Find Log Base 2 or Any Other Base?
  4. Does Log Mean the Same Thing in Excel and Python?
  5. What Are the Most Common Mistakes?
  6. FAQ
  7. Sources
In short: Read the base in the problem, press the matching key, then check by raising the base to your answer. If the answer does not give back your original number, the wrong key was used.
Side-by-side comparison of log base 10, where log(1000) = 3, and ln base e, where ln(1000) is about 6.9078
Log and ln answer the same question with different bases.

What Is the Difference Between Log and Ln?

logln
Base10e ≈ 2.71828
NameCommon logarithmNatural logarithm
Meaning10ʸ = xeʸ = x
Examplelog(1000) = 3ln(1000) ≈ 6.9078
Undo with10ˣ keyeˣ key
Quick linkln(x) ≈ 2.3026 × log(x), because ln(10) ≈ 2.3026
Illustration of a scientific calculator keypad with the log key and its 10^x shift above it, and the ln key with e^x above it
Illustration: the log key and ln key, each with its inverse above it.

Which Key Should You Press?

Flowchart: base 10 means press log, base e means press ln, any other base means ln(x) divided by ln(b)
Let the base in the problem choose the key.
  • Base 10 problems: pH, decibels and earthquake magnitude all use log. A hydrogen concentration of 2.5 × 10⁻⁵ gives pH = −log(2.5 × 10⁻⁵) ≈ 4.60.
  • Base e problems: continuous growth and decay, such as A = A₀e^(kt), use ln. Doubling time is ln(2) ÷ k, so at k = 0.06 it is 0.6931 ÷ 0.06 ≈ 11.55 years. Turn a rate like 6% into 0.06 with the percentage calculator.
  • Other bases: use the change of base formula, shown next.

How Do You Find Log Base 2 or Any Other Base?

Use log_b(x) = ln(x) ÷ ln(b). You can use log instead of ln, as long as top and bottom use the same one. For log₂(32), enter ln(32) ÷ ln(2) = 3.4657 ÷ 0.6931 = 5. Check: 2⁵ = 32. Put brackets around the whole top and the whole bottom, or the calculator will divide only part of the expression. To solve for an unknown exponent directly, try the solve for x calculator.

Does Log Mean the Same Thing in Excel and Python?

No. This is where many mistakes happen, because the word “log” changes meaning between tools.

Toollog(x) meansFor the other base
Scientific calculatorBase 10ln key for base e
Excel LOG()Base 10 by defaultLN() for base e
Python math.log()Natural log (base e)math.log10()
JavaScript Math.log()Natural log (base e)Math.log10()
Stata log()Natural log (base e)log10()

Some advanced maths textbooks also write log when they mean ln. When the base is not stated, check the context. To test your own numbers, use the CalcSolver scientific calculator.

What Are the Most Common Mistakes?

  • Mixing up the keys. log(1000) = 3, but ln(1000) ≈ 6.9078.
  • Treating ln as 1 ÷ log. ln(10) ≈ 2.3026, while 1 ÷ log(10) = 1.
  • Taking the log of zero or a negative number. The calculator shows an error because no real answer exists.
  • Rounding too early. Keep all digits until the final step.

Two facts always work: log(1) = 0 and ln(1) = 0, because any valid base to the power 0 is 1. Also ln(e) = 1 and log(10) = 1. For more exponent and equation practice, browse the algebra tools.

FAQ

What is the difference between log and ln?

Log is the base-10 logarithm and ln is the natural logarithm with base e (about 2.718). For the same input they give different answers: log(100) = 2 but ln(100) ≈ 4.605.

Is log base 10 or base e on a calculator?

On scientific calculators the log key is base 10 and the ln key is base e. In Python, JavaScript and Stata, log() is the natural log instead.

How do I find log base 2 on a calculator?

Use the change of base formula: log₂(x) = ln(x) ÷ ln(2). For example, ln(8) ÷ ln(2) = 3.

Why do I get an error for log(0) or ln(−5)?

Real logarithms only exist for positive inputs. Zero and negative numbers have no real logarithm, so the calculator shows an error.

Want to practise? Try the examples above in the CalcSolver calculator and check each answer by raising the base to it. Preparing for an exam? Read how to study for a math test, or speed up your arithmetic with these mental math tricks.

Sources

Check your working in seconds

Type any problem from this guide into the free CalcSolver calculator and see the answer, with fractions, instantly.