🇺🇸 USC
Math & Conversion
📐

Logarithm Calculator

Compute log base 10, natural log (ln) and the log of any base

📐 Logarithm inputs

🔢 Result

log10(1,000)
3
Common log · log10(x)
3
Natural log · ln(x) = loge(x)
6.907755
Binary log · log2(x)
9.965784

🧮 Step by step (change of base)

1. Take the natural log of x: ln(1,000)6.907755
2. Take the natural log of the base: ln(10)2.302585
3. Divide: ln(x) ÷ ln(b)3
Check: 103 = 1,000 (≈ x). Raising the base to the result returns x, which confirms the logarithm.

📋 logb(1,000) for common bases

Base bNotationResult
2log₂(x)9.965784
2.7183ln(x)6.907755
10log₁₀(x)3

📘 The logarithm rules

Product rule
logb(x · y) = logb(x) + logb(y)

The log of a product is the sum of the logs.

Quotient rule
logb(x ÷ y) = logb(x) − logb(y)

The log of a quotient is the difference of the logs.

Power rule
logb(xk) = k · logb(x)

An exponent inside the log comes out as a factor.

Change of base
logb(x) = ln(x) ÷ ln(b) = log10(x) ÷ log10(b)

This is the rule this calculator uses for any base.

Results use the change-of-base identity logb(x) = ln(x) ÷ ln(b) and are rounded for display. Logarithms are defined only for x > 0 and a base b > 0, b ≠ 1.

Last updated June 2026

Method: Every result uses the exact change-of-base identity logb(x) = ln(x) ÷ ln(b). Logarithms are defined only for x > 0 and a base b > 0 with b ≠ 1; other inputs return a clear message instead of a wrong number.

Included: Common log (base 10), natural log (ln, base e), binary log (base 2), the log of any custom base, step-by-step working, a reverse check, and the product, quotient, power and change-of-base rules.

Not included: Complex logarithms of negative numbers, multi-valued (complex) results, and symbolic algebra. Displayed values are rounded for readability.

Logarithm calculator: everything you need to know

A logarithm answers a single, very practical question: to what power must I raise the base to get this number? Ask "10 to the power of what equals 1,000?" and the answer is 3, because 10 × 10 × 10 = 1,000. Written as a logarithm, that is log10(1000) = 3. This logarithm calculator works that out for any base in an instant - common log (base 10), natural log (ln, base e), binary log (base 2), or a base you type in yourself - and shows the working so you can see exactly where the answer comes from.

The definition and the formula

Formally, the logarithm is the inverse of exponentiation. The statement on the left below means exactly the same thing as the statement on the right:

logb(x) = y  ⇔  by = x

To evaluate a log in any base, the calculator uses the change-of-base formula, which rewrites the log in terms of natural logarithms (or base-10 logs) that a computer can compute directly:

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

Here x is the value (it must be greater than 0), b is the base (it must be greater than 0 and not equal to 1), and ln is the natural logarithm, log base e, where e ≈ 2.71828.

A worked example

Suppose you want log2(50) - "how many times must I double to reach 50?". Plug into change of base: ln(50) ≈ 3.91202 and ln(2) ≈ 0.69315, so log2(50) = 3.91202 ÷ 0.69315 ≈ 5.6439. That makes sense: 25 = 32 (too small) and 26 = 64 (too big), so the answer sits between 5 and 6. To check, raise the base back to the result: 25.6439 ≈ 50. The reverse calculation returning your original value is the proof that the logarithm is correct.

How to use this logarithm calculator

  1. Enter the value (x). This is the number you want the logarithm of. It must be positive - logarithms of zero or negative numbers are undefined in the real numbers.
  2. Enter the base (b). The default is 10 (the common log). Use the quick buttons for base 2, base 10, or base e, or type any positive base except 1.
  3. Read the result instantly. The big number is logb(x) for your chosen base. Below it you always get the common log, natural log, and binary log of the same value side by side.
  4. Follow the steps. The "step by step" card shows ln(x), ln(b), and their quotient, then verifies the answer by raising the base back to the result.

Everything recalculates as you type - there is no submit button to press.

Common log, natural log and binary log

Three bases come up far more than any other, so the calculator always shows all three:

  • Common logarithm, log10. Often written just "log". It underpins scientific notation, the decibel scale, the Richter scale, and pH in chemistry. log10(1000) = 3 simply counts the zeros.
  • Natural logarithm, ln = loge. The default of calculus and continuous growth. ln(e) = 1, and the derivative of ln(x) is 1/x.
  • Binary logarithm, log2. The currency of computer science: it counts doublings, bits, and the depth of binary search.

The logarithm rules

