My Calculator

Log Calculator

Calculate logarithms in any base — including natural log (ln) and common log (log₁₀) — with a full step-by-step solution and a diagram that shows every value.

The value must be greater than 0, and the base must be positive and not equal to 1.

Result

3

log₁₀(1000) = 3

Logarithm Diagram

log101000=3

Exponential form (verification)

10^3=1000

Step-by-Step Solution

Here's exactly how this answer was calculated, one step at a time.

  1. 1

    Set up the logarithm

    log₁₀(1000) = y

    This asks: "10 raised to what power gives 1000?" — that unknown power is y.

  2. 2

    Evaluate log₁₀(1000)

    log₁₀(1000) = 3

    The common logarithm (log base 10) is evaluated directly.

  3. 3

    Verify using the exponential form

    10^3 ≈ 1000

    A logarithm and an exponent are inverse operations, so raising the base back to the power of the result should return you to the original number: 1000.

Final Answer: log₁₀(1000) = 3

Free Online Log Calculator

This log calculator is a free online tool that instantly calculates the logarithm of any positive number in any valid base — including the common logarithm (log base 10) and the natural logarithm (ln, base e) — and also works in reverse as an antilog calculator. Enter a value and a base, or switch to Antilog mode to find the number a given logarithm came from, and the calculator returns the exact answer along with a complete step-by-step solution and a diagram that shows the base, argument, and result together, so you can see exactly how the answer was reached.

Whether you're a student learning logarithm rules for the first time, checking algebra or pre-calculus homework, working through a chemistry pH calculation, an engineering decibel or Richter-scale problem, or a finance question involving exponential growth, this calculator handles any base you type in — 10, e, 2, or any custom number — and explains the result in plain language, with the domain restrictions clearly checked so you're never left staring at a wrong answer.

What Is a Logarithm?

A logarithm answers the question: "What power do I need to raise this base to, in order to get this number?" It's the inverse operation of exponentiation. If bʸ = x, then the logarithm of x to the base b is y, written log_b(x) = y. For example, since 10³ = 1000, the logarithm of 1000 to base 10 is 3, written log₁₀(1000) = 3. Logarithms turn multiplication into addition and exponents into multiplication, which is exactly why they were originally invented — to make large calculations easier before electronic calculators existed — and why they remain essential in science, engineering, and computing today.

Two logarithm bases come up so often that they get their own shorthand: the common logarithm uses base 10 and is written log(x) or log₁₀(x), while the natural logarithm uses base e (Euler's number, approximately 2.71828) and is written ln(x). This calculator supports both, along with any other base you need.

Logarithm Formula and Core Rules

The core logarithm rules used by this calculator are:

  • Definition: log_b(x) = y is equivalent to bʸ = x — a logarithm and an exponent are inverse operations.
  • Change of base formula: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b) — lets you compute any base using natural or common log.
  • Product rule: log_b(m × n) = log_b(m) + log_b(n) — the log of a product is the sum of the logs.
  • Quotient rule: log_b(m ÷ n) = log_b(m) − log_b(n) — the log of a quotient is the difference of the logs.
  • Power rule: log_b(mⁿ) = n × log_b(m) — an exponent inside a log becomes a multiplier outside it.
  • log_b(1) = 0 for any valid base, since b⁰ = 1.
  • log_b(b) = 1 for any valid base, since b¹ = b.

How to Calculate a Logarithm — Step by Step

Worked example: calculate log₁₀(1000).

  • Step 1: Set up the question: 10 raised to what power gives 1000?
  • Step 2: Recognize that 10³ = 10 × 10 × 10 = 1000.
  • Step 3: Since the exponent that works is 3, the logarithm is 3.
  • Step 4: The final answer is log₁₀(1000) = 3.
  • Step 5: Verify using the exponential form: 10³ = 1000 ✓.

How to Calculate a Logarithm in an Unusual Base

Most calculators (and this one) only compute natural log and common log directly, so any other base uses the change-of-base formula. Worked example: calculate log₅(125).

  • Step 1: Apply the change-of-base formula: log₅(125) = ln(125) / ln(5).
  • Step 2: Evaluate each natural log: ln(125) ≈ 4.828 and ln(5) ≈ 1.609.
  • Step 3: Divide: 4.828 / 1.609 = 3.
  • Step 4: The final answer is log₅(125) = 3, which checks out since 5³ = 125.

Natural Log (ln) vs. Common Log (log₁₀)

The natural logarithm, written ln(x), uses base e (approximately 2.71828), a special mathematical constant that arises naturally in calculus, continuous growth, and compound interest problems — it's the base for which the exponential function eˣ is its own derivative, which is why it shows up throughout calculus, physics, and engineering. The common logarithm, written log(x) or log₁₀(x), uses base 10 and is especially convenient for measuring quantities that span many orders of magnitude, such as pH, sound intensity (decibels), and earthquake magnitude (the Richter scale), because each whole step in the log corresponds to a 10x change in the underlying quantity.

Both are logarithms in the same family and follow the same rules — they're just built on different bases, chosen because each is the most natural fit for a particular kind of problem.

What Is an Antilog?

