# How to figure out the log of a number without a calculator?

I have seen people look at log (several digit number) and rattle off the first couple of digits.

I can get the value for small values (aka the popular or easy to know roots), but is there a formula. Similar to how to tell if a number is divisible by an integer.

I have read this and this but could some one explain why it works?

-
To answer the title: Check the CRC Handbook or use a slide rule. – JeffE Apr 22 '12 at 17:02
The first link is simply using the basic rules for logarithms - the log of a product is equal to the sum of the logs (working in base 10). As an example, take $log(3025) = log(3.025 \times 10^3)=log(3.025)+log(10^3) = log (3.025)+3 \approx 3.48$ (using that $log(3)$ is 0.48). The power of 10 was chosen because $log(3)$ was known. – Mark Bennet Apr 22 '12 at 17:06

The idea of the first article is to rewrite any positive number $x$ as : $$\tag{1}x=m\cdot 10^{\,e}$$ with $m$ the 'mantissa' : a real number between $1$ and $10$ (excluded)
and $\,e\,$ the 'exponent' (or "power of ten") which is a signed integer.

From this we have $\;\tag{2}\log_{10}(x)= e+\log_{10}(m)$

(to keep notations short I'll write $\,\log(x)\,$ for $\,\log_{10}(x)\,$ and use $\,\ln(x)$ for the 'natural' logarithm)

Since the mantissa is between $1$ and $10$ the idea is to memorize the first logarithms (here I'll use up to $5$ digits, you may use fewer or more digits if you prefer) :

$$\begin{array} {ll} m & \log\,m\\ 1 & 0\\ 2 & 0.30103\\ 3 & 0.47712\\ 4 & 0.60206\\ 5 & 0.69897\\ 6 & 0.77815\\ 7 & 0.84510\\ 8 & 0.90309\\ 9 & 0.95424\\ \end{array}$$

This seems to be much work but these values (except $\log(7)$) are not independent :

• $\log(2^n)=n\,\log(2)\;$ so that $\;\log(4)=2\log(2),\;\log(8)=3\log(2),\cdots$
• more generally $\;\log(a\cdot b)=\log(a)+\log(b)\;$ so that the table could be rewritten (using $\,1=\log(10)=\log(2)+\log(5)$) :

$$\begin{array} {lll} m & \log\,m\\ 1 & 0\\ 2 & 0.30103 &\log(2)\\ 3 & 0.47712 &\log(3)\\ 4 & 0.60206 &2\,\log(2)\\ 5 & 0.69897 &1-\log(2)\\ 6 & 0.77815 &\log(2)+\log(3)\\ 7 & 0.84510 &\log(7)\\ 8 & 0.90309 &3\,\log(2)\\ 9 & 0.95424 &2\,\log(3)\\ \end{array}$$

The table may thus be rebuilt with just three values (two if $\,\log(7)\,$ is omitted)!

One should memorize too $\;\ln(10) \approx 2.3026\,$ and its multiplicative inverse $\;\dfrac{1}{\ln(10)}=\dfrac{\ln(e)}{\ln(10)}=\log(e)\approx \dfrac 1{2.3026}\approx 0.4343$.

The classical expansion $\;\ln(1+x)\approx x\;$ will be rewritten as :
$$\tag{3}\log(1+x)=\frac{\ln(1+x)}{\ln(10)}\approx 0.4343\cdot x$$ (with $x$ replaced by $\;x-\dfrac{x^2}2+\dfrac{x^3}3-\cdots\,$ if needed)

Let's apply all this to recover the (unfortunately lost...) value of $\,\log(7)\,$ using only $\;\log(2),\log(3),\log(e)$. One method is to use $\;\log(7)=\dfrac{\log(7^2)}2\;$ and :

\begin{align} \log(49)&=\log\left(50\;\left(1-\frac 1{50}\right)\right)\\ &=\log\left(\frac{100}2\right)+\log\left(1-\frac 1{50}\right)\\ &\approx\log(100)-\log(2)-0.4343\left(\frac 1{50}+\frac 1{2\cdot50^2}\right)\\ &\approx 2-\log(2)-\frac{0.8686}{100}\left(1+\frac 1{100}\right)\\ &\approx 2-0.30103-0.00877\\ &\approx 1.69020 \end{align}

Dividing by $2$ will indeed give the wished $0.84510$. Without the $\dfrac{x^2}2$ term we would get $\,0.84514$ : also not that bad! $$-$$

Let's further practice and compute $\log(29012)$ as in your article : $\log(29012)=\log(2.9012\cdot 10^4)=4+\log(2.9012)$

In first approximation we have $\;\log(2.9012) \approx \log(3) \approx 0.477\;$ and deduce that $\log(29012)\approx 4+0.477 \approx 4.477$.

we have $\;2.9012\approx 3\cdot 0.9671 \approx 3\cdot (1-0.0329)\;$ so that \begin{align} \log(2.9012)&\approx \log(3)+\log(1-0.0329)\\ &\approx 0.47712-0.434\cdot 0.033\\ &\approx 0.47712-0.0143\\ &\approx 0.4628 \end{align}

and we got $\;\log(29012)\approx 4.4628\,$ not so far from the exact $4.4625776\cdots$

It is important to understand that the table of logarithms allows too the reverse computation that is to compute $10^{\,x}$.

Of course $10^{\,\log(2)}=2$ so that for example $10^{\,0.3}$ will be just a bit smaller than $2$.

For additional precision and for $x\ll 1$ let's write the useful $\displaystyle 10^x=e^{x\ln(10)}\approx 1+\ln(10)x\;$ or $$\tag{4}10^{\,x}\approx 1+2.3026\cdot x$$

To compute $10^{\,x}$ decompose $x$ in its integer part $i$ and fractional part $f$ then $10^{\,i+f}=10^{\,i}\cdot 10^{\,f}$ : the mantissa of this result $10^{\,f}$ will be found using the table and $i$ will of course be the exponent.

After that all applications may follow : compute $a^b$ for any positive real $a$ and real $b$ using $\,\log(a^b)=b\,\log(a)\;$ so that
$$a^b=10^{\,b\log(a)}$$

Computing the $n$-th root of a positive real number will just be the special case $\;b=\dfrac 1n$.

Example $\sqrt[5]{1212}$ : \begin{align} 1212&\approx 3\cdot 4\cdot 100\cdot 1.01\\ \log(1212)&\approx 2+\log(3)+\log(4)+0.4343/100\\ \dfrac{\log(1212)}{5}&\approx \frac{2+0.47712+0.60206+0.00434}5\\ \approx 0.6167 \end{align} The answer (approximatively $10^{\,0.6167}$) will thus be a little over $4$.

More exactly $\,0.61670=0.60206+0.01464\,$ and since $\,10^{0.01464}\approx 1+2.3\cdot 0.0146 \approx 1.0336\;$ an approximate result will be $4\cdot 1.0336$ that is : $$\sqrt[5]{1212}\approx 4.134$$ while the exact result is $4.1371429\cdots$.

Many methods may be used to get more precision :

• from $1212=1200\cdot 1.01$ expand the logarithm (and/or the power of $10$) to second order as done for $\log(7)$
• compose (+ -) different exact values of logarithms to get values near the searched one (example $\,1.33\approx \dfrac 43$ and thus $\;\log(1.33)\approx \log(4)-\log(3)$)
• memorize values nearer to $1$ : $\log(1.1)\approx 0.041393,\ \log(1.2)=\log(\frac{3\cdot4}{10})\approx 0.07918$ and so on (you should nearly 'recognize' $\log(1.01)= 0.004321$... (see $\log(e)$) and won't need to memorize $\log(1.001)$)
• $\cdots$

Wishing you much fun discovering yourself other tricks,

-
thanks, this is a great answer. – yiyi Apr 23 '12 at 5:36
@MaoYiyi: Thanks for that, you are welcome! – Raymond Manzoni Apr 23 '12 at 6:08
can i mail Raymond Manzoni in person. i am new here, and i have 1 reputition. i however need help – oluwatola imoleayo May 4 '12 at 0:04
There was a suggested edit of this answer by this user: math.stackexchange.com/users/30581/oluwatola-imoleayo, which I rejected. – Aryabhata May 4 '12 at 0:11
Thanks for the information @Aryabhata ! – Raymond Manzoni May 4 '12 at 1:23

One can get very good approximations by using

$$\frac 1 2 \log \left|\frac{1+x}{1-x}\right| =x+\frac {x^3} 3+ \frac {x^5}5+\cdots$$

Say you want to get $\log 3$. Then take $x=1/2$. Then you get

$$\log 3 \approx 2\left( \frac 1 2 +\frac 1 {24} + \frac 1 {140} \right)=1.0976190\dots$$

The real value is $\log 3 = 1.098612289\dots$

Take another term to get

$\log 3 \approx 1.098065476\dots$.

Note that this particular series has the advantage that for $x < 1$ (which is where it works) you get "exponentially increasing" approximations.

-
One can get slightly more bang for the buck with Padé approximants. As already shown by Peter, using the $\mathrm{artanh}$ series is a great idea (due to the oddness of $\mathrm{artanh}$), but comparing $$x+\frac{x^3}{3}+\frac{x^5}{5}+\frac{x^7}{7}$$ and $$\frac{x-\frac{11 x^3}{21}}{1-\frac{6 x^2}{7}+\frac{3 x^4}{35}}$$ for $x=1/2$, the Padé approximant has a slight edge over the series... – J. M. Apr 23 '12 at 16:35

This can be done by recourse to Taylor series. For $ln(x)$ centered at 1, i.e. where $0 < x \leq 2$: $$\ln(x)= \sum_{n=1}^\infty \frac{(x-1)^n}{n}= (x-1) - \frac{1}{2}(x-1)^2 + \frac{1}{3}(x-1)^3 + \frac{1}{4}(x-1)^4 + \cdot\cdot\cdot\$$

-
Unfortunately, this is a pretty miserable way to do calculations, except in the situation where you have a number that is close enough to 1 that you only need 1 or 2 terms. – Hurkyl Apr 22 '12 at 17:21
The related series $\ln x = \ln a + \frac{x-a}{a} - \frac{(x-a)^2}{2a^2} + \ldots$ for $0<x\leq 2a$ is also not very useful in this regard. – user26872 Apr 23 '12 at 0:34
@oenamen and you too, Kaleb. Thanks for those equations. Always good to build up one's equation notebook. – yiyi Apr 23 '12 at 5:38
@MaoYiyi: Glad to help. To see how bad this approach is try approximating $\log_{10} 3025$. It's only useful if $(x-a)/a$ is small. – user26872 Apr 23 '12 at 5:52
@oenamen Yes, I got that after trying a few. Just wanted to know how they did it. Don't worry, I'll still use my ti – yiyi Apr 27 '12 at 10:30

A curve can be approximated with line segments.

If $4 \le x \lt 5$, then $\log(x) \approx 0.1(x+2)$. For example, $\log(4.1) \approx 0.61$, $\log(4.2) \approx 0.62$, $\log(4.3) \approx 0.63$, ..., $\log(4.9) \approx 0.69$.

If $7 \le x \lt 10$, then $\log(x) \approx 0.1(x/2 + 5)$. For example, $\log(7.2) \approx 0.1(7.2/2 + 5) \approx 0.86$.

-