Three identities turn complicated expressions into simple arithmetic. They are the reason logarithms were invented - they convert multiplication into addition.

  • Product rule: logb(x · y) = logb(x) + logb(y). Example: log10(100) = log10(10 · 10) = 1 + 1 = 2.
  • Quotient rule: logb(x ÷ y) = logb(x) − logb(y). Example: log2(8/2) = log2(8) − log2(2) = 3 − 1 = 2.
  • Power rule: logb(xk) = k · logb(x). Example: log10(1000) = log10(103) = 3 · 1 = 3.

Two anchor identities follow directly from the definition: logb(1) = 0 (any base to the power 0 is 1) and logb(b) = 1 (the base to the first power is itself).

Key terms explained

  • Base (b): the number being repeatedly multiplied. Logarithms "ask" how many of these multiplications are needed.
  • Argument (x): the value inside the log - the target you are trying to reach. It must be positive.
  • e: Euler's number, ≈ 2.71828, the base of the natural logarithm and continuous growth.
  • Mantissa & characteristic: the fractional and integer parts of a base-10 log. In log10(500) ≈ 2.699, the characteristic 2 tells you the number has 3 digits.
  • Antilogarithm: the inverse operation - raising the base to a log value to recover x. b(logb x) = x.

More worked examples

Example 1 - common log of a non-round number. log10(500) = ln(500) ÷ ln(10) = 6.21461 ÷ 2.30259 ≈ 2.6990. The "2" says 500 has three digits; the ".699" places it between 100 (log 2) and 1000 (log 3).

Example 2 - natural log in growth. If an investment grows continuously and you want to know the time to double, you solve ert = 2, giving t = ln(2) ÷ r. Since ln(2) ≈ 0.6931, at a 5% continuous rate the doubling time is 0.6931 ÷ 0.05 ≈ 13.9 years - the math behind the "rule of 70".

Example 3 - a fractional base. log0.5(8) = ln(8) ÷ ln(0.5) = 2.07944 ÷ (−0.69315) = −3. A base below 1 gives a decreasing log, so the result is negative: you must halve three times to go from 8 down to 1.

Quick reference table

Some logarithm values are worth recognizing on sight. Notice how log10 of a power of ten is just the number of zeros.

x log10(x) ln(x) log2(x)
1000
20.301030.693151
e ≈ 2.718280.4342911.44270
80.903092.079443
1012.302593.32193
10024.605176.64386
100036.907769.96578

Who this calculator is for

  • Students checking algebra, pre-calculus, or calculus homework and learning the change-of-base method.
  • Computer-science learners who need log2 for algorithm complexity, bits, or tree depth.
  • Scientists and engineers working with decibels, pH, the Richter scale, or half-life and decay.
  • Finance and data folks using natural logs for continuous growth, log returns, and log-scale charts.
  • Anyone who just needs a quick, trustworthy log of a number in a specific base.

Where logarithms show up in the real world

Logarithms compress huge ranges into manageable scales. Earthquake magnitude (Richter), sound intensity (decibels), and acidity (pH) are all base-10 logarithmic, so each step of 1 means a tenfold change. In finance, "log returns" use the natural log because they add up neatly over time. In computing, log2 describes how many comparisons a binary search needs. And the slide rule - the engineer's tool for centuries - worked purely by turning multiplication into the addition of logarithmic distances.

Tips for working with logarithms

  • Estimate first. For log10, count digits: a 4-digit number has a log between 3 and 4. This catches typos instantly.
  • Memorize log10(2) ≈ 0.301 and log10(3) ≈ 0.477. With the product and power rules you can mentally approximate many other logs.
  • Use ln(2) ≈ 0.693 for doubling-time problems - it powers the rule of 70/72.
  • Remember the inverse. If a log result looks off, exponentiate it; the base raised to the answer should return your original number.

Related concepts and calculators

Logarithms sit inside a small family of operations. If your question is slightly different, a sister tool fits better:

  • To go the other way and raise a number to a power, use the Exponent Calculator.
  • For square and other roots, the Square Root Calculator handles the radical case.
  • For a full keypad with sin, cos, log and ln buttons, use the Scientific Calculator.
  • For percentages, growth rates, and everyday math, see the Percentage Calculator and Average Calculator.

⚠️ Common mistakes & edge cases

Taking the log of zero or a negative number

log(0) and log of any negative value are undefined in the real numbers, because a positive base can never be raised to a power that yields zero or a negative result. As x → 0⁺, log(x) heads to −∞. The calculator flags these inputs instead of guessing.

Confusing "log" (base 10) with "ln" (base e)

On most calculators "log" means base 10 and "ln" means base e. Using the wrong one is a classic error - log10(100) = 2 but ln(100) ≈ 4.605. Always confirm which base your problem expects.

