Logarithm Calculator

Calculate logarithms with any valid base using this free logarithm calculator. Find log base b of x, common logarithms (base 10), natural logarithms (ln), and binary logarithms (base 2). View the result, change-of-base calculation, and an inverse check.

Calculate a Logarithm

To calculate logb(x), enter a positive argument x and choose the logarithm base.

The argument must be greater than zero.
Choose a standard base or enter your own.
The base must be positive and not equal to 1.
Reset

What Is a Logarithm?

A logarithm answers the question: “To what exponent must a base be raised to obtain a given number?” It is the inverse operation of exponentiation.

Definition: logb(x) = y if and only if by = x

For example, log2(8) = 3 because 23 = 8. The base is 2, the argument is 8, and the logarithm is 3.

Types of Logarithms

Common logarithm

log(x) = log10(x)

A common logarithm uses base 10. For example, log(1000) = 3 because 103 = 1000.

Natural logarithm

ln(x) = loge(x)

The natural logarithm uses the mathematical constant e, approximately 2.71828. It is widely used in calculus, exponential growth, and differential equations.

Binary logarithm

log2(x)

A binary logarithm uses base 2 and appears in computing, information theory, and algorithms. For example, log2(32) = 5.

Custom-base logarithm

logb(x)

A custom logarithm allows any positive base except 1. For example, log3(81) = 4.

Change-of-Base Formula

The change-of-base formula lets you evaluate logarithms using a calculator that supports natural logarithms or common logarithms.

logb(x) = ln(x) / ln(b)

For example, to calculate log2(10):

  1. Calculate ln(10), approximately 2.302585.
  2. Calculate ln(2), approximately 0.693147.
  3. Divide the two values: 2.302585 / 0.693147 ≈ 3.321928.

Therefore, log2(10) is approximately 3.321928.

Important Logarithm Rules

Product rule

logb(xy) = logb(x) + logb(y)

The logarithm of a product becomes a sum.

Quotient rule

logb(x/y) = logb(x) − logb(y)

The logarithm of a quotient becomes a difference.

Power rule

logb(xn) = n logb(x)

An exponent can be moved in front as a multiplier when the logarithm's domain conditions are met.

Logarithm of one

logb(1) = 0

Every valid logarithm base raised to zero equals one.

Logarithm of the base

logb(b) = 1

A base raised to the first power equals itself.

Inverse relationship

blogb(x) = x

Exponentiation and logarithms with the same base undo each other.

Frequently Asked Questions

How do I calculate a logarithm?

Enter the positive argument, select a logarithm type, and click Calculate Logarithm. For a custom base, enter a positive base that is not equal to 1.

Can I calculate logarithms with any base?

Yes. Select Custom base and enter any positive base other than 1.

Why can't the argument be zero or negative?

This calculator works with real logarithms. The logarithm's argument must be strictly positive. The logarithm of zero or a negative number is not defined in the real-number system.

Why can't the base equal 1?

Raising 1 to any real power always gives 1, so base 1 cannot uniquely identify the exponent for general logarithm arguments.

What is the difference between log and ln?

In common mathematical notation, log usually means base 10, while ln means base e. This calculator lets you select either convention explicitly.

Is this logarithm calculator free?

Yes. It runs directly in your browser through the website and requires no account or installation.

Related Math Calculators