Algebra & Functions

Logarithm Calculator

Enter x and a base (leave blank for base 10, or type e). The calculator uses the change-of-base formula and proves the answer by raising the base to it.

A number above 0 (not 1), blank for 10, or e
Try an example:
Answerlog_10(1000) = 3
  • Natural log ln(1000) = 6.907755
  • Log base 10 = 3
Step-by-step working 3 steps
  1. 1
    Meaning
    log_10(1000) = y  means  10^y = 1000

    A logarithm answers: “what power of the base gives x?”

  2. 2
    Change of base
    y = ln(1000) / ln(10) = 6.90775528 / 2.30258509 = 3
  3. 3
    Check
    10^3 ≈ 1000

    The result is a whole number, so x is an exact power of the base.

How to use the logarithm calculator

  1. Enter x.
  2. Enter the base, or leave it blank for 10.
  3. Read the logarithm.
  4. Check the raised-base line to verify.

Logarithm rules

log_b(x) = y  ⇔  bʸ = x
log_b(x) = ln x / ln b
log(xy) = log x + log y
log(x/y) = log x − log y
log(xʸ) = y · log x

Logarithms are defined only for x > 0 and bases > 0, base ≠ 1.

Worked examples

Each example below is generated by the same calculator you used above, so the working always matches the answer.

log₁₀(1000)
Answerlog_10(1000) = 3
  • Natural log ln(1000) = 6.907755
  • Log base 10 = 3
Step-by-step working 3 steps
  1. 1
    Meaning
    log_10(1000) = y  means  10^y = 1000

    A logarithm answers: “what power of the base gives x?”

  2. 2
    Change of base
    y = ln(1000) / ln(10) = 6.90775528 / 2.30258509 = 3
  3. 3
    Check
    10^3 ≈ 1000

    The result is a whole number, so x is an exact power of the base.

log₂(8)
Answerlog_2(8) = 3
  • Natural log ln(8) = 2.079442
  • Log base 10 = 0.90309
Step-by-step working 3 steps
  1. 1
    Meaning
    log_2(8) = y  means  2^y = 8

    A logarithm answers: “what power of the base gives x?”

  2. 2
    Change of base
    y = ln(8) / ln(2) = 2.07944154 / 0.69314718 = 3
  3. 3
    Check
    2^3 ≈ 8

    The result is a whole number, so x is an exact power of the base.

ln(20)
Answerlog_e(20) = 2.99573227
  • Natural log ln(20) = 2.995732
  • Log base 10 = 1.30103
Step-by-step working 3 steps
  1. 1
    Meaning
    log_e(20) = y  means  e^y = 20

    A logarithm answers: “what power of the base gives x?”

  2. 2
    Change of base
    y = ln(20) / ln(e) = 2.99573227 / 1 = 2.99573227
  3. 3
    Check
    e^2.99573227 ≈ 20

    Raising the base to the answer returns x (to rounding).

log₅(30)
Answerlog_5(30) = 2.11328275
  • Natural log ln(30) = 3.401197
  • Log base 10 = 1.477121
Step-by-step working 3 steps
  1. 1
    Meaning
    log_5(30) = y  means  5^y = 30

    A logarithm answers: “what power of the base gives x?”

  2. 2
    Change of base
    y = ln(30) / ln(5) = 3.40119738 / 1.60943791 = 2.11328275
  3. 3
    Check
    5^2.11328275 ≈ 30

    Raising the base to the answer returns x (to rounding).

Common mistakes to avoid

Taking the log of zero or a negative

No real power of a positive base gives 0 or a negative number.

Assuming log(x + y) = log x + log y

The product rule splits multiplication, not addition.

Mixing up log and ln

log usually means base 10 on calculators; ln is base e.

Frequently asked questions

What is the difference between log and ln?

log is base 10 on most calculators; ln is the natural logarithm, base e ≈ 2.718.

Why does the base cannot equal 1?

1 raised to any power is 1, so it cannot reach other numbers.