Skip to main content
1+1
EN
All calculators

Categories

Logarithm calculator

Result

Fill in the fields to see your result.

How it works

log_b(x) = y is just another way of writing b^y = x — a logarithm is the inverse of exponentiation. Solving for x uses that definition directly; solving for y (the usual meaning of "taking a log") uses the change-of-base formula, since calculators and most math libraries only compute natural log directly; solving for the base rearranges the same relationship as a root.

Natural log (base e ≈ 2.71828) is common enough in calculus and science that it gets its own toggle instead of typing "2.71828" as the base.

Formulas used

Definition

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

Change of base

log_b(x) = ln(x) ÷ ln(b)

Worked examples

Solving for y (base 10)

log₁₀(100) = 2, since 10² = 100.

Solving for x (natural log)

If ln(x) = 2, then x = e² ≈ 7.389056.

Assumptions and limits

  • All logarithms are evaluated over the real numbers.
  • The base must be positive and not equal to 1.

Frequently asked questions

Why can't the base be 1?

1 raised to any power is always 1, so log base 1 could never uniquely determine y — the equation would have no solution or infinitely many, depending on x.

Why must x be positive?

No real power of a positive base ever produces a negative number or zero, so log_b(x) is undefined for x ≤ 0 when working with real numbers.

What is the difference between log and ln?

"log" (without a specified base) commonly means base 10 in everyday use, while "ln" always means natural log, base e — this calculator lets you pick either.

Why does solving for the base use a root instead of a logarithm?

Because b^y = x rearranged for b is b = x^(1/y) — a straightforward root, so no logarithm is actually needed for that direction.

Updated