An antilog (short for "anti-logarithm") is the reverse of a logarithm — instead of asking what power gives a number, it asks what number results from raising a base to a given power. If log_b(x) = y, then the antilog is x = bʸ. In practical terms, if you know a logarithm value and want to recover the original number it came from, the antilog does exactly that. This calculator's Antilog mode takes a base and a logarithm value and computes x = bʸ directly, with the same step-by-step breakdown as the forward logarithm calculation.

Understanding the Log Diagram

The diagram on this page turns the logarithm into a picture with real, labeled values, so it explains itself without extra reading. The base appears as a small subscript-style box next to the word "log," the argument (the number you're taking the log of) appears in an indigo box, and the result appears in a green box — or a gray box labeled "undefined" if the value or base falls outside the domain a logarithm allows.

Below the main diagram, a second row shows the exponential form of the same relationship — base raised to the power of the result equals the original argument — so you can visually confirm the answer by seeing both directions of the log-exponent relationship side by side. The Antilog mode mirrors this, showing the exponential calculation first and its equivalent logarithmic form as a verification row underneath.

Why Some Logarithms Are Undefined

A logarithm log_b(x) is only defined when x is greater than 0 and the base b is a positive number other than 1. There's no real power you can raise a positive base to that produces zero or a negative number, so the logarithm of zero or a negative number is undefined. Similarly, a base of 1 doesn't work because 1 raised to any power always equals 1, so there's no unique answer, and a base of 0 or a negative base creates its own inconsistencies. This calculator checks these domain restrictions automatically and clearly labels an invalid input as undefined, both in the result and in the diagram, rather than returning a misleading number.

Real-Life Uses of Logarithms

Logarithms show up constantly in science, engineering, and everyday measurement scales. The pH scale in chemistry is a base-10 logarithmic measure of hydrogen ion concentration, where each whole number represents a tenfold change in acidity. The decibel scale for sound intensity and the Richter scale for earthquake magnitude are both logarithmic, which is why a magnitude 6 earthquake releases roughly 32 times more energy than a magnitude 5 one, not just slightly more. In finance, logarithms are used to solve for the time needed for an investment to grow to a target value under compound interest, since the exponent (time) has to be isolated using a logarithm. In computer science, logarithms describe the efficiency of algorithms like binary search — an algorithm with O(log n) complexity barely slows down even as the amount of data grows enormously. In biology, population growth and decay models, and in astronomy, the magnitude scale for star brightness, both rely on logarithmic math as well.

Because this calculator supports any base — common log, natural log, or a custom base — along with a full antilog mode, it's a dependable tool for chemistry, physics, and finance coursework, engineering calculations, and any problem that involves exponential growth or decay.

Common Mistakes When Working With Logarithms

A frequent mistake is trying to take the logarithm of zero or a negative number, which has no real answer — always check that the value you're taking the log of is positive first. Another common error is mixing up the product and power rules — remember that log_b(m × n) equals log_b(m) + log_b(n), not the product of the two logs, and that an exponent inside a log (like log_b(m²)) becomes a multiplier outside the log (2 × log_b(m)), not something you plug in directly. People sometimes also forget that log(1) always equals 0 regardless of the base, and that a logarithm's base can never be 1, since 1 raised to any power always stays 1. When switching between bases, forgetting to apply the change-of-base formula correctly (dividing, not subtracting or multiplying the two logs) is another common slip. This calculator's step-by-step breakdown is designed to make each of these rules explicit as they're applied.

Why Use This Log Calculator?

This tool combines a full logarithm calculator and an antilog (inverse log) calculator in one place, with support for common log, natural log, and any custom base, a complete step-by-step breakdown for every calculation, and a diagram that visually shows the base, argument, and result together so the relationship is clear at a glance. Whether you're learning logarithm rules for the first time, double-checking a chemistry or algebra problem, or need a dependable answer for a real-world exponential or logarithmic calculation, this calculator gives you an accurate result and a clear explanation every time.

Frequently Asked Questions

How do you calculate a logarithm?

A logarithm log_b(x) asks what power the base b must be raised to, to get x. For example, log₁₀(1000) = 3, because 10³ = 1000. For bases other than 10 or e, use the change-of-base formula: log_b(x) = ln(x) / ln(b).

What is the difference between log and ln?

"log" (without a subscript) usually refers to the common logarithm, base 10, while "ln" refers to the natural logarithm, base e (approximately 2.71828). Both follow the same logarithm rules — they simply use different bases.

What is an antilog?

An antilog is the reverse of a logarithm: given a logarithm value y and a base b, the antilog finds x such that log_b(x) = y, calculated as x = bʸ. It's the exponential form of a logarithmic equation.

Why is the logarithm of a negative number undefined?

Because no real power of a positive base ever produces a negative result — raising a positive number to any real exponent always gives a positive result, so there's no real-number answer for the logarithm of zero or a negative number.

What is log(1) equal to?

log_b(1) always equals 0, for any valid base b, because any base raised to the power of 0 equals 1 (b⁰ = 1).

How do you convert between different logarithm bases?

Use the change-of-base formula: log_b(x) = ln(x) / ln(b), or equivalently log_b(x) = log₁₀(x) / log₁₀(b). This lets you compute a logarithm in any base using only natural log or common log.