Skip to content

Math

Logarithm Calculator

Enter a positive number and a base. The calculator returns the logarithm, natural log, base 10 log, and base 2 log. The base must be positive and not equal to 1. If the number is 0 or negative, the real logarithm is undefined.

Updated 2026-11-12 Editorial estimate Calccc Editorial Team Free · No sign-up

Loading calculator…

What this calculator does

A logarithm answers a simple question: what power do I raise the base to in order to get this number? log10(100) is 2 because 10² = 100. log2(8) is 3 because 2³ = 8. The same operation appears in compound interest, pH, decibels, and computer science, which is why base 10, base 2, and the natural base e all matter.

How to use it

  1. Enter the number you want the logarithm of.
  2. Enter the base. Use 10 for common logs, 2 for binary logs, or e for natural logs.
  3. Read the main logarithm result.
  4. Use the secondary values for ln, log10, and log2.
  5. If the result is an error, check that the number is positive and the base is valid.

How it works

log_b(x) = ln(x) / ln(b), the change-of-base formula. ln(x) is the natural logarithm with base e. log10(x) = ln(x) / ln(10). log2(x) = ln(x) / ln(2). The domain is x > 0 and b > 0, b ≠ 1.

Example calculations

Example 1: log10(100)

log10(100) = 2. The natural log is about 4.60517 and log2 is about 6.643856.

Example 2: log2(8)

log2(8) = 3. The natural log is about 2.079442 and log10 is about 0.90309.

Example 3: log5(25)

log5(25) = 2. The natural log is about 3.218876 and log2 is about 4.643856.

What the result means

Logarithms turn multiplication into addition, which is why they appear in scales that span many orders of magnitude. A negative log means the number is between 0 and 1. A log of 0 means the original number was 1, regardless of base. If you need the antilog, raise the base to the result. For financial and scientific work, keep enough decimal places until the final rounding step.

Common mistakes

  • Using a negative or zero number as the input.
  • Using base 1, which makes the logarithm undefined.
  • Confusing log10 with ln.
  • Rounding intermediate values too early.
  • Forgetting that log(1) = 0 for every valid base.

Assumptions and limits

  • The input is a real number greater than 0.
  • The base is positive and not equal to 1.
  • Results are real, not complex.
  • The calculator uses floating-point arithmetic.
  • Displayed decimals are rounded.

Frequently asked questions

What is a logarithm?

A logarithm is the exponent you need to raise a base to produce a number. log10(100) = 2 because 10² = 100.

Why can't I take the log of a negative number?

In real numbers, a positive base raised to any power is positive. A negative input would require complex numbers.

What is the difference between ln and log?

ln uses base e. In many contexts, log without a subscript means base 10, but in mathematics and computer science it can mean base e or base 2.

How do I change the base?

Use log_b(x) = ln(x) / ln(b). That is the formula this calculator uses.

What is log base 1?

It is undefined. The base must be positive and not equal to 1.

How do I find the antilog?

Raise the base to the logarithm. If log10(x) = 2, then x = 10² = 100.

Sources

This calculator is an educational estimate and is not financial, medical, legal, or professional advice. Confirm important decisions with a qualified professional and the latest official sources.

2026 update

How to use the professional output

This page is not just a formula box. The result is designed to be checked, compared, and taken away.

  • Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
  • A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
  • Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.

The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.

Go deeper

Guides that explain the math

Logarithm: Base, Product Rule, and Scale
Math

Logarithm: Base, Product Rule, and Scale

A logarithm is an exponent in disguise. Learn the definition, the product, quotient and power rules, change of base, and why log scales compress huge ranges.

7 min read

Calccc Editorial Team · Updated 2026-11-12

Prepared by Calccc Editorial Team as an educational estimate. This page is not a licensed professional review and is not financial, medical, legal, or tax advice.

Editorial estimate prepared by the Calccc Editorial Team; not a licensed professional review.