100+ free calculators, no signup | 💰 Financial ❤️ Health & Fitness 📐 Math 🔧 Other
🇺🇸 USD | About Contact

Log Calculator

Find the logarithm of any number in base 10, e, 2 or a custom base, or solve for the antilog or the base, with every step shown.

Solving log₁₀(x) = y for y.

Quick examples
log₁₀(250)
2.39794Common log, base 10

10 raised to the power 2.39794 gives 250.

Between whole powers of the base

The whole part of the log counts full powers of the base. The fraction places the number between them.

100 to 1,000whole part 2, fraction 0.39794

250 has 3 digits before the decimal point.

Your calculation

The same steps the calculator runs, with your numbers.

    Graph of y = log₁₀(x)

    Your point is marked on the curve. The curve crosses the x axis at x = 1 for every base.

    Powers of the base around your number

    Your row is highlighted.

    PowerValueLogarithm

    Results use double precision arithmetic and are rounded for display. Only real logarithms of positive numbers are shown.

    What Is a Logarithm?

    A logarithm answers one question: which power of a base gives this number? The statement logb(x) = y means exactly the same as by = x. Because 10³ = 1,000, the base 10 logarithm of 1,000 is 3. Because 2¹⁰ = 1,024, the base 2 logarithm of 1,024 is 10.

    Logarithms turn multiplication into addition and powers into multiplication. That is why they compress huge ranges of numbers into small, readable scales, and why they appear in pH, decibels, earthquake magnitude, compound interest and computer science.

    Three bases are used most often. The common logarithm uses base 10 and is written log or log₁₀. The natural logarithm uses base e ≈ 2.718282 and is written ln. The binary logarithm uses base 2 and is written log₂ or lb. Any positive number other than 1 can serve as a base.

    ℹ️
    The number x must be greater than 0, and the base must be greater than 0 and not equal to 1. These limits come from the definition, not from the calculator.

    How to Use the Log Calculator

    1. Find log: choose the base (10, e, 2 or a custom value) and enter the number x. The result is y = logb(x).
    2. Find number (antilog): choose the base and enter the exponent y. The result is x = by, the number whose logarithm is y.
    3. Find base: enter the number x and the exponent y. The result is the base b that makes by = x, found as b = x1/y.

    Results update as you type. Each result shows where the number sits between whole powers of the base, the same number in the other common bases, a step by step calculation, a graph of the log curve and a table of nearby powers. Decimals, negative exponents and scientific notation such as 3.2e−4 are accepted wherever the math allows them.

    Logarithm Formula and Change of Base

    log_b(x) = y ⇔ b^y = x log₁₀(1,000) = 3 because 10³ = 1,000 log_b(x) = ln(x) ÷ ln(b) log₃(50) = ln 50 ÷ ln 3 = 3.912023 ÷ 1.098612 ≈ 3.5609 Check: 3^3.5609 ≈ 50

    The change of base formula works with any helper base, so log₁₀(50) ÷ log₁₀(3) = 1.698970 ÷ 0.477121 ≈ 3.5609 gives the same answer. This calculator uses Math.log10 and Math.log2 directly for bases 10 and 2, and the natural log ratio for every other base.

    Antilog and Unknown Base Formulas

    Antilog: x = b^y 10^2.5 = e^(2.5 × 2.302585) = e^5.756463 ≈ 316.227766 Unknown base: b = x^(1/y) b⁴ = 81 → b = 81^(1/4) = 81^0.25 = 3 Check: 3⁴ = 3 × 3 × 3 × 3 = 81

    An antilog is the inverse of a logarithm. The antilog of 2.5 in base 10 is about 316.23, and log₁₀(316.23) returns 2.5. Finding the base needs a nonzero exponent, because b⁰ = 1 for every base.

    How to Calculate a Log Manually

    You can find most common logarithms by hand with four remembered values: log₁₀ 2 ≈ 0.30103, log₁₀ 3 ≈ 0.47712, log₁₀ 5 ≈ 0.69897 and log₁₀ 7 ≈ 0.84510. The method below finds log₁₀(250) step by step.

    1. Write the number in scientific notation. 250 = 2.5 × 10².
    2. Split with the product rule. log₁₀(250) = log₁₀(2.5) + log₁₀(10²) = log₁₀(2.5) + 2.
    3. Build the small part from known logs. 2.5 = 10 ÷ 4, so log₁₀(2.5) = 1 − 2 × 0.30103 = 0.39794.
    4. Add the parts. log₁₀(250) = 2 + 0.39794 = 2.39794, which matches the calculator.

    The whole number 2 is called the characteristic and the decimal 0.39794 is the mantissa. Printed log tables list only mantissas, because moving the decimal point in x changes only the characteristic. For example, log₁₀(0.025) = 0.39794 − 2 = −1.60206.

    To get a natural log by hand, multiply the common log by ln 10 ≈ 2.302585. For 250 that gives 2.397940 × 2.302585 ≈ 5.521461, the value of ln(250).

    Common Logarithm Values Table

    Values below are rounded to four decimal places. Logs of numbers between 0 and 1 are negative, the log of 1 is 0 in every base, and the log of the base itself is always 1.

    xlog₁₀ xln xlog₂ x
    0.5−0.3010−0.6931−1
    1000
    20.30100.69311
    30.47711.09861.5850
    50.69901.60942.3219
    1012.30263.3219
    501.69903.91205.6439
    10024.60526.6439
    1,00036.90789.9658

    Logarithm Rules with Examples

    RuleFormulaExample
    Productlog(xy) = log x + log ylog₁₀(2 × 5) = 0.30103 + 0.69897 = 1
    Quotientlog(x ÷ y) = log x − log ylog₂(64 ÷ 4) = 6 − 2 = 4
    Powerlog(xⁿ) = n log xlog₂(8³) = 3 × 3 = 9
    Rootlog(ⁿ√x) = (log x) ÷ nlog₁₀(√1,000) = 3 ÷ 2 = 1.5
    Log of 1log_b(1) = 0ln(1) = 0
    Log of the baselog_b(b) = 1log₇(7) = 1
    Inverseb^(log_b x) = x10^(log₁₀ 42) = 42
    Swap baselog_b(x) = 1 ÷ log_x(b)log₂(8) = 3, so log₈(2) = 1/3

    There is no rule for the log of a sum. log(x + y) is not log x + log y, a mistake covered below.

    Where Logarithms Are Used

    pH in chemistry

    pH is the negative base 10 log of the hydronium ion concentration in moles per litre: pH = −log₁₀[H₃O⁺]. A concentration of 3.2 × 10⁻⁴ M gives pH = −log₁₀(3.2 × 10⁻⁴) ≈ 3.49. Going the other way is an antilog: pH 7.3 means [H₃O⁺] = 10^−7.3 ≈ 5.0 × 10⁻⁸ M.

    Decibels in sound

    Sound intensity level is β = 10 log₁₀(I ÷ I₀), with I₀ = 10⁻¹² W/m². A sound 1,000 times the reference intensity is 10 × log₁₀(1,000) = 30 dB. Each factor of 10 in intensity adds 10 dB, and doubling the intensity adds 10 × log₁₀ 2 ≈ 3 dB.

    Earthquake magnitude

    The USGS explains that each whole number step in magnitude is a tenfold increase in measured wave amplitude and about 32 times more energy. A magnitude 6 earthquake therefore has 10² = 100 times the amplitude of a magnitude 4, and about 32 × 32 ≈ 1,000 times the energy.

    Growth, doubling and computing

    Logs solve for time in growth problems. Money growing at 7% a year doubles in ln 2 ÷ ln 1.07 ≈ 10.24 years. In computing, a positive whole number x needs floor(log₂ x) + 1 bits, so 250 needs 8 bits, and 2¹⁰⁰ has floor(100 × log₁₀ 2) + 1 = 31 digits.

    Natural Log vs Common Log

    Both measure the same thing on different scales, and they differ only by a constant factor: ln x = 2.302585 × log₁₀ x, and log₁₀ x = 0.434294 × ln x.

    • Use log₁₀ for scales built on powers of ten: pH, decibels, magnitudes, significant digits and scientific notation.
    • Use ln for continuous growth and decay, calculus and statistics, because the derivative of ln x is 1 ÷ x.
    • Use log₂ for bits, binary search steps and anything that doubles or halves.

    Spreadsheets use LOG10 and LN, and LOG(x, b) for other bases. Many programming languages use log for the natural log.

    Understanding Your Result

    A log above 0 means x is greater than 1. A log of exactly 0 means x = 1. A negative log means x lies between 0 and 1. With a base below 1, such as 0.5, these signs reverse because the curve falls instead of rising.

    The whole part of a base 10 log tells you the size of the number. For x of 1 or more, the whole part plus 1 is the number of digits before the decimal point. For x below 1, the whole part shows how many places the first nonzero digit sits after the decimal point.

    Each increase of 1 in the log multiplies x by the base. That is why log scales show ratios as equal steps.

    Common Mistakes

    • Mixing up log and ln. log₁₀(20) ≈ 1.3010 while ln(20) ≈ 2.9957. Check which base your textbook or software uses.
    • Splitting the log of a sum. log₁₀(2 + 8) = log₁₀(10) = 1, but log₁₀ 2 + log₁₀ 8 = 0.30103 + 0.90309 = 1.20412, which is log₁₀(16).
    • Dividing inside the log. log(x) ÷ log(b) is the change of base formula, not log(x ÷ b). log₁₀(1,000) ÷ log₁₀(10) = 3, while log₁₀(100) = 2.
    • Taking the log of 0 or a negative number. Neither has a real logarithm. The calculator shows a message instead of a misleading value.
    • Rounding too early. Using ln 3 ≈ 1.1 gives log₃(50) ≈ 3.912 ÷ 1.1 = 3.5564 instead of 3.5609. Keep at least six digits until the last step.
    • Choosing base 1. 1 raised to any power is 1, so base 1 cannot produce any other number.

    Related Calculations

    Logarithms and exponents are inverse operations, so the Exponent Calculator checks any log result: raise the base to the log and you get the original number. The Scientific Calculator has log, ln and power keys for longer expressions.

    Growth problems often end in a logarithm. The Compound Interest Calculator shows how balances grow, and the time to reach a target equals ln(target ÷ start) ÷ ln(1 + rate). The Half Life Calculator uses base 2: an amount that falls from 80 to 10 has gone through log₂(80 ÷ 10) = 3 half lives.

    Frequently Asked Questions

    How do you calculate log base 2?

    Use the change of base formula: log₂(x) = ln(x) ÷ ln(2), or log₁₀(x) ÷ log₁₀(2). For x = 250, ln(250) = 5.521461 and ln(2) = 0.693147, so log₂(250) = 5.521461 ÷ 0.693147 ≈ 7.9658. This means 2 raised to the power 7.9658 is about 250. Exact powers of 2 give whole numbers: log₂(1024) = 10 because 2¹⁰ = 1024. In computing, the whole part of log₂(x) plus 1 gives the number of bits needed to write a positive whole number in binary, so 250 needs 8 bits.

    What is the difference between log and ln?

    On most calculators, log means the common logarithm with base 10 and ln means the natural logarithm with base e, which is about 2.718282. Both ask which power of the base gives the number: log₁₀(100) = 2 because 10² = 100, and ln(100) ≈ 4.60517 because e raised to 4.60517 is about 100. The two differ by a constant factor: ln(x) = 2.302585 × log₁₀(x). Many higher math and programming texts write log for the natural log, so check the convention. pH and decibels use base 10, while growth, decay and calculus use base e.

    Why is the log of 0 or a negative number undefined?

    A logarithm asks which power of a positive base gives the number. A positive base raised to any real power always gives a positive result, so no real exponent can produce 0 or a negative number. As x moves toward 0 from above, log₁₀(x) falls without limit: log₁₀(0.001) = −3 and log₁₀(0.000001) = −6, so the log of 0 has no finite value. Negative numbers have logarithms only in the complex numbers, which this calculator does not use. The base must also be positive and not equal to 1, because 1 raised to any power is still 1.

    How do you find the antilog of a number?

    The antilog reverses a logarithm: if log_b(x) = y, then x = b raised to the power y. For a common log, the antilog of y is 10 to the power y, so the antilog of 2.5 is 10^2.5 ≈ 316.227766. For a natural log, the antilog of y is e to the power y, so the antilog of 3 is e³ ≈ 20.085537. Chemistry uses this to turn pH back into a concentration: a pH of 7.3 corresponds to a hydronium concentration of 10^−7.3 ≈ 5.0 × 10⁻⁸ mol per litre. Choose Find number in the calculator to compute any antilog.

    What is the change of base formula for logarithms?

    The change of base formula is log_b(x) = log_k(x) ÷ log_k(b), where k is any convenient positive base other than 1, usually 10 or e. It finds a logarithm in any base with a calculator that has only log and ln keys. For example, log₃(50) = ln(50) ÷ ln(3) = 3.912023 ÷ 1.098612 ≈ 3.5609. Base 10 gives the same answer: 1.698970 ÷ 0.477121 ≈ 3.5609. This calculator uses the natural log version for custom bases and shows every step with your own numbers.

    Sources & References

    • NIST Digital Library of Mathematical Functions. §4.2 Definitions: Logarithm, Exponential, Powers (change of base, ln 10, log₁₀ e). dlmf.nist.gov/4.2
    • OpenStax. College Algebra 2e, 6.3 Logarithmic Functions. openstax.org
    • OpenStax. College Algebra 2e, 6.5 Logarithmic Properties. openstax.org
    • OpenStax. Chemistry 2e, 14.2 pH and pOH. openstax.org
    • OpenStax. College Physics 2e, 17.3 Sound Intensity and Sound Level. openstax.org
    • U.S. Geological Survey. Earthquake Magnitude, Energy Release, and Shaking Intensity. usgs.gov

    Results are for educational purposes. Every worked number on this page was recomputed with the same functions the calculator uses. Methodology reviewed: 2026.