Algebra

Logarithm Calculator

Find log_b(x) for any base, or work backwards to the number or the base. Each answer comes with the change-of-base steps, a check, and an exact form when the answer is a whole number or simple fraction.

-
Step by step
    Logarithm rules

    log_b(xy) = log_b(x) + log_b(y) log_b(x / y) = log_b(x) − log_b(y) log_b(xⁿ) = n · log_b(x) log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b) log_b(b) = 1, log_b(1) = 0, b^(log_b x) = x

    Runs entirely in your browser. Nothing is uploaded to any server.

    Why use this logarithm calculator

    Any base

    Not just 10 and e: base 2, 3, 1.5 or any positive number except 1.

    Three directions

    Find the log, the number or the base.

    Clear working

    Change-of-base steps and a check for every answer.

    How to calculate a logarithm

    1. Choose what to findThe logarithm, the number (antilog) or the base.
    2. Enter the valuesPick a base such as 10, e or 2, or type your own.
    3. Read the stepsSee the change-of-base working and the check.

    What a logarithm means

    A logarithm answers the question "what power do I raise the base to, to get this number?". log₂(8) = 3 because 2³ = 8. The common log uses base 10, the natural log ln uses e ≈ 2.71828, and the binary log uses base 2.

    Calculators usually only have ln and log₁₀ buttons, so other bases use the change-of-base formula log_b(x) = ln(x) / ln(b). Logarithms only exist for positive numbers, and the base must be positive and not 1.

    Common log

    log₁₀ is used for decibels, pH and orders of magnitude.

    Natural log

    ln appears in growth, decay and compound interest.

    Binary log

    log₂ counts bits and halving steps in computer science.

    Logarithm FAQ

    Why is the log of a negative number undefined?

    A positive base raised to any real power is always positive, so no real exponent gives a negative number or zero.

    What is the difference between log and ln?

    log usually means base 10 and ln means base e. Some textbooks and programming languages use log for the natural log, so check the context.

    What is an antilog?

    The inverse of a logarithm. The antilog of y in base b is bʸ, so the antilog of 2 in base 10 is 100.

    Why can the base not be 1?

    1 raised to any power is 1, so it can never produce any other number.

    How does the calculator know an answer is exact?

    It checks whether the result is a whole number or a fraction with a small denominator and confirms that the base raised to that fraction gives your number.

    Try other math tools

    More free tools from My Panda Toolbox.