Math & Engineering

Logarithm Calculator

Calculate logarithms with any base. Supports natural logarithms (ln), common logarithms (log₁₀), and custom base logarithms.

Reviewed by the calculator.uk.com Team · Last reviewed 22 July 2026 · Our methodology

Logarithm Calculator Input
Results

Enter values to calculate logarithm

Share Calculator
How the Logarithm Calculator Works

The logarithm calculator finds the exponent (power) to which a base must be raised to obtain a given number. For example, if we want to find log₂(8), we're asking: "2 to what power equals 8?" In this case, 2³ = 8, so log₂(8) = 3.

Types of Logarithms

1. Natural Logarithm (ln): Uses base e (≈ 2.71828)
2. Common Logarithm (log₁₀): Uses base 10
3. Custom Base Logarithm: Uses any positive base you specify

Calculation Methods

For natural logarithms: ln(x) is calculated directly
For common logarithms: log₁₀(x) is calculated directly
For custom base b: log_b(x) = ln(x) / ln(b)

How to Interpret the Results

The result of a logarithm tells you what power you need to raise the base to in order to get your input number. The calculator provides both the numerical result and step-by-step explanations of the calculation process.

Example Interpretation

If ln(10) ≈ 2.302585, this means:
e² · e⁰·³⁰²⁵⁸⁵ = 10
Or: e raised to the power of 2.302585 equals 10

Common Applications

• pH calculations in chemistry
• Sound intensity in decibels
• Interest rates in finance
• Earthquake magnitude (Richter scale)

Frequently Asked Questions

1. What is the difference between ln and log?

ln (natural logarithm) specifically uses base e (≈ 2.71828), while log commonly refers to base-10 logarithm. In mathematics, ln(x) = log_e(x), and log(x) = log₁₀(x).

2. Why can't I calculate the logarithm of a negative number?

Logarithms of negative numbers are undefined in the real number system. This is because no real number raised to any power can result in a negative number (except when raising negative numbers to odd powers).

3. What is the change of base formula?

The change of base formula states that for any positive numbers M and b (b ≠ 1), log_b(M) = ln(M) / ln(b). This formula allows us to calculate logarithms with any base.

4. When would I use natural logarithms vs common logarithms?

Natural logarithms (ln) are commonly used in calculus, exponential growth/decay problems, and compound interest calculations. Common logarithms (log₁₀) are useful for measuring quantities that vary by orders of magnitude, like pH or decibels.

5. What is the scientific source for this calculator?

Logarithms were formalized by John Napier in the early 17th century, and the natural logarithm base e was later defined through the work of Leonhard Euler. This calculator computes results using JavaScript's built-in Math.log() and Math.log10() functions, and derives any custom base from the change-of-base identity log_b(x) = ln(x) / ln(b), a standard identity found in algebra and calculus textbooks.