Logarithm Calculator — Log Base N, Ln, Log₁₀ & Log₂

<iframe src="https://gimmecalc.com/embed/logarithm-calculator/" width="100%" height="500" style="border:none;border-radius:12px" title="Logarithm Calculator — Log Base N, Ln, Log₁₀ & Log₂" loading="lazy"></iframe>

What is a logarithm?

A logarithm answers the question: "To what power must the base be raised to produce a given number?" If by = x, then logb(x) = y. For example, log2(8) = 3 because 2³ = 8. Logarithms are the inverse of exponentiation and appear throughout mathematics, science, engineering, and computer science.

How do you calculate a logarithm?

To calculate logb(x), use the change of base formula: logb(x) = ln(x) / ln(b), where ln is the natural logarithm. This works because most calculators only have buttons for log₁₀ and ln. For example, to find log5(125): ln(125) / ln(5) = 4.828 / 1.609 = 3. You can also use log₁₀ instead of ln — the result is the same: log₁₀(125) / log₁₀(5) = 2.097 / 0.699 = 3.

What is the difference between log, ln, and log₂?

The three most common logarithm bases each serve different fields. The common logarithm (log₁₀) uses base 10 and is standard in science and engineering — for instance, the Richter scale and pH scale both use log₁₀. The natural logarithm (ln) uses base e ≈ 2.71828 and is fundamental in calculus, physics, and exponential growth models. The binary logarithm (log₂) uses base 2 and is essential in computer science for analysing algorithm complexity and data structures. You can explore powers and exponents further with our scientific calculator.

What are some logarithm examples?

Here are practical worked examples:

  • log₁₀(1000) = 3 because 10³ = 1000
  • log₂(64) = 6 because 2⁶ = 64
  • ln(e²) = 2 because e² = e²
  • log₃(81) = 4 because 3⁴ = 81
  • log₁₀(0.01) = −2 because 10⁻² = 0.01

What are the key logarithm rules?

Several properties make working with logarithms easier:

  • Product rule: logb(x · y) = logb(x) + logb(y)
  • Quotient rule: logb(x / y) = logb(x) − logb(y)
  • Power rule: logb(xn) = n · logb(x)
  • Change of base: logb(x) = logc(x) / logc(b)
  • Identity: logb(b) = 1 and logb(1) = 0

These rules are essential when simplifying expressions in algebra and are closely related to working with fractions and equations.

When are logarithms useful?

Logarithms have wide-ranging real-world applications. In science, the Richter scale measures earthquake magnitude on a log₁₀ scale — each whole number increase represents a tenfold increase in amplitude. The decibel scale for sound intensity and the pH scale in chemistry are also logarithmic. In computer science, binary search and balanced tree operations run in O(log₂ n) time. In finance, logarithms help calculate compound interest and continuous growth rates. In biology, population growth models use natural logarithms to describe exponential processes.

Can you take the logarithm of a negative number?

In the real number system, logarithms are only defined for positive numbers. You cannot compute logb(x) when x ≤ 0 because no real exponent of a positive base can produce zero or a negative result. Additionally, the base must be positive and not equal to 1 — log1(x) is undefined because 1 raised to any power is always 1. In the complex number system, logarithms of negative numbers do exist, but they involve imaginary components. For related equation-solving tools, try the quadratic equation calculator.