Built in Lahore, PakistanHow we check the math
Math

Logarithm Calculator

Find the logarithm of a number in any base, and see its natural log, base-10 and base-2 logs at the same time, with a check that reverses the answer.

Use 2.718281828 for the natural log, or 2 for binary.

3log base 10 of 1000

Check10^3 = 1,000
Natural log ln(x)6.907755279
log₁₀(x)3
log₂(x)9.9657842847

Change of base: log_b(x) = ln(x) ÷ ln(b).

How this calculator works

A logarithm answers the question "to what power do I raise the base to get this number?". log_b(x) = y means b^y = x. log₁₀(1,000) = 3 because 10³ = 1,000. The exponent and logarithm are inverse operations: whatever one does, the other undoes.

Three bases are so common they have their own names. Common log (log₁₀) is used in chemistry (pH), physics (decibels, Richter scale) and old-fashioned slide-rule arithmetic. Natural log (ln, base e ≈ 2.71828) is the default in calculus, growth and decay models, and compound-interest math. Binary log (log₂) is the default in computer science and information theory.

The change-of-base formula converts between bases: log_b(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b). This lets a calculator with only ln and log₁₀ buttons compute any logarithm. log₂(1,000) = ln(1,000) / ln(2) ≈ 6.9078 / 0.6931 ≈ 9.966.

Domain restrictions. Logs are defined only for positive x — no real power of a positive base produces zero or a negative number. The base b must be positive AND not equal to 1 (because 1 to any power is 1, so log₁ has no inverse). Trying log₁₀(−5), log₂(0) or log₁(7) all return "undefined".

Log rules turn multiplication into addition. log(xy) = log(x) + log(y). log(x/y) = log(x) − log(y). log(x^n) = n · log(x). Historically these rules are why log tables and slide rules let scientists multiply 10-digit numbers in seconds — slide the scales, add the lengths, read the product.

Everyday applications. Doubling time of money growing at interest rate r is ln(2) / ln(1 + r). At 7% annual, that is 0.6931 / 0.0677 ≈ 10.2 years — the rule-of-72 shortcut (72 / 7 ≈ 10.3) is an approximation of this. Half-life of a decaying quantity with rate k is ln(2) / k. Decibels add 10 × log₁₀ of the power ratio. pH = −log₁₀[H⁺] of the hydrogen-ion concentration.

Worked example

log base 10 of 1,000

  1. The question: 10 to what power gives 1,000?
  2. Answer: 3, because 10³ = 10 × 10 × 10 = 1,000.
  3. Check by reversing: 10³ = 1,000. ✓
  4. In other bases: ln(1,000) ≈ 6.9078; log₂(1,000) ≈ 9.966.
  5. Change-of-base check: log₂(1,000) = ln(1,000) / ln(2) = 6.9078 / 0.6931 ≈ 9.966. ✓

Common mistakes

  • log(a + b) is not log(a) + log(b). Logs turn PRODUCTS into sums, not sums into sums.
  • Dropping the base. "log(x) = 3" is ambiguous without saying which base — log₁₀, ln and log₂ all give different x.
  • Taking log of zero or a negative. Logs are undefined there; a calculator result of "−Infinity" for log(0) is a limit, not a value.

Limitations of this calculator

  • Returns real numbers only. Complex logarithms (for negative arguments) are not computed.
  • Floating-point precision is about 15 significant figures; for exact log-of-integer problems (log₂ of a power of 2, say) use integer arithmetic.
  • Base must be positive and not equal to 1. Logs with base 1 are undefined because 1^y is always 1.

For your specific situation, consult a tax professional or financial advisor.

Questions people ask

Where are logarithms used in real life?

pH in chemistry; decibels in sound and signal processing; the Richter and moment magnitude scales in seismology; stellar magnitude in astronomy; doubling time in finance; information in bits; and the time complexity of divide-and-conquer algorithms (binary search is O(log n), merge sort is O(n log n)). Any time something spans many orders of magnitude, a log scale is probably involved.

What are the log rules?

Three essentials: log(xy) = log x + log y (product rule), log(x/y) = log x − log y (quotient rule), log(x^n) = n · log x (power rule). From these follow: log(1) = 0 (any base), log_b(b) = 1, and change-of-base log_b(x) = log_c(x) / log_c(b).

How do I find how long money takes to double at a given interest rate?

Years to double = ln(2) ÷ ln(1 + r). At 7% annual, that is 0.6931 ÷ 0.0677 ≈ 10.2 years. The "rule of 72" shortcut (72 ÷ interest-rate-in-percent) approximates this and works well for rates between 4% and 15%: 72 / 7 ≈ 10.3 years.

Why is log of a negative number undefined?

For positive base b, b^y > 0 for every real y. So no real exponent gives a negative result; the inverse — logging a negative — has no real answer. Complex-number logarithms exist (and show up in electrical engineering), but the calculator only reports real-valued results.

What is the difference between log and ln?

A notation convention. "log" without a subscript usually means log₁₀ in engineering and introductory texts, and ln is written out separately for the natural log. In pure maths and physics, "log" alone often means natural log, with log₁₀ written explicitly. The calculator shows all three (log₂, log₁₀, ln) at once so there is no ambiguity.

Sources

Last reviewed October 2, 2026 · Last reviewed by Muhammad Ahmad on October 31, 2026