Logarithm Calculator

Compute log base 10, natural log (ln), log base 2, or a logarithm in any positive base.

Reviewed by the WorldCalcs team · Methodology · Last reviewed: June 2026

Result

3

What is a logarithm?

A logarithm answers the question: what power must I raise the base to in order to get this number? If b to the power y equals x, then log_b(x) = y. For example, because 10 to the power 3 equals 1000, log base 10 of 1000 is 3. The base-10 logarithm (written log) and the natural logarithm (written ln, base e which is about 2.71828) are the most common, with base 2 widely used in computing. Logarithms turn multiplication into addition, which is why they appear in sound (decibels), earthquakes (the Richter scale), acidity (pH), and models of growth and decay.

How it's calculated

Any logarithm can be found from natural logs using the change-of-base formula: log_b(x) = ln(x) / ln(b). This is how a calculator evaluates a base it does not have a dedicated button for. The base must be positive and not equal to 1, and you can only take the logarithm of a positive number.

Example

To find log base 2 of 8: ln(8) is about 2.079442 and ln(2) is about 0.693147, so log₂(8) = 2.079442 / 0.693147 = 3. That matches the fact that 2 to the power 3 equals 8.

All calculations happen in your browser. Nothing is sent, stored, or tracked.

Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer

How to use

Enter the number x and the base. Use the quick buttons for log (base 10), ln (base e) or log base 2, or type any positive base other than 1.

The result is computed with the change-of-base formula: log_b(x) = ln(x) / ln(b).

Frequently asked questions

What is the difference between log and ln?+

"log" usually means base 10, while "ln" is the natural logarithm with base e (about 2.71828). Both follow the same rules.

What is the log of a negative number or zero?+

It is undefined for real numbers, because no power of a positive base can give zero or a negative result.

Why is the log of 1 always 0?+

Because any base raised to the power 0 equals 1, so log_b(1) = 0 for every valid base.

What is the change-of-base formula?+

log_b(x) = ln(x) / ln(b) (or log(x) / log(b)); it lets you compute a logarithm in any base.

Where are logarithms used?+

Decibels, the Richter scale, pH, information theory, and any model of exponential growth or decay.