Logarithm Calculator

Calculate Logarithm

What is a Logarithm?

A logarithm is the inverse operation of exponentiation. If b^y = x, then log_b(x) = y. In other words, the logarithm answers the question: "To what power must the base be raised to get this number?"

Logarithms are used extensively in science, engineering, and mathematics. They help simplify complex calculations, measure quantities that span many orders of magnitude (like pH, decibels, and earthquake magnitudes), and solve exponential equations.

How to Calculate Logarithms

The most common logarithms are:

To calculate a logarithm with any base, use the change of base formula:

log_b(x) = ln(x) / ln(b) = log(x) / log(b)

Formulas

log₁₀(x) = y ⟺ 10^y = x
ln(x) = y ⟺ e^y = x
log_b(x) = y ⟺ b^y = x

Key Properties:

Examples

Common Logarithm (Base 10)

Problem: Calculate log₁₀(1000)

Solution:

  1. Ask: 10 raised to what power equals 1000?
  2. 10³ = 1000
  3. Result: log₁₀(1000) = 3

Natural Logarithm (Base e)

Problem: Calculate ln(e²)

Solution:

  1. Since ln(e) = 1, by the power rule: ln(e²) = 2 × ln(e)
  2. Result: ln(e²) = 2

Custom Base

Problem: Calculate log₂(8)

Solution:

  1. Ask: 2 raised to what power equals 8?
  2. 2³ = 8
  3. Result: log₂(8) = 3

Frequently Asked Questions

What is the difference between log and ln?

"log" typically refers to base 10 logarithm (common logarithm), while "ln" refers to base e logarithm (natural logarithm). The natural logarithm uses Euler's number e ≈ 2.71828 as its base.

Can you take the logarithm of a negative number?

In real numbers, no. The logarithm is only defined for positive real numbers. For negative numbers, you need to use complex numbers and the complex logarithm.

Why is ln(x) called the "natural" logarithm?

The natural logarithm arises naturally in calculus and many natural phenomena. The derivative of ln(x) is simply 1/x, and it appears in many growth/decay processes, making it "natural" for mathematical descriptions of nature.

What is log(0)?

log(0) is undefined. No matter what power you raise a positive base to, you can never get 0. The logarithm function approaches negative infinity as x approaches 0 from the positive side.