Free Logarithm Calculator (log, ln, any base)

Free logarithm calculator: find the log of any number in base 10, e, 2 or a custom base, solve for x or the base, with change-of-base steps and exact answers.

  • No upload, 100% private
  • Instant, in your browser
  • 100% free, no signup
Loading tool…
Read the complete guideHow Logarithms Work: log, ln, log₂ and the Change of Base Formula →

About the Logarithm Calculator tool

A logarithm answers the question “what power do I need?”. log₂(64) = 6 because 2⁶ = 64, and log₁₀(1000) = 3 because 10³ = 1000. Logarithms turn multiplication into addition, which is why they show up in the Richter and decibel scales, pH, compound-interest time calculations, algorithm complexity and data science. Most calculators only have ln and log₁₀ buttons, so a different base means using the change-of-base formula yourself.

This logarithm calculator does it for you. Choose base 10, base e (natural log), base 2 or any custom positive base other than 1, enter x, and get log_b(x) to 12 significant digits along with ln x, log₁₀ x and log₂ x. When the answer is an exact rational number — log₂ 8 = 3, log₄ 2 = 1/2, log₉ 27 = 3/2, log₁₀ 0.001 = −3 — it proves this with exact integer arithmetic and shows the fraction rather than a rounded decimal.

Two more modes cover the other ways the equation log_b(x) = y can be asked: “Solve for x” finds the antilogarithm x = b^y, and “Solve for base” finds b = x^(1/y). The steps panel shows the change-of-base formula with natural and common logs, and a check that raises the base back to the answer.

How to use Logarithm Calculator

  1. Pick a mode: “Find log”, “Solve for x” or “Solve for base”.
  2. Choose the base: “10 (log)”, “e (ln)”, “2” or “Custom”, and type the custom base if needed.
  3. Enter x (the number) and/or y (the logarithm), depending on the mode.
  4. Read the answer and the ln, log₁₀ and log₂ values in the result card.
  5. Open “Show steps” to see the change-of-base calculation and the check.

Features

Any base

Common log, natural log, binary log or any custom positive base except 1, including fractional bases like 1/2.

Exact answers when they exist

Rational results such as 3/2 are detected and proven exactly, not just rounded.

Antilog and base solving

Solve log_b(x) = y for x or for b, not only for the logarithm itself.

Change-of-base steps

Shows log_b(x) = ln x ÷ ln b and the equivalent with log₁₀, using your numbers.

Expressions accepted

Enter values like 2^10, sqrt(8) or 1/1024 directly.

When to use it

  • Find how many doublings (log₂) it takes to reach a number, e.g. bits needed to store it.
  • Solve exponential equations such as 3ˣ = 50 in algebra or pre-calculus.
  • Convert between pH or decibel values and the underlying quantities.
  • Work out how long an investment takes to grow by a factor using natural logs.

Frequently asked questions

What is the change of base formula?

log_b(x) = log_k(x) ÷ log_k(b) for any valid base k. Calculators usually use k = e or k = 10, so log₃(81) = ln 81 ÷ ln 3 = 4.

What is the difference between log and ln?

ln is the natural logarithm, base e ≈ 2.71828. “log” usually means base 10 in school and engineering, but in many programming languages and higher maths log means ln. This tool labels the base explicitly.

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

No real power of a positive base gives 0 or a negative number, so the logarithm is undefined there (as a real number).

Why can’t the base be 1?

1 raised to any power is 1, so log₁(x) would have no answer for x ≠ 1 and infinitely many for x = 1.

What is an antilog?

The inverse of a logarithm: if log_b(x) = y then x = b^y. For base 10, the antilog of 2 is 100. Use the “Solve for x” mode.

Related tools