Numbers and Arithmetic

How to Check Your Arithmetic With Casting Out Nines

Use digit sums to test additions, products and divisions in seconds, see why the method works, and learn which errors it cannot catch.

Key takeaways

  • Adding the digits of a whole number gives a result with the same remainder on division by 9 as the number itself.
  • Run the same addition, subtraction or multiplication on those remainders and compare with the remainder of your answer.
  • A mismatch proves there is an error, while a match only makes the answer more believable.
  • Swapped digits and misplaced zeros pass the nines test, and a second test with 11 catches many of them.

Casting out nines is a quick test for arithmetic done by hand. You replace each number with a single small digit, its remainder on division by 9, repeat the calculation with those small digits, and see whether the two sides agree.

If they disagree, your answer is certainly wrong (or you slipped while checking). If they agree, your answer is probably right, though not proven right. That one-sided verdict is the key to using the method well.

Finding the check digit

Add the digits of the number. If the total has more than one digit, add its digits again, and keep going until a single digit remains. Treat a final 9 as 0, since both stand for "divisible by 9".

4738 → 4 + 7 + 3 + 8 = 22 → 2 + 2 = 4

So 4,738 leaves remainder 4 when divided by 9. You can confirm it: 9 × 526 = 4,734, and 4 is left over.

The name comes from a shortcut. Because nines do not affect the remainder, you may throw them away as you go. Cross out any 9, and any group of digits that adds to 9. In 7,295,184 you can discard the 9, then the pairs 7 + 2, 5 + 4 and 8 + 1. Nothing is left, so the number is divisible by 9.

Checking a multiplication

Suppose you computed 347 × 628 = 217,916. Find the check digit of each factor, multiply those, and reduce again.

347    → 3 + 4 + 7 = 14      → 5
628    → 6 + 2 + 8 = 16      → 7
5 × 7 = 35                   → 8
217916 → 2+1+7+9+1+6 = 26    → 8

Both sides give 8, so the answer passes. Now imagine you had written 217,816 instead. Its digits add to 25, which reduces to 7. Since 7 is not 8, you know something went wrong before anyone else tells you.

The nines check for a product
1 Reduce each factor Add digits until one remains 2 Multiply the digits Reduce that product too 3 Reduce your answer Same digit-adding rule 4 Compare Different means wrong. Equal means likely right Reduce each factor Add digits until one remains 1 Multiply the digits Reduce that product too 2 Reduce your answer Same digit-adding rule 3 Compare Different means wrong. Equal means likely right 4

Addition and subtraction

The same recipe works for sums. For 5,286 + 3,947 = 9,233, the check digits of the two addends are 3 and 5. Their sum is 8, and 9,233 also reduces to 8.

Subtraction needs one extra rule. Take 7,120 − 3,485 = 3,635. The check digits are 1 and 2, and 1 − 2 = −1. When the result is negative, add 9, giving 8. The answer 3,635 has digit sum 17, which reduces to 8, so it passes.

Long columns benefit most. To check a sum of ten numbers, reduce each one as you read down the column and keep a running check digit that never grows past a single figure. Then compare it with the check digit of your total. You are doing the addition a second time along a different route, so you are unlikely to repeat the same mistake.

Division with a remainder

Do not try to divide check digits. Instead, rewrite the division as a multiplication and an addition:

dividend = divisor × quotient + remainder

Suppose long division gave you 9,875 ÷ 23 = 429 with remainder 8.

divisor 23     → 5
quotient 429   → 15 → 6
remainder 8    → 8
5 × 6 + 8 = 38 → 11 → 2
dividend 9875  → 29 → 11 → 2

The two sides match. You should also confirm separately that the remainder is smaller than the divisor, because the nines test says nothing about that.

Checking a long multiplication line by line

If a product fails the test, you can use the same tool to find where it went wrong. Suppose your written working for 347 × 628 shows three partial products: 2,776 for 347 × 8, 6,940 for 347 × 20 and 208,200 for 347 × 600.

The check digit of 347 is 5. So each line should match 5 times the check digit of its multiplier.

Line Expected check digit Digit sum of line Verdict
347 × 8 = 2,776 5 × 8 = 40 → 4 22 → 4 passes
347 × 20 = 6,940 5 × 2 = 10 → 1 19 → 1 passes
347 × 600 = 208,200 5 × 6 = 30 → 3 12 → 3 passes

All three lines pass here. If one had failed, you would redo only that line. If every line passed while the total failed, the mistake would be in the final addition.

Finding a missing digit

The test can also recover a single smudged digit. Say you know 347 × 628 = 21?,916, with one digit unreadable. The product of the check digits tells you that the whole answer must reduce to 8.

visible digits:  2 + 1 + 9 + 1 + 6 = 19
need:            19 + d leaves remainder 8 on division by 9
19 leaves remainder 1, so d = 7
check:           19 + 7 = 26 → 8

The missing digit is 7. There is one limit: if the answer had called for a remainder of 0 from the hidden digit, you could not tell a 0 from a 9.

