Skip to content
MasterMath

Log Calculator

The logarithm to any base, shown alongside the three that matter: base 10, base e and base 2.

Logarithm

—

Logarithm—
Common log (base 10)—
Natural log (base e)—
Binary log (base 2)—
Check—

How this was worked out

    The rule

    logₐ(x) = the power you raise a to in order to get x

    Why it works

    A logarithm answers the question 'to what power?'. If 10³ = 1000, then log₁₀(1000) = 3. It is the inverse of exponentiation, and it turns multiplication into addition, which is why it was invented.

    How to do it by hand

    1. Ask what power the base needs to reach the number
    2. For any base, use the change of base formula: ln(x) ÷ ln(base)
    3. Check by raising the base to your answer
    4. The result should be the number you started with

    What is worth knowing

    Logarithms were invented by Napier in 1614 to turn multiplication into addition, and for three centuries slide rules and log tables were how serious arithmetic got done. That use is gone, but the mathematics is not: logarithmic scales handle quantities spanning many orders of magnitude, which is why decibels, pH, the Richter scale and stellar magnitudes are all logarithmic. Each is a case where the interesting thing is the ratio, not the difference. The three standard bases have three domains: 10 for engineering and measurement, e for calculus, and 2 for computer science, where it counts the doublings.

    Frequently asked questions

    What is a logarithm?

    The power you need to raise the base to in order to get the number. If 10³ = 1000, log₁₀(1000) = 3.

    What is the difference between log and ln?

    log usually means base 10 and ln means base e. In pure mathematics log often means base e too, which is a genuine source of confusion.

    Why can't you take the log of a negative number?

    Because no real power of a positive base gives a negative result. The logarithm of a negative is complex.

    What is the change of base formula?

    logₐ(x) = ln(x) ÷ ln(a). It lets you compute any base with a calculator that only has ln and log.