Logarithm Calculator

Work out log base 10, ln, log base 2 or a logarithm in any base — exactly when possible (log₄ 8 = 3/2), with the steps.

Must be greater than 0

Result

Enter values and press Calculate to see the result.

Formula

log⁡bx=y  ⟺  by=x\log_b x = y \iff b^{y} = x

A logarithm is the power you raise the base to.

log⁡bx=ln⁡xln⁡b\log_b x = \frac{\ln x}{\ln b}

The change-of-base formula works out any logarithm from natural logs.

How to use this calculator

  1. Enter x (greater than 0) and pick the base — or choose “Other base” and type it.
  2. Press Calculate. Exact answers are shown when the logarithm is a whole number or fraction.

Worked example

log base 2 of 8

log₂ 8 asks: 2 to what power gives 8?

2³ = 8, so log₂ 8 = 3.

Frequently asked questions

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

A positive base to any power is always positive, so no power gives 0 or a negative number.

What is ln?

ln is the natural logarithm: log base e, where e ≈ 2.718281828.