Log Calculator

Calculate the logarithm of any positive number in base 10, base e (ln), base 2 or a custom base, or find the antilog, with full working.

Log calculator
Calculate
Result

    Working

    logb(x) = y means by = x. Other bases use the change-of-base rule logb(x) = ln(x) ÷ ln(b). Results are shown to 10 significant figures.

    On this page

    A log calculator finds the logarithm of a number to any base: base 10 (common log), base e (natural log, ln), base 2 (binary log) or a base you choose, and works out the antilog to reverse it. It shows the answer to 10 significant figures, the change-of-base working, a check by raising the base to the result, and the common, natural and binary logs side by side.

    For example, log10(1,000) = 3 because 10³ = 1,000, ln(10) ≈ 2.302585, log2(1,024) = 10 and log3(81) = 4. The antilog of 3 in base 10 is 10³ = 1,000.

    How to use the log calculator

    1. Choose Logarithm to find logb(x), or Antilog to find by.
    2. Pick the base: 10, e, 2, or Other base to type any positive base except 1.
    3. Enter the number. For a logarithm it must be greater than zero. You can type e for Euler’s number and use scientific notation such as 3.2e-4.
    4. Press Calculate to see the result, the working and the logs in other bases.

    What is a logarithm?

    A logarithm answers the question: to what power must a base be raised to give a certain number? Writing logb(x) = y means exactly the same as by = x. So log10(100) = 2 because 10² = 100, and log2(8) = 3 because 2³ = 8.

    Logarithms turn multiplication into addition and powers into multiplication. Before calculators, this made them essential for astronomy, navigation and engineering, where people looked up logs in printed tables and used slide rules. Today they remain vital because so many natural and man-made processes grow or shrink by multiplying, and logs turn those processes into straight lines.

    Types of logarithm

    NameBaseWritten asCommon uses
    Common log10log(x) or log10(x)pH, decibels, earthquake scales, scientific notation
    Natural loge ≈ 2.718282ln(x)Calculus, growth and decay, finance, physics
    Binary log2log2(x) or lb(x)Computer science, bits, algorithms, music octaves

    The change-of-base formula

    Most calculators only have buttons for log and ln. To find a logarithm in any other base, use:

    logb(x) = ln(x) ÷ ln(b) = log(x) ÷ log(b)

    For example, log5(30) = ln(30) ÷ ln(5) = 3.401197 ÷ 1.609438 ≈ 2.113283. Check: 52.113283 ≈ 30. The calculator shows this working automatically whenever you choose a custom base.

    Rules of logarithms

    • Product rule: logb(xy) = logb(x) + logb(y)
    • Quotient rule: logb(x ÷ y) = logb(x) − logb(y)
    • Power rule: logb(xn) = n × logb(x)
    • Log of 1: logb(1) = 0 for every base
    • Log of the base: logb(b) = 1
    • Inverse: blogb(x) = x and logb(bx) = x

    For example, log(6) = log(2) + log(3) = 0.30103 + 0.477121 = 0.778151, which matches the value the calculator gives for log(6).

    Common log values

    xlog10(x)ln(x)log2(x)
    1000
    20.301030.6931471
    e ≈ 2.718280.43429411.442695
    1012.3025853.321928
    10024.605176.643856
    1,00036.9077559.965784

    Characteristic and mantissa

    A common logarithm can be split into a whole-number part, the characteristic, and a decimal part, the mantissa. For log(50) = 1.69897, the characteristic is 1 and the mantissa is 0.69897. The characteristic tells you the power of ten (50 = 5 × 10¹), and the mantissa depends only on the digits, so log(5), log(50) and log(500) all share the same mantissa. Old log tables listed only mantissas for this reason.

    Antilogarithms

    The antilog reverses a logarithm. If logb(x) = y, then the antilog of y is x = by. The antilog of 2 in base 10 is 100, and the antilog of 1 in base e is e ≈ 2.718282. Choose Antilog in the calculator to raise the selected base to any power, including negative and decimal powers.

    Logarithms in real life

    pH in chemistry

    pH is the negative common log of the hydrogen ion concentration: pH = −log[H⁺]. Pure water has [H⁺] = 10⁻⁷ mol/L, so its pH is 7. A solution with [H⁺] = 3.2 × 10⁻⁴ mol/L has a pH of about 3.49.

    Decibels

    Sound levels in decibels are 10 × log of an intensity ratio. A sound 1,000 times more intense than another is 10 × log(1,000) = 30 dB louder.

    Earthquakes

    Earthquake magnitude scales are logarithmic. Each step of 1 means about 10 times larger ground motion, so a magnitude 6 quake shakes about 100 times more than a magnitude 4.

    Growth and doubling time

    To find how long money growing at 7% a year takes to double, solve 1.07t = 2: t = ln(2) ÷ ln(1.07) ≈ 10.24 years.

    Computer science

    The binary log counts how many times you can halve a number. Searching a sorted list of a million items takes about log2(1,000,000) ≈ 20 steps with binary search.

    Why the natural log uses e

    The number e, about 2.718282, appears whenever something grows continuously at a rate proportional to its size. If you invest money at 100% interest compounded more and more often, the growth approaches a factor of e per year. Because of this, the natural log has the simplest calculus of any logarithm: the rate of change of ln(x) is exactly 1 ÷ x. That’s why scientists, economists and engineers usually work in natural logs and convert to other bases only when they need to present results.

    Solving exponential equations with logs

    Logarithms are the standard tool for finding an unknown exponent. The method has three steps:

    1. Isolate the power, for example 3 × 2x = 48 becomes 2x = 16.
    2. Take the log of both sides, using any base: x × log(2) = log(16).
    3. Divide to find the exponent: x = log(16) ÷ log(2) = 4.

    The same steps solve compound-interest, population-growth and radioactive-decay problems, where the time appears as an exponent.

    The shape of a logarithm graph

    For any base greater than 1, the graph of y = logb(x) passes through (1, 0) and (b, 1), rises forever but more and more slowly, and plunges towards minus infinity as x approaches zero. It never touches the y-axis, which is a vertical asymptote. The log graph is the mirror image of the exponential graph y = bx in the line y = x, because the two functions undo each other. This slow growth is why logarithmic scales are so useful for squeezing a huge range of values, such as star brightness or sound intensity, onto one readable chart.

    Common mistakes

    • Taking the log of zero or a negative number. Logarithms of real numbers are only defined for positive values.
    • Writing log(x + y) = log(x) + log(y). The product rule applies to log(xy), not log(x + y).
    • Mixing up log and ln. On most calculators, log means base 10 and ln means base e, but some textbooks use log for the natural log.
    • Using a base of 1 or a negative base. Neither gives a valid logarithm.

    Tips for working with logs

    • Convert the log statement into a power statement when you’re stuck: logb(x) = y becomes by = x.
    • Check results by raising the base to the answer, as the calculator does in its working.
    • Use the power rule to solve equations with the unknown in an exponent.

    Related calculations

    You may also find the exponent calculator useful to raise any number to any power, while the root calculator lets you find square roots, cube roots and any nth root.

    Frequently asked questions

    3, because 10³ = 1,000.

    log usually means the common logarithm with base 10, while ln is the natural logarithm with base e ≈ 2.718282. They are related by ln(x) = 2.302585 × log(x).

    Not in the real numbers. Logarithms are only defined for positive numbers, because no real power of a positive base gives a negative result or zero.

    0 in every base, because any base raised to the power 0 equals 1.

    Use the change-of-base formula logb(x) = ln(x) ÷ ln(b). Choose Other base in the calculator and it does this for you.

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

    1, because e¹ = e. Likewise, the log of any base to that same base is 1.

    1 raised to any power is always 1, so it can never produce other numbers. A logarithm with base 1 would be undefined.

    It's used in computing to count bits and the steps in halving algorithms, and in music, where each octave doubles the frequency.

    Take logs of both sides: x = log2(50) = ln(50) ÷ ln(2) ≈ 5.643856.

    Yes, for any base greater than 1. For example, log(0.01) = −2 because 10⁻² = 0.01.

    About 0.30103, so 2 is roughly 10 raised to the power 0.3.

    Results are shown to 10 significant figures, which is more than enough for schoolwork, science and engineering.