Logarithm calculator

Enter a number and choose the base: 10 (log), e (ln), 2 or your own. You get the logarithm and how it is calculated.

Base

Fill in the fields; the answer appears here straight away.

How it works

  1. Enter the values

    Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.

  2. Instant answer

    The answer appears as you type, with the most important intermediate values.

  3. See the working

    Under "How it's worked out" you see the steps, handy for checking your own calculation.

What is a logarithm?

The logarithm answers the question "to what power do I raise the base to get this number?". log₁₀(1000) = 3 because 10³ = 1000, and log₂(8) = 3 because 2³ = 8. The natural logarithm ln uses the number e ≈ 2.71828.

Any base

With the change of base rule, logₐ(x) = ln(x) ÷ ln(a), you can use any base greater than 0 except 1. The number itself must be greater than 0; there is no logarithm of 0 or of a negative number.

Where you use it

The Richter scale, decibels and pH are logarithmic scales. Logarithms also tell you how long exponential growth takes, as in the doubling time of the exponential growth calculator.

Examples

Number Base Logarithm
1,000 10 3
8 2 3
1,024 2 10
0.01 10 −2
81 3 4
e e 1

The calculator also shows ln, log₁₀ and log₂ of the same number next to each other, so for 1,000 you see 6.9078, 3 and 9.9658 at once.

Three rules

  • log(a · b) = log(a) + log(b): multiplying becomes adding.
  • log(a ÷ b) = log(a) − log(b).
  • log(aⁿ) = n · log(a): a power becomes a multiplication.

Logarithmic scales

A sound that carries 100 times the power of another is 10 × log₁₀(100) = 20 decibels louder. A pH of 7 means a hydrogen concentration of 10⁻⁷, so pH = −log₁₀(10⁻⁷) = 7. On the Richter scale each whole step is a tenfold increase in measured amplitude. To go the other way, from a logarithm back to the number, use the exponent calculator.

Frequently asked questions

What is the difference between log and ln?

log means base 10 here and ln the natural logarithm with base e ≈ 2.71828. In many programming languages, log is the natural one, so check the base when you compare results.

How do I solve 2^x = 50?

Take the logarithm: x = log₂(50) = ln 50 ÷ ln 2 ≈ 5.644. Choose base 2, enter 50, and the calculator gives it.

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

Because no power of a positive base gives 0 or a negative number. The number must be greater than 0, and the base greater than 0 and not 1.

What does the check line show?

It raises the base to the answer and shows the number you started with, so 10^3 = 1,000 confirms log₁₀(1,000) = 3.