Skip to main content

Logarithm Calculator

Easily calculate the logarithm of a number with any base. Supports log base 2, log base 10, and natural log.

Logarithm Calculator

Calculate the logarithm of a number to any base.

log()

Understanding Logarithms

A logarithm is the power to which a number (the base) must be raised to produce another given number. In simple terms, it's the inverse operation of exponentiation. If you have an equation like b^x = y, the logarithm is the answer to the question: "What exponent (x) do we need to raise the base (b) to, in order to get the number (y)?"

The Logarithm Formula

The relationship is expressed as:

log_b(y) = x

  • b: The base of the logarithm.
  • y: The number you are finding the logarithm of.
  • x: The result, which is the exponent.

Common Logarithms

  • Common Log (log): This is the logarithm with base 10. If no base is written, it's usually assumed to be 10.
    Example: log(100) = 2, because 10^2 = 100.
  • Natural Log (ln): This is the logarithm with base 'e' (Euler's number, ≈ 2.718). It's widely used in science and finance.
    Example: ln(7.389) ≈ 2, because e^2 ≈ 7.389.
  • Binary Log (log2): This is the logarithm with base 2, common in computer science.
    Example: log2(8) = 3, because 2^3 = 8.

Change of Base Formula

Calculators typically only have buttons for the common log (log₁₀) and natural log (ln). To calculate a logarithm with any other base, we use the change of base formula:

log_b(y) = ln(y) / ln(b)

This is the formula this calculator uses to find the result for any valid base you enter.

What Is a Logarithm and How Is It Calculated?

A logarithm answers a simple question: "What exponent do I need to raise a specific base to, in order to get a certain number?" It's the inverse operation of exponentiation. For example, we know that 10² = 100. The logarithm asks, "What power do we raise 10 to, to get 100?" The answer is 2. So, log₁₀(100) = 2.

I built this calculator to make finding any logarithm, regardless of the base, quick and easy.

How to Use This Log Calculator

  • Common Log (log₁₀): The logarithm with base 10. It's widely used in science and engineering.
  • Natural Log (ln): The logarithm with base 'e' (Euler's number, ≈ 2.718). It's fundamental in calculus, physics, and finance for modeling continuous growth.
  • Binary Log (log₂): The logarithm with base 2, crucial in computer science and information theory.

My calculator can handle any of these, and any other valid base you want to use.

How the Calculator Works: The Change of Base Formula

Most calculators only have buttons for the common log (LOG) and the natural log (LN). To calculate a logarithm with a different base, like log₄(1024), we use the change of base formula:

log_b(y) = log(y) / log(b)

So, to find log₄(1024), the calculator computes log(1024) / log(4) = 3.01 / 0.602 = 5. And it's correct, because 4⁵ = 1024.

Related Calculators

Percentage Calculator

Prime Number Checker

Probability Calculator