Logarithm Calculator

log_b(x) for any base b > 0, b ≠ 1, x > 0. Common bases shown side-by-side.

Inputs

Result

log_10(100)
2.00000000
10^2.0000 = 100.
  • log₁₀(x)2.000000
  • ln(x)4.605170
  • log₂(x)6.643856
  • Change-of-baselog_10(x) = ln(x) / ln(10)
log_10(100)
Verifies: 10^2.0000 ≈ 100.0000.
2.00000000
Common log (log₁₀)
Used for pH, decibels, Richter scale, orders of magnitude.
2.000000
Natural log (ln, base e)
Used for continuous-rate models — decay, growth, compound interest.
4.605170
Binary log (log₂)
Used in computer science — bit-counts, complexity classes.
6.643856
Note — IEEE 754 double precision: ~15–16 significant digits. log of zero is −∞ as a limit; log of negative numbers is complex (not real) and rejected here.

Step-by-step

  1. Use change-of-base: log_10(100) = ln(100) / ln(10) = 4.6052 / 2.3026 = 2.00000000.

How to use this calculator

  • Enter x and the base.
  • Read the log; the breakdown shows base-10, natural, and base-2 logs for reference.

About this calculator

A logarithm answers: "to what power must I raise the base to get x?" log₁₀(100) = 2 because 10² = 100. Common bases: base 10 (log), base e ≈ 2.718 (ln, natural log), base 2 (used in computer science). Change-of-base formula lets you compute log in any base from natural log: log_b(x) = ln(x) / ln(b).

How it works — the formula

logₐ(x) = y ⟺ aʸ = x (general) log(x) := log₁₀(x) (common log) ln(x) := logₑ(x), e ≈ 2.71828 (natural log) Change of base: logₐ(x) = ln(x) / ln(a)

The logarithm logₐ(x) is the exponent y to which the base a must be raised to produce x. The base must be positive and not 1; the argument must be strictly positive. The common log uses base 10 (standard for orders of magnitude — pH, decibels, Richter scale), and the natural log uses base e (standard for continuous-rate models — radioactive decay, compound interest, population growth). The change-of-base identity lets any calculator with one log function compute any other.

Worked examples

Example 1
Common log
Inputs:
log₁₀(1000)
Output:
3 (because 10³ = 1000)
Example 2
Natural log
Inputs:
ln(e²)
Output:
2 (because eˣ and ln are inverses)
Example 3
Change of base
Inputs:
log₂(10) via natural log
Output:
log₂(10) = ln(10) / ln(2) ≈ 3.3219

Limitations

  • log of zero is −∞ as a limit; log of a negative number is complex (not real).
  • Floating-point representation has ~15–16 significant digits; logarithms of very large or very small numbers may lose precision in the trailing digits.
  • Different mathematical communities use "log" to mean either log₁₀ (most science/engineering) or logₑ (most pure math) — clarify the base when ambiguous.
  • The series ln(1 + x) = x − x²/2 + x³/3 − … converges only for −1 < x ≤ 1; for larger arguments, use the change-of-base identity or built-in implementations.

Computed with the platform's IEEE 754 Math.log family; agreement with NIST tabulated values exceeds 12 significant digits across the typical input range.

Frequently asked

log base e ≈ 2.71828, written ln(x). Appears throughout calculus and physics because the derivative of ln(x) is 1/x.

Related calculators

More tools you might like