# 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 write any positive number $x$ as : $$x=m\cdot 10^e$$ with $m$ the 'mantissa' between $1$ and $10$ (excluded) and $e$ the exponent (integer power of $10$).

So that $\log_{10}(x)= \log_{10}(m)+e$

To keep notations shorter I'll write $\log(x)$ for $\log_{10}(x)$ in the following.

The mantissa is between 1 and 10 and the idea is to memorize the first logarithms (here I'll use up to 5 digits, you may use fewer 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 in fact many may be deduced from other values :

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

$\begin{array} {ll} 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 be rebuilt with just three values!
I'll add too the usefull $\ln(10) \approx 2.3026$ and it's multiplicative inverse $\log(e)\approx 0.43429\approx\frac 1{2.3026}$.

Now let suppose you want to compute (like in your article) $\log(29012)=\log(2.9012\cdot 10^4)=\log(2.9012)+4\log(10)=4+\log(2.9012)$

In first approximation we may use $\log(2.9012) \approx \log(3) \approx 0.477$ to deduce that $\log(29012)\approx 4+0.477 \approx 4.477$.

We may get more precision with a linear interpolation but I'll prefer to use the classical $\ln(1+x)\approx x$ applied this way : $$\log(1+x)\approx \log(e)\cdot x\approx 0.4343\cdot x$$

we have $2.9012\approx 3\cdot 0.9671 \approx 3\cdot (1-0.0329)$ so that $$\log(2.9012)\approx \log(3)+\log(1-0.0329)\approx 0.033\cdot 0.434 \approx 0.47712-0.0143 \approx 0.4628$$

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

It is important to understand that the logarithms table 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 $10^x=e^{x\ln(10)}\approx 1+\ln(10)x$ or $$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 will just be a special case of the previous one : $b=\frac 1n$.

Example $\sqrt[5]{1212}$ $1200$ is not far from $1200=3\cdot 4\cdot 100$ so that $$\log(1212)\approx \log(3)+\log(4)+2$$ $$\dfrac{\log(1212)}{5}\approx \frac{2+0.47712+0.60206}5\approx 0.61584$$ so that the answer is clearly a little over $4$.

$0.61584=0.60206+0.01378$ and since $10^{0.01378}\approx 1+2.3\cdot 0.013 \approx 1.03$ so that an approximate result will be $4\cdot 1.03$ that is : $$\sqrt[5]{1212}\approx 4.12$$ while the exact result is $4.1371429\cdots$.

Many methods may be used to get more precision :

• observe that $1212=12\cdot 101$ with $101=100\cdot 1.01$
• compose different (+ -) exact values of logarithms to get values near the searched one
• memorize too $\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$... 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
show 1 more comment

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 @J.M. I know what the Padé approximants are, but yet I'm not used to either calculating or using them. Thanks for that. – Peter Tamaroff Apr 23 '12 at 17:41

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 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\$.

-