Skip to content

Logarithm calculator

Calculate the logarithm of a positive number in any base, with one-tap buttons for base 10, base e (ln) and base 2, plus a check that raises the base to the answer.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Enter the number x (must be positive).
  2. Enter the base, or tap log, ln or log₂.
  3. Read the logarithm.
  4. Compare log, ln and log₂ in the table below.
Try it now

What a logarithm is

A logarithm answers the question: what power do I raise the base to in order to get this number?

log_b(x) = y means b^y = x

  • log₁₀(1,000) = 3, because 10³ = 1,000
  • log₂(1,024) = 10, because 2¹⁰ = 1,024
  • ln(e) = 1, because e¹ = e

The calculator handles any positive base except 1 and any positive number. It always shows a check line (the base raised to the result) along with the base-10, natural and base-2 logs of your number. Calculations run in your browser.

Common bases

NotationBaseWhere it is used
log or log₁₀10Decibels, pH, the Richter scale, orders of magnitude
lne ≈ 2.71828Calculus, continuous growth, physics, statistics
log₂2Computer science, bits, binary search, doubling

On most calculators and in this tool, log means base 10 and ln means base e. In some math and programming contexts, log without a base means ln, so check the convention you are working with.

Change of base formula

You can find a logarithm in any base using natural or common logs:

log_b(x) = ln(x) / ln(b) = log(x) / log(b)

Example: log₂(50) = ln(50) / ln(2) = 3.912 / 0.693 ≈ 5.6439. Check: 2^5.6439 ≈ 50.

Another: log₃(81) = 4, because 3⁴ = 81.

Logarithm rules

  • log(a × b) = log(a) + log(b)
  • log(a / b) = log(a) − log(b)
  • log(aⁿ) = n × log(a)
  • log_b(1) = 0 and log_b(b) = 1

These rules turn multiplication into addition, which is why slide rules and log tables were once the standard way to multiply large numbers. Logs of zero and negative numbers are undefined among real numbers, and the calculator tells you so.

Practical examples

  • Doubling time: money growing 7% a year doubles in ln(2) / ln(1.07) ≈ 10.24 years.
  • pH: a solution with a hydrogen ion concentration of 3.2 × 10⁻⁴ mol/L has pH = −log(3.2 × 10⁻⁴) ≈ 3.49.
  • Decibels: a sound with 1,000 times the power of another is 10 × log(1,000) = 30 dB louder.
  • Bits: to represent 1,000 different values you need log₂(1,000) ≈ 9.97, so 10 bits.
  • Solving exponential equations: 2^x = 50 gives x = log₂(50) ≈ 5.64.

For other functions in the same place, use the scientific calculator.

Common mistakes

  • log(a + b) is not log(a) + log(b). The sum rule applies to products, not sums.
  • Mixing up log and ln. log(100) = 2, but ln(100) ≈ 4.605.
  • Taking the log of zero or a negative number. It is undefined; check your inputs.
  • Base 1. 1 raised to any power is 1, so base 1 cannot work as a logarithm base.
  • Dropping the negative sign in pH. pH is the negative log, so a concentration of 10⁻⁷ gives pH 7, not −7.
  • Rounding intermediate logs. Keep several decimals; small rounding in a log becomes a large error after you raise the base back to it.

The calculator works entirely in your browser and shows a check line for every answer, so you can confirm the result before you copy it.

Frequently asked questions

What is the difference between log and ln?

log is base 10 and ln is base e (about 2.71828). log(100) = 2 and ln(100) ≈ 4.605.

How do I calculate log base 2?

Tap the log₂ button, or use the change of base formula: log₂(x) = ln(x) / ln(2).

Why can't I take the log of a negative number?

No real power of a positive base gives a negative number or zero, so the logarithm is undefined there.

What is log base 10 of 1,000?

3, because 10³ = 1,000.

How do logarithms solve exponential equations?

Take the log of both sides: if 2^x = 50, then x = log(50) / log(2) ≈ 5.64.

Last updated: November 12, 2026

Recommended

Similar tools

If Log calculator helped, you may need these too.

See all in category →

People also use