Why the digit-sum test for 3 and 9 works

17 October 2026

Is 5238 divisible by 9? You do not need to divide. Add the digits: 5 + 2 + 3 + 8 = 18, and 18 is a multiple of 9, so the answer is yes. Most of us learn this rule early and never ask why it works. Here is the reason, and it takes only four lines.

The rules

Check them on two numbers. For 5238 the digit sum is 18, so it is divisible by 9, and indeed 5238 = 9 × 582. For 7251 the digit sum is 7 + 2 + 5 + 1 = 15. That is a multiple of 3 but not of 9, so 7251 is divisible by 3 (7251 = 3 × 2417) but not by 9.

Why it works

Look at the place values 10, 100, 1000 and so on. Each one is one more than a number made only of nines:

Numbers such as 9, 99 and 999 are all multiples of 9. Now take 5238 and write it by place value:

The first bracket is a sum of multiples of 9, so it is divisible by 9 whatever the digits are. That leaves only the second bracket, which is the digit sum. So 5238 is divisible by 9 exactly when 5 + 2 + 3 + 8 is. The same argument works for any number. Since 3 divides 9, it also explains the rule for 3.

The remainder comes for free

The argument says a number and its digit sum leave the same remainder when divided by 9. For 7251 the digit sum is 15, and 15 leaves remainder 6 on division by 9. Check: 7251 = 9 × 805 + 6.

Casting out nines: a quick check for your sums

Because of this, you can check a multiplication quickly. Replace each number by its digit sum (repeat until one digit remains) and multiply those. For 123 × 45 = 5535:

The two sides agree, so the answer passes. Be careful, though. A mismatch proves a mistake, but a match does not prove the answer is right. If you wrote 5355 by swapping two digits, the check would still pass, because the digit sum does not care about order.

Try it yourself

Answers: 2358 is divisible by 9 (digit sum 18, and 2358 = 9 × 262). 123456 has digit sum 21, so it is divisible by 3 but not by 9. The remainder for 8765 is 8, since the digit sum 26 leaves 8. Ideas like these appear in the number chapters of the Class 8 syllabus, and you can practise with a fresh test from the Practice Generator.

Read next