Misapplying the rules to sums

log(x + y) is not log(x) + log(y). The product rule applies to multiplication, not addition. There is no simple rule for the log of a sum - that mix-up is one of the most common algebra slips.

Using a base of 1 (or 0)

The base cannot be 1, because 1 raised to any power is always 1 and can never reach a different x, so log base 1 is undefined. The base also cannot be 0 or negative. A positive fraction like 0.5 is fine and produces a decreasing (often negative) logarithm.

Note: Displayed results are rounded for readability. For exact symbolic answers (such as ln(2) kept as a symbol), use a computer-algebra system.

❓ Frequently asked questions

How do I calculate a logarithm with any base?

Use the change-of-base formula: log_b(x) = ln(x) / ln(b), where ln is the natural logarithm (base e). You can also use log base 10: log_b(x) = log10(x) / log10(b). This calculator applies the change-of-base rule, so you can enter any positive base (other than 1) and any positive value x and get an exact result.

What is the difference between log and ln?

By convention, 'log' written without a base usually means the common logarithm, log base 10. 'ln' is the natural logarithm, which is log base e (where e is approximately 2.71828). On most calculators the 'log' button is base 10 and the 'ln' button is base e. In higher mathematics and computer science, 'log' sometimes means base e or base 2, so always check the context.

Why is the logarithm of a negative number or zero undefined?

A logarithm answers the question 'to what power must the base be raised to get x?'. A positive base raised to any real power is always positive, so it can never equal zero or a negative number. As x approaches 0 from above, log(x) tends to negative infinity, and for x at or below 0 the real logarithm simply does not exist. That is why this calculator only accepts values greater than 0.

What is the natural logarithm (ln) used for?

The natural logarithm, ln(x) = log base e, appears anywhere continuous growth or decay occurs: compound interest, population models, radioactive decay, and the calculus of exponential functions. Its key property is that the derivative of ln(x) is 1/x, which makes it the natural choice in calculus and in solving equations of the form e^x = y, where x = ln(y).

What are the three main logarithm rules?

The product rule: log_b(x·y) = log_b(x) + log_b(y). The quotient rule: log_b(x/y) = log_b(x) − log_b(y). The power rule: log_b(x^k) = k·log_b(x). Together they let you expand or condense logarithmic expressions and turn multiplication and exponents into addition and multiplication, which is what made log tables so useful before electronic calculators.

What does log base 2 (the binary logarithm) mean?

log base 2 of x answers 'how many times must I double to reach x?'. log2(8) = 3 because 2×2×2 = 8. The binary logarithm is central to computer science: it measures the number of bits needed to represent a number and describes the running time of algorithms such as binary search and balanced-tree operations, which are O(log n) in base 2.

How do I check a logarithm answer?

Exponentiate. If log_b(x) = y, then b raised to the power y should give back x. For example, log10(1000) = 3, and 10^3 = 1000, which confirms it. This calculator shows that check automatically: it raises your base to the computed result and verifies it returns x.

Can the base of a logarithm be 1 or a fraction?

The base cannot be 1, because 1 raised to any power is always 1, so it can never equal a different value of x — log base 1 is undefined. The base can be a positive fraction such as 0.5, though. A base between 0 and 1 gives a decreasing logarithm: as x grows, log_0.5(x) becomes more negative. This calculator accepts any positive base except 1.

What is the logarithm of 1, and of the base itself?

log_b(1) = 0 for every valid base, because any non-zero number raised to the power 0 equals 1. And log_b(b) = 1, because the base raised to the first power is itself. These two identities are handy anchors: log10(1) = 0, ln(1) = 0, log2(2) = 1, and log10(10) = 1.

Are logarithms and exponents inverses of each other?

Yes. The logarithm is the inverse of exponentiation. If b^y = x, then log_b(x) = y, and vice versa. This is why log_b(b^k) = k and b^(log_b(x)) = x. Anytime you need to 'undo' an exponent and solve for the power, a logarithm is the tool, which is the basis for solving exponential equations.

💡 Good to know

Logarithms turn multiplication into addition

That single property is why they were invented in the 1600s and why slide rules worked. The product rule, log(x·y) = log(x) + log(y), let people multiply large numbers by adding their logs from a table.

The base matters - state it clearly

"log" can mean base 10, base e, or base 2 depending on the field. In math and finance it often means ln; in engineering, base 10; in computer science, base 2. When in doubt, write the base explicitly as logb.

Change of base unlocks every base

Your physical calculator may only have "log" and "ln" buttons, but with logb(x) = ln(x) ÷ ln(b) you can compute a log in any base from those two. This tool does it for you automatically.

Related Calculators