Skip to content
Toolew.com

Logarithm Calculator

Calculate log base 10, natural log, log base 2 or any custom base, plus antilogs and the unknown base of a logarithm.

Runs in your browser. Your data is not uploaded.
Loading tool…

Tool guide

What this tool does

The Logarithm Calculator evaluates log_b(x) for common, natural, binary and custom bases and shows the change-of-base working. It can also reverse a logarithm (antilog) and solve for the base when you know x and the logarithm value.

A logarithm answers the question "to what power must the base be raised to give this number?". Because log₁₀(1000) = 3, logarithms turn multiplication into addition and compress huge ranges into small ones, which is why they appear in the decibel scale, pH, the Richter scale, compound growth and algorithm analysis. Different fields use different bases: 10 in science and engineering, e in calculus and finance, and 2 in computing.

This calculator computes any base through the change-of-base identity log_b(x) = ln(x) ÷ ln(b) and shows that working with your numbers. Exact powers are detected, so log₂(1024) returns exactly 10 instead of 9.999999999. Alongside the main result you also see ln, log₁₀ and log₂ of the same number and, for values of 1 or more, the characteristic and mantissa used with printed log tables.

How to use Logarithm Calculator

  1. Choose the Calculation: Logarithm, Antilog or Find the base.
  2. Select the base: 10, e, 2 or Custom base (then type the base, which must be positive and not 1).
  3. Enter the number x for a logarithm, or the logarithm value y for an antilog.
  4. Read the highlighted answer and the alternative bases shown beneath it.
  5. Use the change-of-base line to check the method or copy it into your working.

Tips for better results

  • The number of digits in a positive integer N is floor(log₁₀ N) + 1, so log₁₀ is a quick digit counter.
  • log₂(n) tells you how many times you can halve n, which is the number of steps in a binary search.
  • Doubling time at a growth rate r is ln 2 ÷ ln(1 + r); at 7% that is about 10.24 periods.
  • To find an unknown exponent in b^x = y, compute log_b(y).

Common use cases

  • Solving exponential equations in algebra and calculus homework.
  • Converting between decibels, pH or magnitude scales and the underlying ratios.
  • Estimating doubling or half-life times in finance, biology and physics.
  • Analysing algorithm complexity and bit lengths in computing.

Common mistakes to avoid

  • Taking the logarithm of zero or a negative number; it is undefined over the real numbers.
  • Confusing log (often base 10) with ln (base e); some programming languages use log for the natural log.
  • Assuming log(a + b) = log a + log b; the product rule is log(ab) = log a + log b.

Frequently asked questions

What is the change-of-base formula?

log_b(x) = ln(x) ÷ ln(b), or equivalently log₁₀(x) ÷ log₁₀(b). It lets you compute a logarithm in any base using a calculator that only has ln or log.

What is the difference between log and ln?

ln is the natural logarithm with base e ≈ 2.71828. In mathematics and on most calculators, log without a base means base 10, while in many programming languages log() means the natural log.

What is an antilog?

The antilog reverses a logarithm. If log₁₀(x) = 2.5, the antilog is 10^2.5 ≈ 316.23.

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

A positive base raised to any real power is always positive, so no real exponent can produce zero or a negative number. Complex logarithms exist but are outside this calculator.

Feedback & suggestions

Help us improve Logarithm Calculator. We read every message.

Rating (optional)
Necessary
Required for security, language and theme preferences. Always on.