Divisibility rule

Divisibility rule
A divisibility rule is a shorthand way of determining whether a given integer is divisible by a fixed divisor without performing the division, usually by examining its digits.

Although there are divisibility tests for numbers in any radix, or base, and they are all different, this article presents rules and examples only for decimal, or base 10, numbers.

Video: Divisibility Rule 1 to 20

Divisibility rules for numbers 1–30

The rules given below transform a given number into a generally smaller number, while preserving divisibility by the divisor of interest. Therefore, unless otherwise noted, the resulting number should be evaluated for divisibility by the same divisor. In some cases the process can be iterated until the divisibility is obvious; for others (such as examining the last n digits) the result must be examined by other means.

For divisors with multiple rules, the rules are generally ordered first for those appropriate for numbers with many digits, then those useful for numbers with fewer digits.

Divisor

Divisibility condition

Examples

1
No special condition. Any integer is divisible by 1.
2 is divisible by 1.
2
The last digit is even (0, 2, 4, 6, or 8).
1294: 4 is even.
3
Sum the digits. The result must be divisible by 3.
405 → 4 + 0 + 5 = 9 and 636 → 6 + 3 + 6 = 15 which both are clearly divisible by 3.
16,499,205,854,376 → 1+6+4+9+9+2+0+5+8+5+4+3+7+6 sums to 69 → 6 + 9 = 15 → 1 + 5 = 6, which is clearly divisible by 3.
Subtract the quantity of the digits 2, 5, and 8 in the number from the quantity of the digits 1, 4, and 7 in the number. The result must be divisible by 3.
Using the example above: 16,499,205,854,376 has four of the digits 1, 4 and 7 and four of the digits 2, 5 and 8; ∴ Since 4 − 4 = 0 is a multiple of 3, the number 16,499,205,854,376 is divisible by 3.
4
The last two digits form a number that is divisible by 4.
40,832: 32 is divisible by 4.
If the tens digit is even, the ones digit must be 0, 4, or 8.
If the tens digit is odd, the ones digit must be 2 or 6.
40,832: 3 is odd, and the last digit is 2.
Twice the tens digit, plus the ones digit is divisible by 4.
40832: 2 × 3 + 2 = 8, which is divisible by 4.
5
The last digit is 0 or 5.
495: the last digit is 5.
6
It is divisible by 2 and by 3.
1458: 1 + 4 + 5 + 8 = 18, so it is divisible by 3 and the last digit is even, hence the number is divisible by 6.
7
Forming an alternating sum of blocks of three from right to left gives a multiple of 7
1,369,851: 851 − 369 + 1 = 483 = 7 × 69
Subtracting 2 times the last digit from the rest gives a multiple of 7. (Works because 21 is divisible by 7.)
483: 48 − (3 × 2) = 42 = 7 × 6.
Adding 5 times the last digit to the rest gives a multiple of 7. (Works because 49 is divisible by 7.)
483: 48 + (3 × 5) = 63 = 7 × 9.
Adding 3 times the first digit to the next gives a multiple of 7 (This works because 10a + b − 7a = 3a + b − last number has the same remainder)
483: 4×3 + 8 = '20' remainder 6,
203: 2×3 + 0 = '6'
63: 6×3 + 3 = 21.
Adding the last two digits to twice the rest gives a multiple of 7. (Works because 98 is divisible by 7.)
483,595: 95 + (2 × 4835) = 9765: 65 + (2 × 97) = 259: 59 + (2 × 2) = 63.
Multiply each digit (from right to left) by the digit in the corresponding position in this pattern (from left to right): 1, 3, 2, -1, -3, -2 (repeating for digits beyond the hundred-thousands place). Adding the results gives a multiple of 7.
483,595: (4 × (-2)) + (8 × (-3)) + (3 × (-1)) + (5 × 2) + (9 × 3) + (5 × 1) = 7.
Adding the last digit to 3 times the rest gives a multiple of 7. 
224: 4 + (3 x 22) = 70
---------- -------------
8
   
   
   
   
   
9
   
10
   
11
   
   
   
   
   
   
12
   
   
13
   
   
   
   
14
   
   
15
   
16
   
   
   
   
17
   
   
18
   
19
   
   
20
   
   
21
   
   
22
   
23
   
   
24
   
25
   
26
   
27
   
   
   
28
   
29
   

 

 

‹ Cube root video           up           Divisibility rule review ›

 

NOTE: You need to be subscribed to either a monthly or annual plan to view the full set of Math Lessons (Study Guide)
Please visit  to register for a plan. 

Have fun learning!