Toolstia / Logarithm calculator

Logarithm calculator

Enter a number and see its base-10 logarithm, its natural logarithm (ln) and its base-2 logarithm. Add your own base to get the logarithm in that base too, using the change of base formula.

The base-b logarithm of x is the power you raise b to in order to get x. For example log₁₀(1000) = 3 because 10³ = 1000.

How it works

  1. Enter a number greater than zero.
  2. Optionally enter another base.
  3. Read log₁₀, ln, log₂ and the custom-base result.

What a logarithm is

The logarithm of x to base b is the exponent you put on b to get x. Since 10³ = 1000, log₁₀(1000) = 3.

Common, natural and binary

log₁₀ is the common logarithm used in science and decibels. ln uses the constant e (about 2.71828) and appears in growth and decay. log₂ is used in computing and information theory.

Any base

The change of base formula log_b(x) = ln(x) ÷ ln(b) gives the logarithm in any valid base.

Domain

Logarithms are defined only for numbers greater than zero. A base must be greater than zero and not equal to 1.

Questions

What is the log of 1?

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

Can I take the log of a negative number?

Not as a real number. The tool shows an error.

Is anything uploaded?

No. Your input stays in your browser and is never sent anywhere.