Calculators have keys for $\log$ (base 10) and $\ln$ (base $e$), but not for $\log_7$. The power rule lets you rewrite any log in a base you have.
Key idea
$$\log_b x = \frac{\log_c x}{\log_c b}$$ for any allowed base $c$. Usually $c = 10$ or $c = e$: $\log_b x = \frac{\ln x}{\ln b}$.
Why it works
Let $y = \log_b x$, so $b^y = x$. Take $\ln$ of both sides: $\ln(b^y) = \ln x$. The power rule gives $y\ln b = \ln x$, so $y = \frac{\ln x}{\ln b}$. This also shows that every log function is a constant multiple of $\ln x$: their graphs are vertical stretches of one another.
Worked examples
Worked example: With a calculator
Find $\log_3 20$ to three decimal places.
- Change of base: $$\log_3 20 = \frac{\ln 20}{\ln 3} \approx \frac{2.9957}{1.0986} \approx 2.727.$$
- Check: $3^{2.727} \approx 20.0$.
Answer: about $2.727$
Worked example: Exactly, with a shared base
Evaluate $\log_8 32$.
- Change to base 2: $\frac{\log_2 32}{\log_2 8} = \frac{5}{3}$.
Answer: $\frac{5}{3}$
Which base should you change to? Any base works, so pick a convenient one: base 10 or $e$ for a calculator, or a shared base (like 2 for $\log_8 32$) to get an exact answer by hand.
Worked example: A base without a calculator key
Find $\log_2 10$ to two decimal places, and use it to estimate $\log_2 1000$.
- $\log_2 10 = \frac{\log 10}{\log 2} = \frac{1}{0.30103} \approx 3.32$.
- $1000 = 10^3$, so $\log_2 1000 = 3\log_2 10 \approx 9.97$. Check: $2^{10} = 1024$, a bit more than 1000.
Answer: about $3.32$ and $9.97$
Common mistake
Flipping the fraction: $\log_3 20 = \frac{\ln 3}{\ln 20}$ is wrong (it gives about $0.37$). The number you are taking the log of goes on top. A sanity check: $3^2 = 9$ and $3^3 = 27$, so $\log_3 20$ must be between 2 and 3.