Logarithms turn multiplication into addition and powers into multiplication. These rules hold for any valid base b (positive, not 1) and positive x and y.
The rules
Laws of logarithms
Rule
Statement
Example
Product
log_b(xy) = log_b(x) + log_b(y)
log(20) = log(2) + log(10) ≈ 0.301 + 1 = 1.301
Quotient
log_b(x ÷ y) = log_b(x) − log_b(y)
log₂(32 ÷ 4) = 5 − 2 = 3
Power
log_b(xⁿ) = n · log_b(x)
log(1000) = log(10³) = 3 · 1 = 3
Root
log_b(ⁿ√x) = log_b(x) ÷ n
log₂(√8) = 3 ÷ 2 = 1.5
Change of base
log_b(x) = log_k(x) ÷ log_k(b)
log₃(81) = ln 81 ÷ ln 3 = 4
Inverse
b^(log_b x) = x and log_b(bˣ) = x
10^(log 7) = 7
Identity
log_b(b) = 1
ln(e) = 1
Log of one
log_b(1) = 0
log₅(1) = 0
Reciprocal
log_b(1 ÷ x) = −log_b(x)
log(0.01) = −log(100) = −2
Notation
log x usually means log₁₀ x in school math, engineering and on calculators; in some higher-math and programming contexts it means ln x.
ln x is the natural logarithm, base e ≈ 2.718281828.
lg x sometimes means log₁₀ x, and lb x or log₂ x the binary logarithm.
Common mistakes
log(x + y) is not log x + log y. There is no simple rule for the log of a sum.
log(x) ÷ log(y) is not log(x ÷ y) — it is the change-of-base formula, log_y(x).
(log x)² is not log(x²). The power rule only applies to a power inside the log: log(x²) = 2 log x.
Logs of zero and negative numbers are undefined in the real numbers.
Handy values
Logarithms of common values (6 significant digits)