← All calculatorsMath

Logarithm Calculator

A logarithm answers the question 'what exponent produces this number?'. It compresses vast ranges into manageable scales, which is why sound, earthquakes, acidity and algorithm complexity are all expressed logarithmically.

Next steps

How to use the Logarithm Calculator

  1. Enter the number whose logarithm you need, it must be positive.
  2. Enter the base, or pick 10, e or 2.
  3. Read the result and the equivalent exponential statement.
  4. Use the change-of-base display to reproduce the result on any calculator.

How the calculation works

log_b(x) = y means b^y = x. Any base can be computed from any other by change of base: log_b(x) = ln(x) ÷ ln(b), which is how calculators offering only log₁₀ and ln handle base 2 or base 7. The domain is strictly positive: logs of zero and negative numbers are undefined over the reals, since no real exponent of a positive base produces them.

The three product rules do the heavy lifting: log(xy) = log x + log y, log(x/y) = log x − log y, and log(xⁿ) = n log x. They turn multiplication into addition, which is why logs powered slide rules and still underpin log-scale charts. Base choice is conventional by field. 10 for decibels and pH, e for growth and decay, 2 for information and algorithm complexity.

Formula
log_b(x) = ln(x) / ln(b) ; b^(log_b x) = x

Source: Standard logarithm identities and the change-of-base theorem.

Worked example

How many doublings take a population from 400 to 51,200?

  1. Growth factor = 51,200 / 400 = 128.
  2. Doublings = log₂(128).
  3. Change of base: ln(128) / ln(2) = 4.8520 / 0.6931.
  4. = 7.

Exactly 7 doublings, and 2⁷ = 128 confirms it.

Frequently asked questions

What is the difference between log and ln?+

log usually means base 10; ln is base e ≈ 2.71828, the natural base for continuous growth.

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

No real exponent of a positive base yields a negative result. Complex logarithms extend the definition, but not over the reals.

What is log₂ used for?+

Information theory and algorithm analysis, bits, entropy and binary search depth.

What does log(1) equal?+

Zero in every base, because any base raised to the power 0 is 1.

Last reviewed August 31, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.

Related

More in Math