Maths

Log Calculator

Find the logarithm of any number in any base, with ln, log₁₀ and log₂ alongside.

By Nitin Raturi · Last reviewed

Your logarithm

How to use the Log Calculator

Find the logarithm of a number in any base, with ln, log₁₀ and log₂ alongside.

  1. Enter the number.
  2. Enter the base, such as 10 or 2.
  3. Read the logarithm: the power the base must be raised to.

Good to know

  • A number between 0 and 1 has a negative logarithm when the base is above 1.
  • Check the answer: the base to the power of the answer gives the number back.

Find the power the base must be raised to.

Number

The number whose logarithm you want, x in log_b(x).

How to fill it in

  • Enter a number above 0. Decimals are fine.

Example

log₁₀ 1000 = 3, because 10³ = 1000.

Keep in mind: Logarithms of 0 and of negative numbers do not exist.

Base

The number raised to the power. Common choices are 10, 2 and e.

How to fill it in

  • Enter a number above 0, other than 1.
  • For the natural log (base e), read ln x beneath the answer.

Example

log₂ 1024 = 10 and log₅ 0.04 = −2.

log base 10 of 1,000

3

10 raised to the power 3 is 1,000.

Natural log (ln)
6.907755
Common log (log₁₀)
3
Binary log (log₂)
9.965784

log_b(x) = ln x ÷ ln b. Rounded to six decimals for display.

How this calculator works

  1. Step 1Power10³ = 1000Raise the base to a power to get a number.
  2. Step 2Logarithmlog₁₀ 1000 = 3Ask which power of the base gives the number.
  3. Step 3Any baseln x ÷ ln bThe change-of-base formula handles every other base.

A logarithm answers one question: to what power must the base be raised to give this number? So log₁₀ 1000 is 3.

The calculator divides natural logs to handle any base, and shows ln, log₁₀ and log₂ of the same number alongside.

Worked example: log base 3 of 50

Change of base with common logs
Change of base
log_b(x) = log₁₀ x ÷ log₁₀ b
  • xNumber 50
  • bBase 3
  1. log₁₀ 50common log of 501.69897
  2. log₁₀ 3common log of 30.477121
  3. log₃ 501.69897 ÷ 0.4771213.560877

Check it: 3 to the power 3.560877 is 50. Any base works the same way, using either common or natural logs.

Positive, zero and negative logs

  • Above 110log₂ 1024: 2¹⁰ = 1024.
  • Exactly 10Any base to the power 0 is 1.
  • Between 0 and 1−2log₅ 0.04: 5⁻² = 0.04.

Read the result

Logs count multiplications: log₁.₀₅ 2 = 14.206699, so about 14.2 steps of 5% double a value.

The answer is a power, not a number of the same kind as your input. Raising the base to that power gives your number back.

Assumptions and limits

  • Number above 0Logs of 0 and negatives do not exist.
  • Base not 1Every power of 1 is 1, so no answer fits.
  • Exact powersBases 10 and 2 give whole answers exactly.
  • DisplayRounded to six decimals.

A logarithm answers: to what power must the base be raised? Powers and roots are its partners.

To go the other way, use the exponent calculator. Logarithms also measure sound and acidity; see the decibel calculator and the pH calculator.

Common mistakes

  • Mistake: Writing log(a + b) = log a + log b.

    Instead: The product rule is log(ab) = log a + log b.

  • Mistake: Mixing up ln and log.

    Instead: ln is base e; log on most calculators is base 10.

  • Mistake: Taking the log of a negative number.

    Instead: Logs need a number above 0.

Checking the method

Every golden case is re-worked bit by bit, by repeated squaring, without any library logarithm.

An independent script finds each logarithm in 60-digit arithmetic and compares it with the calculator to 14 significant digits.

Read how we test our calculators, or browse more maths calculators.

Frequently asked questions

What is a logarithm?

The power a base must be raised to to give a number. log₁₀ 1000 = 3, because 10³ = 1000.

How do I find a log in any base?

Use change of base: log_b(x) = log x ÷ log b. For example, log₃ 50 = 3.560877.

What is the difference between ln and log?

ln is the natural log, base e (about 2.718). log usually means base 10; in computing it can mean base 2.

Can a logarithm be negative?

Yes, for a number between 0 and 1 when the base is above 1: log₅ 0.04 = −2.

Why is there no log of 0 or a negative number?

No power of a positive base gives 0 or a negative number. log₂ 1024 = 10 works because 1024 is positive.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 3 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.