Boneyard Tools

Logarithm Calculator

Enter a value and a base to compute its logarithm using the change-of-base rule. The natural log (ln), base-10 log and base-2 log of the value are shown alongside for quick reference.

How to calculate a logarithm

  1. Enter the value you want the logarithm of (it must be greater than 0).
  2. Enter the base (greater than 0 and not equal to 1).
  3. Read log to your base, plus ln, log base 10 and log base 2.

Examples

Log base 2 of 8

value = 8, base = 2
3

Log base 10 of 1000

value = 1000, base = 10
3

Frequently asked questions

What is a logarithm?

A logarithm answers the question: to what power must the base be raised to get the value? So log base 2 of 8 is 3 because 2 to the power 3 is 8. It is the inverse operation of raising a base to a power.

What is the change-of-base formula?

To find a logarithm to any base, divide two natural or base-10 logs: log base b of x equals ln(x) divided by ln(b). This tool uses that rule, which is why it can handle any positive base, not just 2, e or 10.

What is the difference between ln, log and lg?

ln is the natural logarithm with base e (about 2.718). In many contexts log written without a base means base 10, and lg is sometimes used for base 2 in computer science. This tool shows ln, log base 10 and log base 2 together so there is no ambiguity.

Why must the value be greater than zero?

Logarithms are only defined for positive numbers because no real power of a positive base produces zero or a negative result. Entering zero or a negative value is therefore rejected rather than returning a misleading answer.

Why can the base not be 1?

A base of 1 raised to any power is always 1, so it can never equal any other value. That makes log base 1 undefined, which is why the base must be greater than zero and different from 1.

Related tools