Logarithm Calculator

A logarithm answers the question “what power do I raise the base to in order to get this number?” Since 10² = 100, log₁₀(100) = 2. This calculator finds a logarithm to any positive base other than 1 and shows the common log, natural log and binary log side by side.

How to use the logarithm calculator

  1. Enter the number x, which must be greater than 0.
  2. Enter the base b (10 for common logs, 2 for binary logs).
  3. Read log_b(x), then check the steps to see the change-of-base formula and a verification.

Formula

logb(x) = ln(x) ÷ ln(b). Key rules: log(xy) = log x + log y; log(x/y) = log x − log y; log(xn) = n·log x; logb(b) = 1; logb(1) = 0.

Worked examples

Base 2

log₂(8) = 3 because 2³ = 8. The tool checks this with 2^3 ≈ 8.

Common log

log₁₀(1000) = 3, and the pH scale uses this: pH = −log₁₀[H⁺].

Understanding logarithms

Logarithms compress huge ranges into manageable numbers. On a base-10 scale, 10, 100, 1,000 and 1,000,000 become 1, 2, 3 and 6. This is why they measure quantities that span many orders of magnitude.

Real-world scales

ScaleFormulaMeaning
pH−log₁₀[H⁺]Each step is ten times more acidic
Decibels10·log₁₀(I/I₀)+10 dB is ten times the intensity
Richterlog₁₀(amplitude)Each whole number is ten times stronger

Solving exponential equations

To solve 2ˣ = 50, take the logarithm of both sides: x = log(50) ÷ log(2) ≈ 5.644. Logarithms turn exponents into multiplication, which is why they were used for calculation before calculators existed.

Key values to remember

log₁₀(2) ≈ 0.301, log₁₀(3) ≈ 0.477 and ln(2) ≈ 0.693. Using log rules, you can estimate log₁₀(6) = 0.301 + 0.477 = 0.778 without a calculator.

Compound growth

To find how long money takes to reach a target, solve (1 + r)ᵗ = target ratio for t: t = ln(ratio) ÷ ln(1 + r). At 7% a year, doubling takes ln 2 ÷ ln 1.07 ≈ 10.2 years, the exact version of the Rule of 72.

Practice problems

Try these yourself first, then check your answer. The answers come from the calculator above.

  1. Find log₂(64).
    Show answer

    log base 2 of 64: 6

  2. Find log₅(125).
    Show answer

    log base 5 of 125: 3

Common mistakes to avoid

  • Trying to take the log of zero or a negative number, which is undefined for real numbers.
  • Using base 1, which cannot work because 1 to any power is 1.
  • Confusing log (often base 10) with ln (base e). Check which your course uses.

Frequently asked questions

What is a logarithm?

The inverse of exponentiation: if b^y = x then log_b(x) = y.

What is the difference between log and ln?

log usually means base 10 and ln is the natural logarithm, base e ≈ 2.71828.

Where are logarithms used?

Earthquake magnitude, sound decibels, pH, compound growth and information theory.

Why is log(0) undefined?

No power of a positive base equals 0, so there is no answer.

Reviewed September 26, 2026 by the SolveCalcPro editorial team. Found a mistake? Tell us; see our editorial policy.