# How to calculate cube roots in your head

Here’s a way to impress people. Ask somebody to think of a number with no more than 3 digits and tell you its cube (they can use a calculator to do this). Using the method I’m about to tell you about, you can calculate the original number, the cube root of the number you’re given, without needing to carry out any intermediate calculations other than addition and subtraction of numbers with no more than 2 digits. If you can carry out these intermediate calculations at a normal speed, you will probably be able to calculate the cube root within a minute, with some practice.

Suppose the number you’re given is ${n^3}$ (so that ${n}$ is the original number, the cube root you’re trying to find). You will know that ${n}$ has at most 3 digits. If you use this method, you will calculate the three digits of ${n}$ one by one. The initial and final digits can be calculated almost immediately; the middle digit is the one you will spend most of your time calculating, because this is the part of the calculation where you have to carry out some additions and subtractions.

1. The final digit

In order to find the final digit, you can use the fact that for every pair of numbers ${x}$ and ${y}$, ${x}$ and ${y}$ have the same final digit if and only if ${x^3}$ and ${y^3}$ have the same final digit. In other words, the final digit of ${n}$ is predictable from the final digit of ${n^3}$. The following table can be used.

 Final digit of ${n^3}$ 0 1 2 3 4 5 6 7 8 9 Final digit of ${n}$ 0 1 8 7 4 5 6 3 2 9

The table is not difficult to memorise. Just remember it this way: if the final digit of ${n^3}$ is 0, 1, 4, 5, 6, or 9, then the final digit of ${n}$ is the same, and otherwise (if the final digit of ${n^3}$ is 2, 3, 7 or 8), the final digit of ${n}$ is 10 minus the final digit of ${n^3}$.

If you’re not interested in why this works, you can skip ahead a few paragraphs. But in case you are, I will explain why this works. First, note that for every number ${x}$, the final digit of ${x}$ is its remainder on division by 10, i.e. the unique integer ${d}$ such that ${0 \le d < 10}$ and ${x = 10 q + d}$ for some integer ${q}$. For example, ${143 = 140 + 3}$ and ${2764 = 2760 + 4}$. Cubing both sides of the latter equation yields

$\displaystyle \begin{array}{rcl} x^3 &=& (10 q + d)^3 \\ &=& 10^3 q^3 + 3 \cdot 10^2 q^2 d + 3 \cdot 10 q d^2 + d^3 \\ &=& 10 (10^2 q^3 + 3 \cdot 10 q^2 d + 3 \cdot q d^2) + d^3. \end{array}$

Now, if we let ${r}$ be the final digit of ${d^3}$, i.e. the remainder of ${d^3}$ on division by 10, i.e. the unique integer ${r}$ such that ${0 \le r < 10}$ and ${d^3 = 10 p + r}$ for some integer ${q}$, we then have

$\displaystyle \begin{array}{rcl} x^3 &=& 10 (10^2 q^3 + 3 \cdot 10 q^2 d + 3 \cdot q d^2) + 10 p + r \\ &=& 10 (10^2 q^3 + 3 \cdot 10 q^2 d + 3 \cdot q d^2 + p) + r, \end{array}$

from which we can see that ${r}$ is also the remainder of ${x^3}$ on division by 10, i.e. the final digit of ${x^3}$. This shows that for every number ${x}$, the final digit of ${x^3}$ is the final digit of ${d^3}$, where ${d}$ is the final digit of ${x}$. Let’s make a table showing what the final digit of ${d^3}$ is for each of the 10 possible values of ${d}$. The final digits of each of the numbers in the second row have been bolded.

 ${d}$ 0 1 2 3 4 5 6 7 8 9 ${d^3}$ 0 1 8 27 64 125 216 343 512 729

