log₁₀ · ln · log₂ · any baseReviewed 28 Sep 2026Runs in your browser

Log Calculator

Calculate logarithms to any base — common (log₁₀), natural (ln), binary (log₂) or your own — and antilogarithms, with the change-of-base working, characteristic and mantissa, and a graph.

Who wrote it

Written by Suhaib Hassan. The logarithm laws are standard, and each worked example is re-derived by hand. Our methodology.

How the engine works

It uses the change-of-base rule log_b(x) = ln x ÷ ln b with double-precision natural logs, and checks the answer by raising the base back to the result.

Why we built it

Logarithms turn multiplication into addition. This page shows the value, the equivalent in other bases, and where it sits on the curve.

log_b(x), any base

Presets
b > 0, b ≠ 1; type e for Euler’s number
x > 0
Equation—
log₁₀(500)—
—

—

Characteristic—
Mantissa—

Logarithm curve

y = log_b(x) with your point marked; the curve has a vertical asymptote at x = 0.

—

Step-by-step working

—

—

    Laws of logarithms

    For b > 0, b ≠ 1 and positive x and y.

    RuleIdentityExample
    Productlog_b(xy) = log_b x + log_b ylog₁₀ 200 = log₁₀ 2 + log₁₀ 100 = 0.301 + 2
    Quotientlog_b(x/y) = log_b x − log_b ylog₁₀ 5 = log₁₀ 10 − log₁₀ 2 = 1 − 0.301 = 0.699
    Powerlog_b(xᵖ) = p · log_b xlog₁₀ 1000 = log₁₀ 10³ = 3 · 1 = 3
    Change of baselog_b x = ln x ÷ ln blog₂ 8 = ln 8 ÷ ln 2 = 2.0794 ÷ 0.6931 = 3
    Inverseb^(log_b x) = x and log_b(bˣ) = x10^(log₁₀ 500) = 500
    Special valueslog_b 1 = 0, log_b b = 1log₁₀ 1 = 0, log₁₀ 10 = 1

    Worked examples

    Decibels

    A sound with 100 times the reference power.

    L = 10 · log₁₀(P ÷ P₀) = 10 · log₁₀ 100
    = 10 × 2 = 20 dB

    Binary search

    How many comparisons to search 1,000,000 sorted items?

    ⌈log₂ 1,000,000⌉ = ⌈19.93⌉ = 20 steps

    pH of water

    Pure water has [H⁺] = 10⁻⁷ mol/L.

    pH = −log₁₀[H⁺] = −(−7) = 7

    What is a logarithm?

    The logarithm log_b(x) answers “to what power must I raise b to get x?” If bʸ = x then y = log_b(x). The three most common bases are 10 (common logarithm, written log or log₁₀), e ≈ 2.71828 (natural logarithm, ln) and 2 (binary logarithm, log₂, used in computing).

    Characteristic and mantissa

    For a base-10 logarithm, the integer part (the characteristic) gives the order of magnitude and the fractional part (the mantissa) depends only on the digits. Because log₁₀ 500 = log₁₀ 5 + log₁₀ 100 = 0.69897 + 2, the characteristic is 2 and the mantissa 0.69897. Printed log tables listed mantissas only.

    By Suhaib Hassan · Reviewed 28 September 2026 · How CalculatePilot verifies formulas →

    Sources

    • NIST Digital Library of Mathematical Functions, chapter 4, section 4.2 (definitions of the logarithm and exponential).
    • Napier, J. (1614). Mirifici Logarithmorum Canonis Descriptio. Edinburgh.
    • ISO 80000-2:2019, Quantities and units — Part 2: Mathematics, item 2-12 (exponential and logarithmic functions).

    Frequently asked questions

    Why can’t I take the logarithm of zero or a negative number?

    For a positive base, bʸ is always positive, so no real y gives zero or a negative result. As x approaches 0 from above, log_b(x) heads to −∞ (a vertical asymptote). In the complex numbers, logs of negative numbers exist: ln(−x) = ln x + πi; this page shows that principal value for a negative argument.

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

    They are logarithms in different bases: log is base 10 in most school and engineering contexts, ln is base e, and log₂ is base 2. In some programming languages and mathematics texts, “log” means the natural logarithm, so check the convention.

    Why is the natural logarithm so important in calculus?

    Because d/dx ln x = 1/x with no extra constant. For any other base, d/dx log_b x = 1 ÷ (x ln b). The number e is the unique base for which the exponential function is its own derivative, which is why it appears in growth, decay and compound interest.

    How do I calculate a logarithm in a base my calculator lacks?

    Use change of base: log_b(x) = ln x ÷ ln b (or log₁₀ x ÷ log₁₀ b). For log₃ 500: ln 500 ÷ ln 3 = 6.2146 ÷ 1.0986 = 5.6568.

    What is an antilogarithm?

    It is the inverse operation: the antilog of y in base b is bʸ. If log₁₀ x = 2.69897 then x = 10^2.69897 ≈ 500. Use the Antilog tab.

    Why can’t the base be 1?

    Because 1 raised to any power is 1, so 1ʸ can never equal any other number and log₁(x) would be undefined. Also, ln 1 = 0 would make the change-of-base formula divide by zero.

    Related calculators

    Continue with algebra.

    All Math Calculators

    Embed This Log Calculator

    Free and responsive, and it runs in the visitor's browser. Branding removal from $7.99/month.

    <iframe src="https://www.calculatepilot.com/embed/log-calculator.html" width="100%" height="560" loading="lazy" title="Log Calculator"></iframe>
    For website owners

    Want this calculator on your own website?

    Embed it in one line of code. Keep it free with a small CalculatePilot attribution link, or go white-label: your brand, no attribution, one license for all your domains.

    • All 159 calculators, unlimited embeds
    • Works on WordPress, Webflow, Squarespace, Wix and plain HTML
    • Runs in your visitor's browser, so nothing is sent to a server
    • License key emailed automatically after checkout, cancel anytime
    $7.99 / month
    or $89.99 / year · white-label Pro
    Get the white-label license Embed free with attribution