Log Calculator

Enter a positive number to compute log₁₀, ln, and log₂ simultaneously — or switch to custom base mode to calculate log_b(x) for any valid base b.

How to use this calculator

  1. Select the logarithm type: common (log₁₀), natural (ln), or custom base.
  2. Enter a positive number x.
  3. For custom base, also enter base b (b > 0, b ≠ 1).
  4. Read common, natural, and binary logarithms simultaneously for any input.

Formula & method

Logarithm definitions and change of base

log₁₀(x) = log(x)/log(10) · ln(x) = loge(x) · log_b(x) = ln(x)/ln(b)

Logarithm is defined only for x > 0 and base b > 0, b ≠ 1.

Example

x = 100: log₁₀(100) = 2, ln(100) ≈ 4.605, log₂(100) ≈ 6.644. Custom base 5: log₅(100) = ln(100)/ln(5) ≈ 2.861.

Key insights

How to interpret your result

Common log (log₁₀)

Used in pH (chemistry), Richter magnitude (earthquakes), and decibel (sound). log₁₀(x) answers '10 to what power equals x?'

Natural log (ln)

Used in calculus, probability, and finance (continuous compounding). It's the inverse of eˣ.

Binary log (log₂)

Fundamental in computer science: the number of bits needed to represent n values is ⌈log₂(n)⌉.

Frequently asked questions

What is a logarithm?
The logarithm log_b(x) is the exponent to which you must raise b to get x. log₂(8) = 3 because 2³ = 8.
What is the difference between log and ln?
log usually means log₁₀ (common logarithm). ln means the natural logarithm with base e ≈ 2.71828.
Why is log undefined for negative numbers?
No real power of a positive base produces a negative result. Logarithms of negative numbers are complex and outside this tool's scope.

Related calculators

See all math calculators · Explore all online calculators