
Estimating Logarithms
created: May 31, 2025, 6:22 a.m. | updated: June 2, 2025, 9:35 a.m.
While reading through the fantastic book The Lost Art of Logarithms by Charles Petzold I was nerd-sniped by a simple method of estimating the logarithm of any number base 10.
The MethodWe note that due to the nature of the logarithm (always referring to base 10 from here one out), the logarithm of any number N N N is approximately equal to the number of digits of N N N minus one.
We note # N \#N #N as the number of digits of N minus one.
log ( N ) ≈ # N log ( N 10 ) ≈ # ( N 10 ) 10 ⋅ log ( N ) ≈ # ( N 10 ) log ( N ) ≈ # ( N 10 ) 10 \begin{align} \log(N) &\approx \# N \\\ \log(N ^{10}) &\approx \#({N^{10}}) \\\ 10 \cdot \log(N) &\approx \#({N^{10}}) \\\ \log(N) &\approx \frac{\#({N^{10}})}{10} \end{align} lo g ( N ) lo g ( N 10 ) 10 ⋅ lo g ( N ) lo g ( N ) ≈ # N ≈ # ( N 10 ) ≈ # ( N 10 ) ≈ 10 # ( N 10 ) Increase the exponent from 100 to 1000 and you’ve added another digit of precision.
Thus 5 20 ≈ 9.8 ⋅ 1 0 6 ⋅ 9.8 ⋅ 1 0 6 ≈ 9.8 ⋅ 9.8 ⋅ 1 0 12 ≈ 9.6 ⋅ 1 0 13 5^{20} \approx 9.8 \cdot 10^6 \cdot 9.8 \cdot 10^6 \approx 9.8 \cdot 9.8 \cdot 10^{12} \approx 9.6 \cdot 10^{13} 520≈9.8⋅106⋅9.8⋅106≈9.8⋅9.8⋅1012≈9.6⋅1013.
1 week, 2 days ago: Hacker News