Skip to content

Logarithm Calculator (log, ln, any base)

Work out log₁₀, ln, log₂ or a log in any base, up to 30 decimal places, with every step shown. You get exact answers when there is one (log₄ 2 = 1/2), and you can find x from its log or find a missing base. The log rules are worked with your own numbers.

a·bˣ = c, pH, dB and quakes, decimal places, rule numbers
What do you want to work out?

log₁₀ 50 = ?

Base

Whole numbers, decimals, fractions (1/8), scientific notation (2.5e-6 or 3×10^4), powers (10^-3, e^2), √2, e and π.

Decimal places
ResultUpdates as you type—Answer—Exact form—Characteristic—MantissaSame number, everyday baseslnlog₁₀log₂Working
    Log rules with your numbers

    How your log is worked out

    Your numbers: change of base finds the answer, then the three log rules use it.

    1. 1

      Change of base

      ln 50 ÷ ln 103.912 ÷ 2.3026≈ 1.69897

    2. 2

      Product rule

      log₁₀(50×2)= 1.69897 + 0.30103= 2

    3. 3

      Quotient rule

      log₁₀(50÷2)= 1.69897 − 0.30103≈ 1.39794

    4. 4

      Power rule

      log₁₀(50³)= 3 × 1.69897≈ 5.09691

    Read more: the formula, worked examples, log rules and log scales

    A logarithm is the power you need. logb x asks: “what power of b gives x?” So log₁₀ 1,000 = 3 because 103 = 1,000, and log₂ 8 = 3 because 23 = 8. A log undoes a power, and an antilog (a power) undoes a log. For powers and roots themselves, use the exponent calculator.

    The formula

    log base b of x = y means b^y = x
    change of base: log_b x = ln x ÷ ln b = log₁₀ x ÷ log₁₀ b
    antilog: x = b^y
    find the base: b = x^(1 ÷ y)
    a × b^(kx) + d = c gives x = log_b((c − d) ÷ a) ÷ k
    pH = −log₁₀[H⁺]; dB = 10 × log₁₀(power ratio) or 20 × log₁₀(amplitude ratio)

    Worked example

    Find the log (the default): log₁₀ 50 asks which power of 10 gives 50. 101 = 10 and 102 = 100, so the answer is between 1 and 2. By change of base, log₁₀ 50 = ln 50 ÷ ln 10 = 3.9120230054 ÷ 2.3025850930 ≈ 1.6989700043. The characteristic (whole part) is 1 and the mantissa (decimal part) is 0.6989700043. The same number in other bases: ln 50 ≈ 3.9120230054 and log₂ 50 ≈ 5.6438561898.

    Log rules with the default numbers (m = 2, k = 3): log₁₀(50 × 2) = 1.6989700043 + 0.3010299957 = 2 exactly, which is right because 50 × 2 = 100 = 102. log₁₀(50 ÷ 2) = 1.6989700043 − 0.3010299957 = 1.3979400086 (that is log₁₀ 25). log₁₀(503) = 3 × 1.6989700043 = 5.0969100130 (log₁₀ 125,000).

    Exact answers: log₂ 8 = 3 since 23 = 8. log₁₀ 0.001 = −3 since 10−3 = 1 ÷ 1,000. log₄ 2 = 1/2 since 41/2 = √4 = 2.

    Find x (antilog): log₁₀ x = 2.5 means x = 102.5 = 102 × 100.5 = 100 × 3.1622776602 ≈ 316.2277660168.

    Find the base: logb 8 = 3 means b3 = 8, so b = 81/3 = 2.

    Exponential equation: 500 × 1.05x = 1,000. Divide by 500: 1.05x = 2. Take log₁.₀₅ of both sides: x = ln 2 ÷ ln 1.05 = 0.6931471806 ÷ 0.0487901642 ≈ 14.2066990829.

    pH: [H⁺] = 2.5 µmol/L = 0.0000025 mol/L. pH = −log₁₀ 0.0000025 ≈ 5.6020599913, so it is acidic. pOH = 14 − 5.6020599913 = 8.3979400087 (at 25 °C).

    Log rules

    RuleIn symbolsExample
    Productlog(xy) = log x + log ylog₂(8 × 4) = 3 + 2 = 5
    Quotientlog(x ÷ y) = log x − log ylog₂(8 ÷ 4) = 3 − 2 = 1
    Powerlog(xk) = k × log xlog₂(82) = 2 × 3 = 6
    Change of baselogb x = ln x ÷ ln blog₂ 50 = 3.9120 ÷ 0.6931 ≈ 5.6439
    Swaplogb x = 1 ÷ logx blog₄ 2 = 1 ÷ log₂ 4 = 1/2
    Base and 1logb b = 1, logb 1 = 0log₇ 7 = 1, log₇ 1 = 0
    Undoblog_b x = x10log 50 = 50

    Handy logs

    xlog₁₀ xln xlog₂ x
    1000
    20.30102999570.69314718061
    30.47712125471.09861228871.5849625007
    e ≈ 2.71828182850.434294481911.4426950409
    50.69897000431.60943791242.3219280949
    1012.30258509303.3219280949
    10024.60517018606.6438561898

    Log scales in real life

    ScaleFormulaOne step means
    pH (acidity)pH = −log₁₀[H⁺], [H⁺] in mol/L1 pH lower = 10 × more H⁺ ions
    Decibels (power)dB = 10 × log₁₀(P ÷ P₀)+10 dB = 10 × the power, +3 dB ≈ double
    Decibels (voltage, sound pressure)dB = 20 × log₁₀(A ÷ A₀)+20 dB = 10 × the amplitude, +6 dB ≈ double
    Earthquake magnitudeenergy ratio = 101.5 × gap+1 = 10 × the wave height, ≈ 31.6 × the energy

    pH here is the simple textbook formula. pOH = 14 − pH holds for water at 25 °C. Common decibel references: 1 mW (dBm), 1 W (dBW), 1 V (dBV) and 20 µPa for sound in air (dB SPL). The earthquake energy rule (about 31.6 × per whole magnitude) is the usual rule of thumb from the Gutenberg–Richter energy relation.

    Logs on calculators and spreadsheets

    On most calculators log means base 10 and ln means base e. For any other base, divide: logb x = ln x ÷ ln b. In Excel and Google Sheets, =LOG(50, 10), =LN(50) and =LOG10(50) do the same jobs, and =LOG(8, 2) gives 3.

    How the answers stay exact

    This calculator does not use your device’s rounded maths. It works with whole numbers of any size: ln is built from ln 2 and a fast series, eˣ from a series and repeated squaring, with about 45 spare digits, so every decimal place you ask for (up to 30) is right. Exact answers are found by checking powers with whole numbers, so log₄ 2 shows 1/2, not 0.4999999999.

    Common questions

    What is a logarithm in simple words?

    A logarithm answers the question: what power do I raise the base to, to get this number? Since 10³ = 1,000, log₁₀ 1,000 = 3. Since 2³ = 8, log₂ 8 = 3. A log is the opposite of a power, the same way division is the opposite of multiplication.

    What is the difference between log and ln?

    They use different bases. log on most calculators means base 10 (the common log), so log 100 = 2. ln is the natural log, base e ≈ 2.718281828, so ln 50 ≈ 3.9120230054 while log₁₀ 50 ≈ 1.6989700043. Any log can be turned into another with change of base: log₁₀ x = ln x ÷ ln 10.

    How do I work out a log with a different base on my calculator?

    Use change of base: log_b x = ln x ÷ ln b, or log x ÷ log b with base-10 logs. For log₂ 50, type ln 50 ÷ ln 2 = 3.9120230054 ÷ 0.6931471806 ≈ 5.6438561898. Both versions give the same answer because the base you pick cancels out.

    What is an antilog?

    The antilog undoes a log: if log_b x = y, then x = b^y. The common antilog of 2.5 is 10^2.5 = 100 × √10 ≈ 316.2277660168. The antilog of −3 is 10^−3 = 0.001. On a calculator it is usually the 10ˣ or eˣ key.

    Can you take the log of a negative number or 0?

    Not as a real number. A positive base raised to any power always gives a positive answer, so no power can give 0 or a negative number. log 0 heads down to minus infinity, and logs of negative numbers only exist as complex numbers, which this calculator does not cover.

    How do I solve an equation like 500 × 1.05ˣ = 1,000?

    Get the power on its own, then take a log of both sides. Divide by 500 to get 1.05ˣ = 2, so x = log₁.₀₅ 2 = ln 2 ÷ ln 1.05 = 0.6931471806 ÷ 0.0487901642 ≈ 14.2066990829. So money growing 5% a year doubles in just over 14 years.

    Related calculators

    Exponent calculatorPowers with negative and fractional exponents, exact huge numbers, find the exponent or base, nth roots as surds, logs and antilogs in any base, with steps.Scientific calculatorTrig, logs, powers, roots, factorials, nCr and nPr, memory and history, with degrees, radians or gradians and answers as fractions.Quadratic formula calculatorSolve ax² + bx + c = 0 or a typed equation with steps: exact surd and complex roots, discriminant, factoring, vertex, inequalities and a graph.Sig figs & rounding calculatorCount significant figures digit by digit, round to sig figs, decimal places or the nearest 10, 0.5 or any step with 10 rounding methods, and do sig fig maths on a typed sum.

    Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.

    Embed this calculator on your site

    Free to use on your website or blog. Paste this code where you want the calculator to appear. Please keep the credit link.

    Logarithm Calculator (log, ln, any base) by Zulu Calculator ↗