creouts
A ring of the digits 1 to 9 around the words divide by 9, what is left?, beside the cover of Escape the Night Train.

Field Notes

Casting Out Nines: Check Any Sum in Ten Seconds

4 min read
  • Tricks
  • Checking
  • Number pyramids

You have done a long sum and want to know if it is right. Doing it again the same way tends to repeat the same slip. Casting out nines is a different route to the same answer: it uses tiny numbers, takes about ten seconds, and works for adding, subtracting and multiplying. (For a simpler check that only looks at odd and even, see The Odd-Even Check.)

Step 1: the digit sum

Add the digits of a number. If the answer has two digits, add those too, until one digit is left. A 9 counts as 0, because nines get "cast out". Here is 2,847.

The digits 2, 8, 4, 7. The 2 and the 7 are crossed out because they make 9. The 8 and 4 make 12, and 1 plus 2 is 3, so the digit sum of 2,847 is 3.
Any digits that add to 9 can be crossed out first. The reason: a nine adds nothing to the final answer.

Why it works

Ten is one more than nine. So a hundred is 99 + 1, a thousand is 999 + 1, and so on: every place value is a pile of nines plus one. Split 347 that way and the piles of nines are all multiples of 9, leaving only the digits to add up.

Three boxes: 3 hundreds is 3 times 99 plus 3; 4 tens is 4 times 9 plus 4; 7 ones is 7. Below: 347 equals 297 plus 36 plus 3 plus 4 plus 7.
A number and its digit sum leave the same remainder when divided by 9. That is the whole secret.

Because of that, adding, subtracting or multiplying two numbers does the same thing to their digit sums as it does to the numbers themselves, as far as remainders from 9 go. So if you do the sum on the small digit sums, the answer must have the digit sum you get.

Step 2: the check, for + - and x

Draw a cross. Put the digit sums of the two numbers left and right, and do the sum on them at the top. At the bottom, put the digit sum of the answer you wrote. Top and bottom must match.

Three crosses. Addition: 2,847 plus 1,596 equals 4,443; left 3, right 3, top 6, bottom 6. Subtraction: 5,230 minus 1,847 equals 3,383; left 1, right 2, top 8, bottom 8. Multiplication: 47 times 23 equals 1,081; left 2, right 5, top 1, bottom 1.
Three worked checks, all of which match. Every number here was calculated first.
  • Adding: 3 + 3 = 6, and 4,443 has digit sum 4 + 4 + 4 + 3 = 15, then 6. Match.
  • Subtracting: 1 - 2 = -1. Add 9 to get 8. The answer 3,383 gives 3 + 3 + 8 + 3 = 17, then 8. Match.
  • Multiplying: 2 x 5 = 10, then 1 + 0 = 1. The answer 1,081 gives 1 + 0 + 8 + 1 = 10, then 1. Match.

If top and bottom disagree, there is a mistake somewhere. Try 2,847 + 1,596 = 4,433: the bottom becomes 5, the top is still 6. Caught.

Checking a pyramid

A number pyramid is a stack of small additions: each brick is the two bricks below it added together. That is perfect for this check. Put the digit sum beside each brick, then test each brick against the two below it.

Two pyramids with a digit-sum badge on every brick. Left: bottom 27, 46, 38; middle 73, 84; top 157, all matching. Right: the same bottom row, but 83 in the middle instead of 84 and 156 on top; the 83 brick is highlighted because 1 plus 2 is 3 but 83 has digit sum 2.
Left: every brick matches. Right: one slip, caught by one badge.

The right-hand pyramid is a useful warning. Its top, 156, is 73 + 83, so it matches the bricks just below it. The mistake sits one level down. Check every brick, not only the top.

What it cannot catch

Casting out nines can only say "probably right" or "definitely wrong". It misses two kinds of slip:

  • Swapped digits. 4,443 written as 4,434 has the same digits, so the same digit sum. The check passes a wrong answer.
  • Errors that are a multiple of 9. Being out by 9, 18 or 90 changes the number but not its remainder from 9, so the check stays quiet. (Swapping two neighbouring digits changes a number by a multiple of 9, which is why those two cases are really one.)
Four wrong answers for 4,443. 4,434, 4,533 and 4,452 all have digit sum 6 and pass the check although they are wrong. 4,433 has digit sum 5 and is caught.
Three wrong answers sneak through; one is caught.

A pass does not prove the sum. A fail does prove a mistake, so use it as a quick filter, then look again at any row that fails.

Where a puzzle adventure fits

Escape the Pyramid, Level 1 and Escape the Labyrinth are puzzle adventure gamebooks, so you do not read them in order. Number pyramids are one of the lock kinds in each book, so there are plenty of small additions to check, but they are not the whole book, and neither book teaches this trick: it is just a handy way to test your own work before you turn to the page your answer sends you to.

A chamber page of Escape the Night Train: a drawn sleeping car with bunks and a door, the Carriage Lamps rule, a partly filled number pyramid with two lamp totals, and a Next Door box.
A chamber page as printed, at low resolution. Nothing is solved.

Books mentioned

Escape the Pyramid, Level 1 (Easy) cover

Escape the Pyramid, Level 1 (Easy)

A puzzle adventure gamebook with 45 locked chambers and 6 treasure rooms, hints and full answers in the back.

View on Amazon
Escape the Labyrinth cover

Escape the Labyrinth

A puzzle adventure gamebook with 45 locked chambers. You choose your road, and the puzzle kind changes from door to door.

View on Amazon
Escape the Night Train cover

Escape the Night Train

Cross nine locked carriages to the pyramids by dawn. A puzzle adventure gamebook.

View on Amazon

As an Amazon Associate we earn from qualifying purchases. Cover images are the ones we have on file; the book you receive may show a slightly different cover.

More field notes