Divisibility Rules and the Algebra That Proves Them
Learn quick tests for divisibility by 2 through 11, then prove why they work using place value and a little algebra.
Key takeaways
- Rules for 2, 4, 5, 8 and 10 look only at the last one, two or three digits.
- Rules for 3 and 9 use the digit sum, because every power of 10 is one more than a multiple of 9.
- The rule for 11 uses an alternating sum of digits, starting from the right.
- A rule for 6 combines the tests for 2 and 3, which works because 2 and 3 share no common factor.
- Writing digits as letters turns a pattern you noticed into a proof for all numbers.
A divisibility rule tells you whether one whole number divides another without doing the division. To check whether 4,356 is divisible by 9, you add its digits: 4 + 3 + 5 + 6 = 18. Since 9 divides 18, it divides 4,356.
These rules can look like magic, but each one follows from place value and the distributive property. Once you see the proofs, you can rebuild any rule you forget, and even invent new ones.
The rules at a glance
"Divisible by d" means that dividing by d leaves remainder 0. In other words, the number equals d times some integer.
| Divisor | Test | Example |
|---|---|---|
| 2 | last digit is 0, 2, 4, 6 or 8 | 4,356 passes |
| 3 | digit sum is divisible by 3 | 4,356 passes (18) |
| 4 | last two digits form a multiple of 4 | 4,356 passes (56) |
| 5 | last digit is 0 or 5 | 4,356 fails |
| 6 | passes both 2 and 3 | 4,356 passes |
| 8 | last three digits form a multiple of 8 | 4,356 fails (356) |
| 9 | digit sum is divisible by 9 | 4,356 passes (18) |
| 10 | last digit is 0 | 4,356 fails |
| 11 | alternating digit sum is divisible by 11 | 4,356 passes (0) |
One fact behind every proof
If d divides two integers, it divides their sum and their difference. If d divides one integer, it divides every integer multiple of it.
Here is why. Say a = dm and b = dn. Then a + b = d(m + n), which is d times an integer.
From this comes the working principle. If a number n can be split as n = (something d surely divides) + r, then d divides n exactly when d divides r. Every rule below is a clever split of this kind. Factoring out the d is the distributive property read backward.
Last-digit rules: 2, 5 and 10
Write any whole number as n = 10q + r, where r is the last digit and q is the number made of the other digits. For 4,356, q = 435 and r = 6.
Since 10 = 2 × 5, both 2 and 5 divide 10q. So 2 divides n exactly when 2 divides r, and the same holds for 5 and for 10. Only the last digit matters.
Longer tails: 4 and 8
Because 100 = 4 × 25, split off the last two digits: n = 100q + r. The part 100q is always a multiple of 4, so only r decides.
For 8 you need three digits, since 100 is not a multiple of 8 but 1,000 = 8 × 125 is. With n = 1000q + r, test r. For 71,352, check 352 = 8 × 44, so the number is divisible by 8.
The pattern continues: for 16, look at the last four digits. In general, 2ᵏ divides 10ᵏ, so the last k digits settle the question.
Digit sums: 3 and 9
Take a three-digit number with digits a, b and c. Its value is 100a + 10b + c. Now peel off multiples of 9.
100a + 10b + c
= (99a + a) + (9b + b) + c
= 99a + 9b + (a + b + c)
= 9(11a + b) + (a + b + c) The first part is a multiple of 9, and so of 3. Therefore 9 divides the number exactly when it divides a + b + c, and likewise for 3.
The proof extends to any length, because 10, 100, 1,000 and every higher power of 10 is 1 more than a string of 9s.
It also gives more than a yes or no: a number and its digit sum leave the same remainder on division by 9. Since 5 + 8 + 2 = 15 leaves remainder 6, so does 582. Check: 582 = 9 × 64 + 6.
Alternating sums: 11
The powers of 10 sit alternately one below and one above a multiple of 11: 10 = 11 - 1, 100 = 99 + 1, 1,000 = 1,001 - 1 and 10,000 = 9,999 + 1.
For four digits a, b, c and d:
1000a + 100b + 10c + d
= (1001a - a) + (99b + b) + (11c - c) + d
= 11(91a + 9b + c) + (d - c + b - a) So you start at the rightmost digit and alternately add and subtract. For 4,356: 6 - 5 + 3 - 4 = 0. Zero is divisible by 11, and indeed 4,356 = 11 × 396. A negative result is fine too. It counts as divisible if it is a multiple of 11.
Combining rules: 6, 12 and more
A number is divisible by 6 exactly when it is divisible by 2 and by 3. For 12, test 3 and 4. For 18, test 2 and 9.
The two tests must use factors with no common factor above 1. Testing 4 and 6 does not establish divisibility by 24: the number 12 passes both and is not divisible by 24. The correct pair for 24 is 3 and 8. Prime factorization shows how to choose: keep each prime power together.
A rule for 7
There is a less famous test: remove the last digit, double it and subtract it from what remains. The original is divisible by 7 exactly when the result is.
For 343: 34 - 2 × 3 = 28, a multiple of 7. So 343 is divisible by 7.
The proof is short. Write n = 10q + r and consider q - 2r.
10(q - 2r) = 10q - 20r
= (10q + r) - 21r
= n - 21r Since 21r is a multiple of 7, 7 divides n exactly when it divides 10(q - 2r). Because 10 shares no factor with 7, that happens exactly when 7 divides q - 2r.
Using the rules on real tasks
The most frequent use is factoring and reducing. Faced with 2,574/990, you can see at once that both are even. The digit sums are 18 and 18, so 9 divides both. Dividing by 18 gives 143/55, and the alternating sums show that 11 divides each: the result is 13/5.
You can also find a missing digit. Suppose the number 47_2, with one unknown digit d, must be divisible by 9. The digit sum is 4 + 7 + d + 2 = 13 + d. The only digit that makes this a multiple of 9 is d = 5, giving 4,752. Check: 9 × 528 = 4,752.
Now ask for a multiple of 11 of the form 47_2. The alternating sum from the right is 2 - d + 7 - 4 = 5 - d. It is a multiple of 11 when d = 5 as well, so 4,752 is divisible by 99. Check: 99 × 48 = 4,752.
Digit rules also catch arithmetic slips. If you multiply by 9 and the digit sum of your product is not a multiple of 9, something went wrong. A passing test does not prove the product right, since swapping two digits keeps the digit sum the same.
Why swapped digits differ by a multiple of 9
Here is a neat consequence. Take a two-digit number with tens digit a and units digit b, then reverse it.
(10a + b) - (10b + a) = 9a - 9b = 9(a - b) The difference is always a multiple of 9. For 83 and 38, it is 45 = 9 × 5. People who balance accounts by hand have long used this clue: a mismatch divisible by 9 hints at a swapped pair of digits.
Adding the reversal instead gives (10a + b) + (10b + a) = 11(a + b), a multiple of 11. For 83 + 38 you get 121 = 11 × 11.
For three-digit numbers, reversing and subtracting gives 99(a - c), because the middle digit cancels. With 724 and 427 the difference is 297 = 99 × 3.
Writing a proof well
A good divisibility proof has a simple shape.
- Name the number with letters that match the claim, such as 2k + 1 for an odd integer.
- State that the letters stand for integers.
- Rearrange until the divisor appears as a factor.
- Point out that what remains in the parentheses is an integer.
Testing many examples is a fine way to guess a pattern, but it is not a proof. The expression n² + n + 41 produces primes for n = 0 through 39, and then at n = 40 gives 1,681 = 41². Forty successes did not make the pattern true.
When a claim is false, one counterexample is enough to reject it. "Every multiple of 3 is a multiple of 6" fails at 9.
Proofs beyond the digits
The same habit, writing numbers with letters, proves facts that no table of rules contains. Show that n³ - n is divisible by 6 for every integer n.
n³ - n = n(n² - 1) = (n - 1)n(n + 1) This is a product of three consecutive integers. At least one of them is even, and exactly one is a multiple of 3. So the product is divisible by 2 and by 3, hence by 6. For n = 5, 125 - 5 = 120 = 6 × 20.
Another: the square of an odd integer leaves remainder 1 when divided by 8. Write the number as 2k + 1. Then (2k + 1)² = 4k(k + 1) + 1, and k(k + 1) is a product of neighbors, so it is even. That makes 4k(k + 1) a multiple of 8.
For the larger framework behind these arguments, see modular arithmetic and integer solutions.
Common questions
Is there a rule for 25?
Yes. Since 100 = 4 × 25, only the last two digits matter, so a number is divisible by 25 when it ends in 00, 25, 50 or 75. The proof is the same split used for 4, with n = 100q + r. A rule for 125 looks at the last three digits, because 1,000 = 8 × 125. Once you see which power of 10 your divisor goes into, the length of the tail follows.
Why does the digit rule not work for 7?
Powers of 10 leave remainders on division by 7 that cycle through 1, 3, 2, 6, 4, 5. A rule using those weights exists, but it is harder to remember than the doubling test.
Do the rules depend on writing in base ten?
Yes. The digit tricks come from the base. In base eight, for example, the digit sum would test divisibility by 7. Whether a number is divisible by 7 is the same fact in any base, but the shortcut changes.
Can I use these rules on negative numbers?
Yes. A negative integer is divisible by d exactly when its opposite is, so ignore the sign and test the rest.