Change of Base Formula
Functions & Advanced AlgebraThe change of base formula converts a logarithm in any base to a ratio of logarithms in a more convenient base, such as base 10 or base e.
Formula
\log_b(x) = \log(x) / \log(b) = \ln(x) / \ln(b)
Definition
The change of base formula lets you calculate any logarithm using a calculator that only has log or ln buttons. You divide one logarithm by another.
Example
Calculate $\log_5(20)$: no "log base $5$" button exists. Use: $\log_5(20) = \log(20)/\log(5) = 1.301/0.699 \approx 1.861$. Check: $5^{1.861} \approx 20$. Correct.
Key Insight
Every logarithm can be converted to base $10$ or base $e$. The change of base formula is the "universal translator" for logarithms, making any base computable with a standard calculator.
Definition
For any valid bases $a$ and $b$ and positive $x$: $\log_b(x) = \log_a(x) / \log_a(b)$. Commonly: $\log_b(x) = \ln(x)/\ln(b) = \log(x)/\log(b)$. This allows evaluating logarithms in any base using the natural or common logarithm.
Example
Solve $7^x = 150$: take log base $7$ of both sides: $x = \log_7(150) = \ln(150)/\ln(7) = 5.011/1.946 \approx 2.575$. Verify: $7^{2.575} \approx 150$.
Key Insight
The formula follows directly from the definition: if $y = \log_b(x)$, then $b^y = x$. Taking $\log_a$ of both sides: $y\log_a(b) = \log_a(x)$, so $y = \log_a(x)/\log_a(b)$.
Definition
The change of base formula $\log_b(x) = \log_a(x)/\log_a(b)$ reflects that all logarithm functions differ only by a multiplicative constant: $\log_b(x) = (1/\ln(b)) \cdot \ln(x)$. They are all scalar multiples of the natural logarithm. In information theory, switching between bits ($\log_2$), nats (ln), and dits ($\log_{10}$) is exactly the change of base formula applied to entropy.
Example
Shannon entropy in bits: $H = -\sum p_i \log_2(p_i)$. In nats: $H_{\text{nat}} = -\sum p_i \ln(p_i)$. Converting: $H = H_{\text{nat}} / \ln(2)$. The factor $1/\ln(2) \approx 1.4427$ converts nats to bits.
Key Insight
The change of base formula demonstrates that there is essentially only one logarithm function, scaled differently for different bases. The choice of base is a convention suited to the application, not a mathematical necessity.