Spotting numbers that cannot be squares

Check digits restrict what a square can look like. A whole number leaves a remainder from 0 to 8 on division by 9, and squaring each of those possibilities gives only the remainders 0, 1, 4 and 7.

So a number whose digits reduce to 2, 3, 5, 6 or 8 is not a perfect square. For 3,152, the digit sum is 11, which reduces to 2, so no whole number squared equals 3,152. The test cannot confirm a square: 13 reduces to 4 and is not one.

The same recipe checks a square you computed. For 47² = 2,209, the check digit of 47 is 2, its square is 4, and 2,209 has digit sum 13, which reduces to 4.

Why it works

The reason lies in the number 10. Since 10 = 9 + 1, it leaves remainder 1 when divided by 9. So do 100 = 99 + 1, 1,000 = 999 + 1 and every higher power of ten.

A number in place value notation is a sum of digits times powers of ten. Take 4,738:

4738 = 4×1000 + 7×100 + 3×10 + 8
     = 4×(999+1) + 7×(99+1) + 3×(9+1) + 8
     = (a multiple of 9) + (4 + 7 + 3 + 8)

The number and its digit sum differ by a multiple of 9, so they leave the same remainder.

The second ingredient is that remainders respect addition, subtraction and multiplication. If you write one number as 9j + a and another as 9k + b, their product is 81jk + 9jb + 9ka + ab. Everything except ab is a multiple of 9. This is modular arithmetic, and mathematicians write the key fact as 10 ≡ 1 (mod 9).

What slips past the test

The check sees only the remainder modulo 9, so any error that changes the answer by a multiple of 9 is invisible. Several very human mistakes fall in that group.

Mistake Correct Written Caught by nines?
One wrong digit, off by 1 217,916 217,816 Yes
Two digits swapped 217,916 217,196 No
An extra zero 217,916 2,179,160 No
A 0 written as 9 4,051 4,951 No
Digits in wrong columns 1,230 12,300 No

A transposition keeps the same digits and therefore the same digit sum. A zero adds nothing to the sum. If wrong answers produced check digits at random, about 1 in 9 would slip through, but real errors are not random, so treat that figure only as a loose guide.

This is why you should pair the method with a size estimate, which catches the extra zero immediately.

A second check using 11

Elevens give a useful partner test. Starting from the right end of a number, add and subtract the digits alternately. The result, adjusted by multiples of 11 to land between 0 and 10, is the remainder on division by 11. It works because 10 leaves remainder −1 when divided by 11, so the powers of ten alternate between +1 and −1.

347     → 7 − 4 + 3              = 6
628     → 8 − 2 + 6 = 12         → 1
6 × 1                            = 6
217916  → 6 − 1 + 9 − 7 + 1 − 2  = 6

The product passes again. The elevens test catches every swap of two different neighboring digits, which the nines test always misses. It has blind spots too: swapping two digits that sit two places apart goes unnoticed.

If an answer passes both tests, any error left in it must change the value by a multiple of 99.

An old tool with modern relatives

Casting out nines appears in medieval arithmetic books, including Fibonacci's Liber Abaci of 1202, which taught Hindu-Arabic numerals to European readers. It was valuable when calculations were long, done by hand and often erased as they went, leaving no easy way to retrace the steps.

The underlying idea, attaching a small remainder to a large number so that errors show up, is still at work. Many identification numbers carry a final digit computed from the others. Our article on check digits shows how weighted versions are designed to catch the typing mistakes that a plain digit sum misses.

If your interest is in the tests themselves, the same reasoning produces rules for 3, 9, 11 and other divisors.

The same trick in other bases

Nothing here depends on ten except the choice of nine. In base b, the number b itself leaves remainder 1 on division by b − 1, so adding digits preserves the remainder modulo b − 1.

In base sixteen, used widely in computing, you can cast out fifteens. The hexadecimal number 1A means 16 + 10 = 26. Its digits add to 1 + 10 = 11, and 26 does leave remainder 11 on division by 15.

In base eight you would cast out sevens. The octal number 25 means 2 × 8 + 5 = 21, and its digit sum, 7, shows that it is divisible by 7.

Seeing the method in another base makes clear that nine has no special magic. Its role comes from sitting one below the base we happen to write in.

Common mistakes when checking

  • Reducing the final answer but forgetting to reduce the product of the check digits.
  • Treating a match as proof. Say "it passes", and keep a little doubt.
  • Applying digit sums directly to a quotient. Always convert division to multiplication first.
  • Ignoring the decimal point. For 3.47 × 6.28, the check works on the digits, so confirm the point's position by estimating: about 3.5 × 6 = 21, which gives 21.7916.
  • Using the method on rounded values. If you rounded anywhere, the exact remainder is gone and the test will fail for harmless reasons.

A good habit is to check immediately after finishing a calculation, while the figures are still in front of you. It takes a few seconds, and a failed test tells you to look again before the number gets used anywhere.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 38 articles in Numbers and Arithmetic →

Latest news on this topic