㏒ Logarithm Calculator

Calculate logarithm of any number to any base.

Calculate Now

What is Logarithm Calculator?

A logarithm answers a single question: what power do you need to raise a given base to, in order to get a specific number? It's the inverse operation of exponentiation — where powers multiply repeatedly, logarithms "undo" that multiplication and hand you back the exponent. This calculator computes the logarithm of any positive number to any base you specify, or the natural logarithm (base e) if you leave the base blank.

The Logarithm Formula (Change of Base)

When you want the natural log, the calculator simply returns ln(n). For any other base, it uses the change-of-base formula:

log_base(n) = ln(n) ÷ ln(base)

Worked Example

Find log base 10 of 1000 — in other words, "10 raised to what power gives 1000?"

log₁₀(1000) = ln(1000) ÷ ln(10) = 3

This checks out because 10³ = 1000.

Now find the natural log of e² (where e ≈ 2.71828, the base of natural logarithms):

ln(e²) = 2

This follows directly from the definition — the natural log of e raised to any power simply returns that power.

How to Use This Calculator

  1. Enter the number you want the logarithm of in the Number field.
  2. Enter the base in the Base field — or leave it blank for the natural log (base e).
  3. Click Calculate to see the result.
💡 Tip: Logarithms only accept positive numbers as input — there's no real power you can raise a positive base to that produces zero or a negative result, so entering 0 or a negative number won't give a valid answer.

Common Bases You'll Encounter

Base 10 (the "common logarithm") is used in fields like the Richter scale for earthquakes and the decibel scale for sound, since both describe quantities that vary across enormous ranges more conveniently on a compressed logarithmic scale. Base e (the "natural logarithm") turns up throughout calculus, compound growth, and probability, because e itself arises naturally from continuous growth processes. Base 2 is common in computer science, since doubling patterns govern memory addressing and algorithm complexity.

Since logarithms and exponents are inverse operations, our Power Calculator is a natural companion for checking your answer by working backward.

Key Logarithm Laws (JEE & Board Exam Essentials)

Three identities cover almost every logarithm question you'll meet in Indian school and competitive exams. The product rule says log(a×b) = log(a) + log(b), turning a multiplication inside a log into an addition outside it — for instance log(2×5) = log2 + log5. The quotient rule says log(a÷b) = log(a) − log(b), so log(100÷10) = log100 − log10 = 2 − 1 = 1, matching log10 = 1 directly. The power rule says log(aⁿ) = n×log(a), which is why log(1000) = log(10³) = 3×log(10) = 3×1 = 3 — exactly the answer this calculator returns for log₁₀(1000). A fourth useful fact, the change-of-base identity used internally by this tool, lets you compute any base's logarithm using only natural logs. These four rules are tested repeatedly in JEE Main, NDA, and board exam algebra sections, usually in problems that ask you to simplify a complex logarithmic expression before solving an equation.

Additional Worked Example

Simplify log₂(8) + log₂(4) using the product rule. Rather than computing each separately, combine first: log₂(8) + log₂(4) = log₂(8×4) = log₂(32). Since 2⁵ = 32, the answer is 5. Checking the long way: log₂(8) = 3 (because 2³=8) and log₂(4) = 2 (because 2²=4), and 3+2 = 5 — confirming the product rule works both ways. This kind of simplify-then-solve approach is exactly what's expected in most Indian board exam logarithm problems, where combining terms first is faster and less error-prone than evaluating each logarithm separately.

Where Logarithms Are Actually Used

Logarithms compress numbers that span an enormous range into a scale that's much easier to read and compare. The Richter scale for earthquake magnitude and the decibel scale for sound intensity are both logarithmic, which is why a magnitude 6 earthquake isn't twice as strong as a magnitude 3 — it's roughly a thousand times stronger, because each whole step represents a tenfold jump in underlying energy. In finance, logarithms are used to calculate compound annual growth rate (CAGR) and to model exponential growth or decay, such as inflation eroding purchasing power over time. Computer scientists use base-2 logarithms constantly to estimate the number of steps an efficient search or sorting algorithm needs, since many such algorithms scale with log₂(n). Chemistry students use base-10 logarithms to compute pH values, and biology and epidemiology researchers use natural logarithms to model population or disease growth curves.

Frequently Asked Questions

Q: What's the difference between a natural logarithm (ln) and a common logarithm (log base 10)?
A: A natural logarithm uses base e (≈2.71828) and shows up throughout calculus and continuous-growth formulas, while a common logarithm uses base 10 and is convenient for numbers built around powers of ten, like the Richter and pH scales. This calculator returns the natural log by default when you leave the base field blank, and any other base when you specify one.

Q: How does the change-of-base formula work, and why is it needed?
A: Most calculators and programming languages only have a built-in natural log function, so to find a logarithm in another base b, you compute ln(n) ÷ ln(b) instead. This works because of a core logarithm identity — dividing the natural logs of the number and the base always yields the same result as computing the logarithm directly in that base.

Q: Why can't I take the logarithm of zero or a negative number?
A: A logarithm answers "what power gives this result," but no real power of a positive base can ever produce zero or a negative number (positive bases raised to any real exponent always stay positive). This is why entering 0 or a negative value in the Number field won't return a valid, real-numbered answer.

Q: How do logarithms relate to exponents?
A: Logarithms and exponents are inverse operations of each other — if bˣ = n, then logᵦ(n) = x. This means you can always verify a logarithm result by raising the base to that answer using our Power Calculator and checking that it returns your original number.

Q: Why is log base 2 important in computer science?
A: Many efficient algorithms (like binary search) repeatedly cut a problem in half, and the number of times you can halve n before reaching 1 is exactly log₂(n). This is why algorithm complexity is so often expressed using log₂ — it directly measures how many "halving" steps a well-designed process needs.

📅 Last reviewed: July 2026 · Formulas verified against RBI/SEBI/IT Dept guidelines.