Logarithm Calculator

Calculate logarithms in any base. Natural log (ln), common log (log10), or custom base.

log_10(100)

What is a Logarithm?

The logarithm log_b(x) asks: 'what power must I raise b to, to get x?' If b^y = x, then log_b(x) = y. The logarithm is the inverse of exponentiation. Three common bases used: log_10 (common log, used in science/engineering), ln (natural log base e ≈ 2.718, used in calculus), log_2 (binary log, used in computer science). Useful for: solving exponential equations, audio/decibel calculations, pH (chemistry), compound interest, algorithm complexity analysis, frequency analysis (music, sound), Richter scale (earthquakes), star magnitudes.

How to use this tool

  1. Enter number (x) — Must be positive (logarithm of non-positive undefined).
  2. Enter base (b) — Common: 10, e (~2.718), or 2. Any positive non-1 base works.
  3. Calculate log_b(x) — Result shown plus comparison to other common bases.
  4. Interpret result — Result = power of b that produces x.

Logarithm properties

  • log_b(xy) = log_b(x) + log_b(y) — products to sums
  • log_b(x/y) = log_b(x) – log_b(y) — ratios to differences
  • log_b(x^n) = n · log_b(x) — exponents to coefficients
  • log_b(1) = 0 — any base to power 0 is 1
  • log_b(b) = 1 — base to power 1 is itself
  • Change of base: log_b(x) = log(x) / log(b)

Common values:

  • log_10(100) = 2 (because 10^2 = 100)
  • log_2(8) = 3 (because 2^3 = 8)
  • ln(e) = 1 (natural log of base = 1)
  • log_10(1) = 0 (any log of 1 = 0)

Examples

  • pH calculation: pH = -log_10[H+] — pH 7 means [H+] = 10^-7 mol/L
  • Decibel sound: dB = 10 · log_10(P/P0)
  • Algorithm complexity: Binary search is O(log_2 n)
  • Compound interest time: ln(future/present) / ln(1+r) = years
  • Earthquake intensity: Richter scale is log_10 of amplitude

Tips & best practices

  • log() typically means log_10 (common log) in engineering contexts
  • ln() means natural log (base e) in math/physics contexts
  • log_2() used in computer science (binary, information theory)
  • Use change-of-base formula to convert between bases
  • log of negative or zero is UNDEFINED — not just zero

Frequently Asked Questions

What does ln mean?

Natural logarithm — logarithm with base e (~2.718). Named 'natural' because e arises naturally in calculus (rate of change of exponential function).

Why are log tables historical?

Before calculators (pre-1970s), log tables converted multiplication to addition. log(xy) = log(x) + log(y) made multiplication of large numbers tractable by hand.

Difference between log and ln?

log usually means log_10. ln means natural log (base e). Sometimes 'log' in math papers means ln, in engineering means log_10 — context matters.

Can log be negative?

Yes — for x < 1 (with base > 1), log is negative. log_10(0.5) = -0.301. For x = 1, log = 0. For x > 1, log positive.

Why pH uses logarithms?

pH spans wide range (0-14). Logarithmic scale compresses huge variations into manageable numbers. pH 4 is 10× more acidic than pH 5.

Related tools

Scientific Calculator · Factorial Calculator · Compound Interest

Copied