Skip to content
AllCalcHub

Logarithm Calculator

Find the logarithm of a number in any base, plus its natural, common and binary logs.

About the Logarithm Calculator

A logarithm answers: what power must the base be raised to, to get this number? log₁₀(1000) = 3 because 10³ = 1000. The natural log (ln) uses the base e ≈ 2.71828 and appears throughout science and finance.

The formula

log_b(x) = ln(x) ÷ ln(b)

b
base: positive, not 1
x
number: greater than 0

Log rules

RuleExample
log(xy) = log x + log ylog 20 = log 2 + log 10
log(x/y) = log x − log y
log(xⁿ) = n·log xlog 1000 = 3·log 10 = 3
log_b(b) = 1ln(e) = 1

Worked example

Example: log_2(256) = 8

  1. Inputs: Number (x): 256; Base (b): 2.
  2. Formula: log_b(x) = ln(x) ÷ ln(b)
  3. Change of base log_2(256) = ln(256) ÷ ln(2) = 5.5451774445 ÷ 0.6931471806
  4. Result: log_2(256) = 8
  5. Natural log ln(x): 5.54517744448
  6. Common log log₁₀(x): 2.408239965312
  7. Binary log log₂(x): 8

Questions people ask

What is log of 0?

Undefined; it tends to −∞ as x approaches 0.

Why use ln?

Its rate of change is 1/x, which makes growth and decay formulas neat: continuous interest uses e^(rt).