How the change of base formula works
The change of base formula lets you evaluate a logarithm in any base b using only the logarithm functions built into a calculator or programming language — almost always base 10 (common log, often written log) and base e (natural log, ln). It states log_b(x) = log_c(x) / log_c(b), where c is any valid base you choose (c > 0, c ≠ 1). No matter which valid c you pick, the ratio produces the same value of log_b(x).
Where the formula comes from
Let y = log_b(x), which by definition means by = x. Taking log_c of both sides gives log_c(by) = log_c(x), and the power rule of logarithms turns the left side into y · log_c(b) = log_c(x). Dividing both sides by log_c(b) isolates y: y = log_c(x) / log_c(b) — the change of base formula.
Worked example
To find log₂(8) using base-10 logs: log₂(8) = log₁₀(8) / log₁₀(2) ≈ 0.90309 / 0.30103 = 3. Using natural logs instead gives the same answer: ln(8) / ln(2) ≈ 2.07944 / 0.69315 = 3. Either calculation base works because 2³ = 8, and the formula does not care which valid base you route the calculation through.
Using the result correctly
- x must be greater than 0; logarithms of zero or negative numbers are undefined for real results.
- The base b must be greater than 0 and cannot equal 1, since log base 1 is undefined (it would require dividing by log_c(1), which is 0).
- The result can be negative (when 0 < x < 1 and b > 1) or exactly zero (when x = 1, since log_b(1) = 0 for any valid base).