Log Calculator

log₍ᵦ₎(x) = ?
b > 0, b ≠ 1

—
log₁₀(x)
—
ln(x)
—
log₂(x)
—
log₍ᵦ₎(x)
—
Position on log scale
📐 Log Identity Explorer

What This Tool Does

This log calculator finds the logarithm of a number for any base — commonly base 10, base 2, or the natural base e — showing what power the base must be raised to in order to produce that number.

You can also use this Food Calorie Calculator.

How It's Calculated

By definition, log_a(x) = y means a^y = x. Calculators typically compute natural log (ln, base e) or common log (base 10) directly, so for any other base, the change-of-base formula is used:

log_a(x) = ln(x) ÷ ln(a) = log₁₀(x) ÷ log₁₀(a)

Worked example: Find log₅(50).

  • ln(50) ≈ 3.9120
  • ln(5) ≈ 1.6094
  • log₅(50) = 3.9120 ÷ 1.6094 ≈ 2.4307

Check: 5^2.4307 ≈ 5² × 5^0.4307 ≈ 25 × 2.0 ≈ 50 ✓

Edge Cases and Special Rules

  • Log of zero or a negative number is undefined: In real numbers, there's no power you can raise a positive base to that produces zero or a negative result — log approaches negative infinity as the input approaches zero from above.
  • The base can't be 1, 0, or negative: A base of 1 raised to any power always equals 1, so there's no unique solution; zero and negative bases cause other mathematical inconsistencies.
  • Log of 1 is always zero, regardless of base: Since any valid base raised to the power of 0 equals 1, log_a(1) = 0 for every valid base a.
  • "log" without a stated base is ambiguous: Depending on context, an unlabeled "log" can mean base 10, base e, or occasionally base 2 (common in computer science) — always check what a specific source means.

Natural Log vs. Common Log

These are the two most frequently used specific bases, each favored in different contexts. Natural log (ln, base e ≈ 2.71828) is common in finance, economics, and any context involving continuous growth or compounding, since e arises naturally from that kind of process. Common log (base 10, sometimes written lg) has historically been the standard for manual calculation using log tables, and remains the basis for several real-world logarithmic scales, including pH, decibels, and the Richter scale.

Who Uses This

  • Students learning logarithm rules and properties
  • Engineers and scientists working with logarithmic scales like pH, decibels, or the Richter scale
  • Competitive exam takers (such as CA Foundation candidates) who need to work with printed log tables under exam conditions where calculators aren't permitted
  • Programmers working with algorithms whose complexity is expressed in logarithmic terms

Log vs. Antilog

These are inverse operations. A logarithm finds the exponent needed to produce a given number from a base — "what power gives me this result?" An antilog does the reverse — given an exponent, it finds the original number by raising the base to that power. If log_a(x) = y, then the antilog of y (base a) is simply a^y = x, bringing you back to where you started.

FAQ

What is a logarithm?

The exponent a base must be raised to in order to produce a given number: log_a(x) = y means a^y = x.

What's the difference between log and ln?

"ln" specifically means natural log (base e); "log" can mean base 10, base e, or occasionally base 2, depending on context — always check the source's convention.

Can you take the log of a negative number?

No — logarithms of zero or negative numbers are undefined in real numbers.

How do I calculate a log with an arbitrary base?

Use the change-of-base formula: divide the natural log (or common log) of the number by the natural log (or common log) of the base.

Why do exams like CA Foundation still use log tables?

Some exam formats restrict calculator use, requiring log values to be looked up manually from printed tables instead.

Try It Above

Enter your number and base in the log calculator above to get the logarithm instantly. Results are for general calculation purposes only.