Now, returning to the task at hand, we know the final digit of ${n^3}$, which is also the final digit of ${d^3}$, where ${d}$ is the final digit of ${n}$. Let’s call this number ${d'}$. From the table above, we can see that if ${d}$ is 1, ${d'}$ is 1; if ${d}$ is 3, ${d'}$ is 7; if ${d}$ is 6, ${d'}$ is 6; if ${d}$ is 8, ${d'}$ is 2, and so on. In fact, for every possible value of ${d'}$ there is only one possible value of ${d}$, and therefore we can read off the value of ${d}$ by finding the unique cell in the bottom row containing a number whose final digit is ${d'}$, and seeing which number is in the cell above. This is where the original table comes from.

This proof crucially relies on the fact that for every possible value of ${d'}$ there is only one possible value of ${d}$. If you try to do the same thing with, say, square roots, you find that there are some possible values of ${d'}$ for which there are multiple possible values of ${d}$, and therefore, while this method can narrow down the possible values of ${d}$ it cannot give you the exact value.

2. The initial digit

In order to find the initial digit, have a look at the table above which shows the cubes of each of the non-negative integers less than 10. You will need to memorise this table, unfortunately, and there is no simple summary for it as there is with the other table. However, knowing the first 10 non-negative perfect cubes is useful in a lot of situations where you need to make mental calculations, not just in this situation.

First of all, you need to write ${n^3}$ as a 9-digit number. That means, if it has less than 9 digits, put 0s in front of it until it has 9 digits. Now, look at the first 3 digits of ${n^3}$, when it is written like this; this gives you a 3-digit number. Using your knowledge of the first 10 non-negative perfect cubes, identify the greatest perfect cube which is no greater than this 3-digit number. The first digit of ${n}$ is the cube root of this perfect cube. You can also use the following table.

 First 3 digits of ${n^3}$ 000 001–007 008–026 027–063 064–124 First digit of ${n}$ 0 1 2 3 4

 First 3 digits of ${n^3}$ 125–215 216–342 343–511 512–728 729–999 First digit of ${n}$ 5 6 7 8 9

To see why this works, note that for every number ${x}$ with no more than 3 digits, the first digit of ${x}$ is the unique integer ${d}$ such that ${10^2 d \le x < 10^2 (d + 1)}$, where ${n}$ is the number of digits of ${x}$. For example, ${300 \le 341 < 400}$ and ${100 \le 192 < 200}$. Cubing each part of this inequality yields ${10^6 d^3 \le x^3 \le 10^6 (d + 1)^3}$. For example, ${27000000 \le 341^3 < 64000000}$ and ${1000000 \le 192^3 < 8000000}$. And if an inequality of the form of the latter one is observed to hold, for some value of ${d}$, then the cube roots of each part can be taken to obtain an inequality of the form of the former one, thus showing that the first digit of ${x}$ is ${d}$.

By the way, this part of the method does not rely on the fact that ${n^3}$ is a perfect cube; it will also work for finding the first digit of irrational cube roots. It can also be generalised without complication to find the first digit of roots of any order: square roots, 4th roots, etc.

3. The middle digit

The cleverest part of the method is the calculation of the middle digit. Unlike the initial and final digits, there is no simple characterisation of how the middle digit relates to the whole number. Instead, we take advantage of a rather obscure fact that relates the three digits of ${n}$. The middle digit can therefore only be calculated once the other two digits are known. This obscure fact is the fact that for every number ${x}$, the remainder of ${x}$ on division by 11 is same as the remainder on division by 11 of the alternating sum of the digits of ${x}$. By the alternating sum of the digits of ${x}$, I mean the sum of the digits of ${x}$ at places corresponding to even powers of 10 (the unit place, the hundreds place, the ten thousands place and so on) minus the sum of the digits of ${x}$ at places corresponding to odd powers of 10 (the tens place, the thousands place, the hundred thousands place and so on). For example, the alternating sum of the digits of 121281 is ${1 - 8 + 2 - 1 + 2 - 1 = -5}$, and, sure enough, we have ${121281 = 11 \cdot 11025 + 6}$, while ${-5 = -11 + 6}$, so the remainders of 121281 and -5 on division by 11 are the same. In practice, to calculate the alternating sum of ${x}$, you look at each digit of ${x}$ in turn, going from right to left (not the order the digits are written in, which is left to right!) and alternate between adding and subtracting the digit from the total; that’s why it’s called an alternating sum. It can be helpful to take the digits in groups of two and find the difference between the two digits in the group first, then add it to the total; that way, you are less likely to get confused since you do the same thing at each step. For example, to calculate the alternating sum of 121281, you see that ${1 - 8 = -7}$, and set the total at ${-7}$, then you see that ${2 - 1 = 1}$, and set the total at ${-6}$, and finally you see that ${2 - 1 = 1}$ and set the total at ${-5}$. By the way, if the alternating sum is non-negative and less than 11 then it is equal to its remainder on division by 11; otherwise, although it will often be small enough that you can immediately see its remainder on division by 11, you could find the alternating sum of the digits of the alternating sum, repeating the process, to get an even smaller number.

If you just want to see how to calculate the middle digit, skip ahead, but you might be wondering why these two remainders are the same, so I will give you a proof. Suppose ${x}$ is an integer with ${n}$ digits. Let ${d_0}$ be its unit digit, let ${d_1}$ be its tens digit, … and let ${d_n}$ be its ${10^n}$s digit, so that

$\displaystyle x = d_0 + 10 d_1 + 10^2 d_2 + \dotsb + 10^n d_n.$

We can also write this as

$\displaystyle x = d_0 + (11 - 1) d_1 + (11 - 1)^2 d_2 + \dotsb + (11 - 1)^n d_n.$

For every integer ${k}$ such that ${0 \le k \le n}$, ${(11 - 1)^k}$ expands into a sum that can be written as ${11 q_k + (-1)^k}$ for some integer ${q_k}$ (because every term in the sum other than ${(-1)^k}$ has at least one factor of 11). Therefore, we have

$\displaystyle \begin{array}{rcl} x &=& d_0 + (11 - 1) d_1 + (11 \cdot 9 + 1) d_2 + \dotsb + (11 q_k + (-1)^k) d_n \\ &=& 11 (d_1 + 9 d_2 + \dotsb + q_k d_n) + d_0 - d_1 + d_2 + \dotsb + (-1)^k d_n, \end{array}$

from which we can see that the remainder of ${d_0 - d_1 + d_2 + \dotsb + (-1)^k d_n}$ on division by 11 will be the same as the remainder of ${x}$ on division by 11 (by the same logic we used above to show that ${x^3}$ and ${d^3}$ had the same remainders on division by 10). This completes the proof.

So, how do you use this fact to calculate the middle digit? Well, first note that for every number ${x}$, if we let ${r}$ be the remainder of ${x}$ on division by 11, then ${r^3}$ is the remainder of ${x}$ on division by 11. We proved this above for division by 10 rather than division by 11, and the proof for division by 11 is pretty much exactly the same. Just replace references to 10 by references to 11. So I won’t go through the proof in detail here. Instead, we can get right awya to seeing what the remainder of ${r^3}$ on division by 11 is for each of the 11 possible values of ${r}$. In the following table, the terms ‘quotient of ${r^3}$’ and ‘remainder of ${r^3}$’ should be taken to refer to the quotient and remainder on division by 11; there just isn’t room to give a full description inside the table.

 ${r}$ 0 1 2 3 4 5 6 7 8 9 10 ${r^3}$ 0 1 8 27 64 125 216 343 512 729 1000 Quotient of ${r^3}$ 0 0 0 2 5 11 19 31 46 66 90 Remainder of ${r^3}$ 0 1 8 5 9 4 7 2 6 3 10

Again, it happens that this table has the convenient property that for every possible value of ${r^3}$ there is only one possible value of ${r}$, and therefore we can use it to find the value of ${r}$ given the value of ${r^3}$. Or, more conveniently, we can use the following inverted form of the table.

 ${r^3}$ 0 1 2 3 4 5 6 7 9 10 ${r}$ 0 1 7 9 5 3 8 6 2 4 10

Unfortunately, there is no simple way to summarise the contents of this table as there was with the earlier one. It’s just an more or less random correspondance which you have to memorise. This is why you need a bit of practice to be able to do the calculation quickly. But if you put your mind to it and test yourself at regular intervals over a couple of days, you’ll probably be able to successfully memorise the correspondance.

So, in order to find the middle digit, you find the remainder of ${r^3}$ on division by 11 by calculating the alternating sum of the digits of ${n^3}$ (and taking the remainder on division by 11 of this alternating sum, although often it will be non-negative and less than 11, in which case it is the same as its remainder). Then you use the table above to find the remainder of ${r}$ upon division by 11. Bearing in mind the fact we stated above about remainders upon division by 11, perhaps you can now see what to do. The alternating sum of the digits of ${n}$ is ${D - m + d}$, where ${D}$ is the initial digit of ${n}$, ${m}$ is the middle digit of ${n}$ and ${d}$ is the final digit of ${n}$. You can work out the values of ${D}$ and ${d}$, and you also know that the remainder on division by 11 of this alternating sum is ${r}$. At this point you might be able to immediately see what ${m}$ has to be, but its value can be calculated systematically: we have ${D - m + d = 11 q + r}$ for some integer ${q}$, so ${D + d - r = 11 q + m}$, which shows that ${m}$ is the remainder on division by 11 of ${D + d - r}$.

This is a little complicated, so an example will be helpful. Suppose ${n^3 = 257259456}$. The final digit of ${n}$ must also be 6 (using the table), and the initial digit of ${n}$ must be 6 since ${6^2 = 216 \le 257 < 343}$. The next step is to calculate the alternating sum of the digits of ${n^3}$: ${(6 - 5) + (4 - 9) + (5 - 2) + (7 - 5) + 2 = 1 + (-5) + 3 + 2 + 2 = 3}$. From the table it follows that the remainder of ${n}$ upon division by 11 is 9. Therefore, the remainder on division by 11 of ${6 - m + 6}$, i.e. ${12 - m}$, where ${m}$ is the middle digit of ${n}$, must be 9. It is then easy to see that ${m}$ must be 3, so ${n = 636}$. The last step could also be done by noting that ${6 + 6 - 9 = 3}$. Try using a calculator to confirm for yourself that ${636^3 = 257259456}$.

4. Summary

I’ve explained everything at great length here, so it might seem like this method is very complicated, but it isn’t really. Here’s a step-by-step presentation of the method, with rough estimates of how long it will take for you to do each step.

1. Look at the final digit of ${n^3}$ and use your knowledge of the correspondance to find the final digit ${d}$ of ${n}$. (If ${n^3}$ ends in 2, 3, 7 or 8, ${d}$ is 10 minus the final digit of ${n^3}$, and otherwise ${n}$ ends in the same digit as ${n^3}$.)
2. Find the first 3 digits of ${n^3}$ as a 9-digit number. Use your knowledge of the first ten non-negative perfect cubes and find the greatest integer ${D}$ such that ${D^3}$ is less than the resulting 3-digit number. The first digit is ${D}$.
3. Find the alternating sum of the digits of ${n^3}$, and if needed repeat the process to get the remainder of ${n^3}$ on division by 11.
4. Use your knowledge of the correspondance to find the remainder ${r}$ on division by 11 of ${n}$.
5. Calculate ${D + d - r}$ and find its remainder ${m}$ on division by 11. The middle digit is ${m}$.

If you have everything memorised, I think step 1 will take at most 2 seconds, step 2 will take perhaps a little longer, but still at most 5 seconds, step 3 will take the majority of your time, at most 30 seconds, with the potential to last much longer if you get confused, step 4 will take at most 2 seconds, and step 5 will take at most 10 seconds. That’s why I can confidently say that you will be able to calculate the cube root within a minute.

I learnt about this from this post at Dead Reckonings. If you are interested in this, have a look at that post— it covers a lot of other mental calculation methods in a more concise manner than this post. I don’t know about you, but until I came across that post I always used to associate the topic of mental calculation with tedious execution of algorithms and had therefore considered it uninteresting and not really `real maths’. But as you acquire more mathematical knowledge, you find that calculations end up becoming a sort of creative process, where you often don’t stick to a single method but improvise a way of tackling the problem, drawing on what you know, so that it can be solved as quickly as possible. It’s also interesting to see why these algorithms work and think of how one might come up with them. If you’re interested you could try coming up with similar algorithms for other kinds of roots. Or, perhaps, see if there’s a way of finding cube roots of numbers with more than 9 digits (though I have no idea how you might do that).