Log Calculator – Any Base, ln, log₁₀ & log₂

A logarithm tells you what exponent is required to raise a base to a specific number. If b^y = x, then log_b(x) = y. Calculate log10, ln, log2, any valid base, and the reverse formulas in your browser.

Log calculator

Base, b

Examples

Result

Exact

log₁₀(1000) = 3

Because 10³ = 1000

Steps

  1. log₁₀(1000) = 3
  2. Exact integer result.
  3. Change of base:
  4. ln(1000) / ln(10)
  5. = 6.907755 / 2.302585
  6. = 3
  7. Because 10³ = 1000

The calculation stays in your browser. A shared link uses a URL hash, so it is not a separate page.

Advertisement

What Is a Logarithm?

A logarithm tells you the exponent. If b^y = x, then log_b(x) = y. The log calculator on this page evaluates that for any valid base, including log₁₀, ln, and log₂, and it can run the formula backwards.

How to Use the Log Calculator

  1. Choose Evaluate log, Solve for x, or Solve for base.
  2. Enter the argument and base, or the values you already know for a reverse solve.
  3. Use log10, ln, or log2, or type a custom base greater than 0 and not equal to 1.
  4. Read the result, the power check, and the change-of-base steps.

Logarithm Formula and Change of Base

Any log can be written with natural logs:

log_b(x) = ln(x) / ln(b)

The reverse formulas are the ones behind the other two modes:

x = b^y

b = x^(1/y)

y cannot be 0 when you are solving for the base. After you have a power to check, use the Exponent Calculator.

Log, ln, log₁₀ and log₂ Explained

  • log₁₀, the common log, counts powers of ten. log₁₀(1000) = 3.
  • ln is the natural log calculator preset, base e. ln(e) = 1 and ln(e²) = 2.
  • log₂ is the base-2 log. log₂(1024) = 10. There is no separate log base 2 page; the preset is on this calculator.
  • Custom base accepts any base greater than 0 except 1, including a base between 0 and 1.

Worked Logarithm Examples

Results from the same calculator used above.
ExampleResultCheck
log₁₀(1000)log₁₀(1000) = 310³ = 1000
ln(e²)ln(e²) = 2e² = e²
log₂(10)log₂(10) = 3.321928Approximate
log₃(81)log₃(81) = 43⁴ = 81
log₅(100)log₅(100) = 2.861353Approximate
log₁₀(0.01)log₁₀(0.01) = -210⁻² = 0.01

When Are Logarithms Used?

  • Exponential equations, where the unknown is in the exponent.
  • pH, which is a negative common log of hydrogen ion concentration.
  • Decibels, which compare intensity on a log scale.
  • Growth and decay, including doubling time and half-life.
  • Compound growth, where a log turns a power back into the number of periods.
  • Computer science, where log₂ counts how many times a quantity doubles or how deep a binary search goes.
  • Other logarithmic scales, such as earthquake magnitude and sound level.

Roots are the matching inverse for a known exponent. Use the Square Root Calculator for square, cube, and nth roots, or the Scientific Calculator when you also need trig or a full keypad.

Logarithm Rules and Common Mistakes

  • Product rule: log(xy) = log(x) + log(y), same base.
  • Quotient rule: log(x/y) = log(x) − log(y).
  • Power rule: log(x^n) = n · log(x). That is why ln(e²) = 2.
  • Change of base: log_b(x) = ln(x) / ln(b). Any valid base works in that formula.
  • log_b(1) = 0, because b^0 = 1.
  • log_b(b) = 1, because b^1 = b.
  • log(0) is undefined. No real power equals 0.
  • A negative argument is not a real logarithm.
  • log(a + b) is not log(a) + log(b).
  • ln and log are not the same key. ln is base e. Unmarked log often means base 10.
  • Base 1 is invalid. A base between 0 and 1 is valid.

Frequently Asked Questions

What is a logarithm?

A logarithm is the exponent that turns a base into a number. If b^y = x, then log_b(x) = y. log₁₀(1000) = 3 because 10³ = 1000.

How do I calculate a logarithm?

Enter the argument and the base. This calculator divides ln(x) by ln(b), which is the change-of-base formula, and shows that division with the result.

What is the logarithm formula?

log_b(x) = ln(x) / ln(b). To undo it, x = b^y. To find the base from the argument and the result, b = x^(1/y).

How do I calculate a log with any base?

Choose Custom and enter a base greater than 0, other than 1. A base between 0 and 1 is allowed. For example, 0.5² = 0.25, so the log base 0.5 of 0.25 is 2.

What is the difference between log and ln?

On many calculators, log means the common log, base 10. ln means the natural log, base e. This page keeps those labels separate and also includes log₂.

What is log base 10?

log₁₀ is the common logarithm. log₁₀(1000) = 3 and log₁₀(0.01) = −2. It counts powers of ten, which is why it shows up in pH and decibels.

What is log base 2?

log₂ counts powers of two. log₂(8) = 3 and log₂(1024) = 10. It is the logarithm used for binary scales and for questions about doubling.

Can a logarithm be negative?

Yes. The result is negative when a base greater than 1 is raised to a negative power. log₁₀(0.01) = −2 because 10⁻² = 0.01. The argument itself must still be positive.

Why is log(0) undefined?

No real power of a valid base equals 0. The calculator stops and explains that the argument must be greater than 0.

Can the base be between 0 and 1?

Yes. A base such as 1/2 is valid. Base 1 is the case that is undefined, because every power of 1 equals 1.

How do logarithms solve exponential equations?

A logarithm undoes an exponent. If 10^y = 1000, then y = log₁₀(1000) = 3. Solve for x uses x = b^y. Solve for base uses b = x^(1/y), and the exponent cannot be 0.

How accurate is this calculator?

When the result is a whole number, the calculator checks it by raising the base back to that integer. Other results are ordinary floating-point approximations, shown to 6 decimal places, together with the change-of-base steps. It does not use a separate high-precision math library.