Skip to content
Prime Checker
Menu

Divisibility Rules

Shortcuts for telling whether a number divides evenly by 2 through 12 without doing the division. Enter a number to apply all of them.

Updated · exact integer math

See which numbers from 2 to 12 divide it, and the rule behind each answer.

2,520 is divisible by

2, 3, 4, 5, 6, 7, 8, 9, 10, 12

÷ 2
last digit is 0
Yes
÷ 3
digit sum is 9
Yes
÷ 4
last two digits 20
Yes
÷ 5
last digit is 0
Yes
÷ 6
divisible by both 2 and 3?
Yes
÷ 7
checked directly
Yes
÷ 8
last three digits 520
Yes
÷ 9
digit sum is 9
Yes
÷ 10
last digit is 0
Yes
÷ 11
alternating digit sum is 1
No
÷ 12
divisible by both 3 and 4?
Yes

Divisibility rules chart

DivisorRuleExample
2The last digit is even (0, 2, 4, 6, 8).1,358 ends in 8
3The sum of the digits is divisible by 3.531: 5 + 3 + 1 = 9
4The last two digits make a number divisible by 4.7,316: 16 ÷ 4 = 4
5The last digit is 0 or 5.2,485
6It's divisible by both 2 and 3.714: even, and 7 + 1 + 4 = 12
7Double the last digit and subtract it from the rest; repeat until the result is easy to check.203: 20 − 6 = 14
8The last three digits make a number divisible by 8.5,136: 136 ÷ 8 = 17
9The sum of the digits is divisible by 9.4,887: 4 + 8 + 8 + 7 = 27
10The last digit is 0.4,560
11The alternating sum of the digits (from the right: +, −, +…) is divisible by 11.918,082: 2 − 8 + 0 − 8 + 1 − 9 = −22
12It's divisible by both 3 and 4.1,512: digits sum to 9, and 12 ÷ 4 = 3

Using divisibility rules to spot primes

If any rule from 2 to 11 passes, the number is composite (unless it is that divisor itself). Passing none doesn't prove it's prime, though: 169 = 13 × 13 fails every rule up to 12. For a definite answer, use the prime number checker, or read how to test primes by hand in what is a prime number.

Questions people ask

What is the divisibility rule for 7?

Double the last digit, subtract from the rest. 343: 34 − 6 = 28 = 4 × 7, so yes.

Why does the rule for 3 work?

10, 100, 1,000… are each one more than a multiple of 3, so a number and its digit sum leave the same remainder.

Sources

More prime number tools