# Ask Uncle Colin: A Log Approximation

Dear Uncle Colin,

According to John D Cook, you can estimate the natural logarithm of a number $x$ by working out $\log_2(x)-\log_{10}(x)$. It seems to be pretty accurate - but why?

Not A Problem - Interesting Exponential Riddle

Hi, Napier, and thanks for your message!

That is indeed a conundrum: why should $\ln(x) \approx \log_2(x)-\log_{10}(x)$?

The simplest approach I can see is to apply the change of base formula: $\log_a(x) = \frac{\log_b(x)}{\log_b(a)}$. In particular, $\log_2(x)=\frac{\ln(x)}{\ln(2)}$ and $\log_{10}(x)=\frac{\ln(x)}{\ln(10)}$.

This gives us a right-hand side of $\ln(x)\br{\frac{1}{\ln(2)}-\frac{1}{\ln(10)}}$. If that bracketed factor is about 1, then the approximation is good.

And, it turns out, it is good: ${\frac{1}{\ln(2)}-\frac{1}{\ln(10)}} = \frac{\ln(10)-\ln(2)}{\ln(10)\ln(2)} = \frac{\ln(5)}{\ln(2)\ln(10)}$, which we can rewrite as $\frac{\log_{10}(5)}{\ln(2)}$ - because those are numbers you cover in week one of Ninja school ((Or so I’m told.))

- $\ln(2) \approx 0.69315$
- $\log_{10}(5) = 1 - \log_{10}(2) \approx 1 - 0.30103 = 0.69897$

Those numbers are not identical, but they’re pretty close together: the difference is about six parts in 700, slightly under 1%.

Hope that helps!

- Uncle Colin

* Thanks to @pozorvlak for pointing me at John’s article.