Checking whether one number divides another by performing the full division works — but it is slow, especially for large numbers. For the most common divisors, patterns in the decimal digits provide an answer instantly. Each pattern is a consequence of how modular arithmetic interacts with the base-10 place value system, compressed into a rule simple enough to apply mentally.
Is 7,836 divisible by 3 — and can that be told without doing the division?
Long division answers the question, but it takes several steps and is easy to slip on. Perhaps the digits themselves carry a quicker sign.
Adding the digits and testing the small sum gives the same verdict as the division every time.
number
long division by 3
sum of digits
digit sum divisible by 3?
7,836
2,612 remainder 0
7 + 8 + 3 + 6 = 24
yes
1,234
411 remainder 1
1 + 2 + 3 + 4 = 10
no
5,001
1,667 remainder 0
5 + 0 + 0 + 1 = 6
yes
98
32 remainder 2
9 + 8 = 17
no
In each row the digit sum and the division agree: 7,836 and 5,001 are divisible by 3, while 1,234 and 98 are not — and the digit sum took one line instead of a full division.
The verdict can be read from the digits because of the way base-10 numbers are built.
Every rule exploits the structure of base-10 representation. A number like 5,432 is shorthand for 5⋅103+4⋅102+3⋅10+2. The behavior of the powers of 10 under modulo determines which digit patterns reveal divisibility — and different divisors respond to different patterns.
The definition
A divisibility rule is a shortcut that decides whether a number is divisible by a given divisor by looking at its digits, without carrying out the division.
A divisibility rule is a shortcut that determines whether a number is divisible by a given divisor without carrying out the division. Instead of computing 7,836÷3 and checking for a remainder, the rule says: add the digits 7+8+3+6=24, and check whether that sum is divisible by 3. It is, so 3∣7836.
So "add the digits and test the sum" is the divisibility rule for 3, and it shows that 3∣7836.
A rule is a fast path to the same yes-or-no answer the definition gives — not a new definition.
The rules are shortcuts, not definitions. The definition of divisibility is a∣b when b=a⋅k for some integer — equivalently, when bmoda=0. The rules provide fast paths to that same conclusion.
Each divisor has its own rule, and a rule for one divisor says nothing about another.
The digit-sum test works for 3 and 9, not for 7: 16 has digit sum 7, yet 7 does not divide 16. The rules divisor by divisor start with divisibility by 2, and the reasons behind them are collected in why these rules work.
The rest of the page covers the rules for 2, 3, 4, 5, 6, 8, 9, 10 and 11, combining rules, worked examples, and why the rules work.
Divisibility by 2
RULE
A number is divisible by 2 if its last digit is even: 0,2,4,6, or 8.
Since 10 is divisible by 2, every power of 10 is also divisible by 2. The contribution of each digit beyond the ones place — d⋅10k for k≥1 — is automatically a multiple of 2. Only the final digit d0 remains outside that guarantee, so d0 alone determines divisibility.
The number 1,746 ends in 6 (even), so 2∣1746, as the figure below shows.
The number 3,821 ends in 1 (odd), so 2∤3821.
The even numbers — …,−4,−2,0,2,4,6,… — are precisely the integers divisible by 2. The odd numbers are those that leave a remainder of 1.
The ÷2 column: every other number
Down the highlighted column every second number is marked, and their last digits run 0, 2, 4, 6, 8 and repeat: the rule for 2 is the pattern of that column read off the ones place. Nothing about the higher digits matters. Scan the column for any range of numbers on the interactive divisibility table.
The rule for 5 and the rule for 10 read the same digit in the same way.
Divisibility by 3
RULE
A number is divisible by 3 if the sum of its digits is divisible by 3.
The reason traces to a single congruence: 10≡1(mod3). Every power of 10 is also congruent to 1 modulo 3: 102≡1, 103≡1, and so on. A digit d in the kth place contributes d⋅10k≡d⋅1=d(mod3). The place value drops away entirely, and only the digit itself matters. The number is congruent to the sum of its digits modulo 3.
The reason for the rule as a chain of congruences modulo 3, from the one fact about 10 to the share of a single digit.
ProveA number is divisible by 3 if the sum of its digits is divisible by 3.
1
10≡1(mod3)
baseThe single congruence the rule traces to
2
102≡1, 103≡1, and so on
powersEvery power of 10 is also congruent to 1 modulo 3
3
d⋅10k≡d⋅1
one digitA digit d in the kth place, with its place value
4
=d(mod3)
key stepThe place value drops away entirely, and only the digit itself matters
The number is congruent to the sum of its digits modulo 3
Why the rule for 3 worksLearn Math Class
Once every power of 10 counts as 1, the place value of each digit drops away, and that last line is where the rule comes from.
The number 729 illustrates the rule: 7+2+9=18, and 1+8=9. Since 3∣9, the number is divisible by 3 — as shown below.
Pitfall: Testing 3 by the last digit
Judging by the last digit, 2,143 passes because it ends in 3, yet its digit sum 10 fails and 2143=3⋅714+1. And 1,257 ends in 7, but 1+2+5+7=15, so 3∣1257.
The number 1,234: 1+2+3+4=10, and 1+0=1. Since 3∤1, the number is not divisible by 3.
The process can be repeated: if the digit sum is large, sum its digits again. The chain always terminates at a single digit, and that digit determines divisibility.
126: digit sum 9, so divisible by 3 and by 9
The tree tests 126 rule by rule: even, so ÷2 passes; 26 is not a multiple of 4, so ÷4 fails; the digit sum 1 + 2 + 6 = 9 is divisible by 3 and by 9, so both of those tests pass. The digit-sum test is the rule of this section carried out as one branch. Send any number down the tree on the divisibility decision tree.
The rule for 9 is the same test with a stricter target, as the tree’s next question shows.
Divisibility by 4
RULE
A number is divisible by 4 if its last two digits form a number divisible by 4.
The number 100 is divisible by 4, and so is every higher power of 10. Every digit beyond the tens place contributes a multiple of 100 — automatically a multiple of 4. Only the last two digits affect the remainder when dividing by 4.
The number 3,516 illustrates the rule: the last two digits form 16, and 16÷4=4 exactly, so 4∣3516 — as the figure below shows.
Pitfall: Testing 4 by the last digit
Judging by the last digit alone, 2,134 looks divisible by 4 because it ends in 4, yet 34=4⋅8+2, so 4∤2134. And 3,516 ends in 6, yet 16=4⋅4 gives 4∣3516.
The number 7,230: the last two digits form 30, and 30÷4=7.5. So 4∤7230.
For quick mental checks, it helps to know which two-digit endings are divisible by 4: 00,04,08,12,16,20,24,28,32,36,40,44,… — every fourth number from 00 onward.
The ÷4 column: every fourth number
The highlighted column marks every fourth number, and the marks depend only on the last two digits: 12, 16, 112 and 116 are all marked because 12 and 16 are multiples of 4, while the hundreds digit changes nothing. That is the rule for 4 as a column pattern. Check the last-two-digits rule against the column on the interactive divisibility table.
The rule for 8, three digits instead of two, follows the identical logic one power of ten higher.
Divisibility by 5
RULE
A number is divisible by 5 if its last digit is 0 or 5.
The logic is the same as for 2: since 10 is divisible by 5, every digit beyond the ones place contributes a multiple of 5. Only the last digit matters, and the only single digits divisible by 5 are 0 and 5.
The number 4,835 ends in 5, so 5∣4835 — as shown below.
The number 7,832 ends in 2, so 5∤7832.
This is the second simplest rule after divisibility by 10 — a single-digit check with only two possible passing values.
Divisibility by 6
RULE
A number is divisible by 6 if it is divisible by both 2 and 3.
Since 6=2×3 and gcd(2,3)=1, divisibility by 6 requires passing both individual tests: the last digit must be even, and the digit sum must be divisible by 3.
The number 1,254: last digit 4 (even — passes the 2 test), digit sum 1+2+5+4=12 (divisible by 3 — passes the 3 test). Both conditions hold, so 6∣1254.
Pitfall: Stopping after one passed test
Calling 1,234 divisible by 6 because it is even skips the test for 3: its digit sum 10 fails, and 1234=6⋅205+4. Both tests have to pass, as they do for 1,254.
The number 2,135: last digit 5 (odd — fails the 2 test). No need to check the digit sum. The number is not divisible by 6.
This approach generalizes. For any composite divisor n=a×b where a and b are coprime, divisibility by n is equivalent to divisibility by both a and b.
Divisibility by 8
RULE
A number is divisible by 8 if its last three digits form a number divisible by 8.
The number 1,000 is divisible by 8 (1000=8×125), and so is every higher power of 10. Digits beyond the hundreds place contribute multiples of 1,000 — all divisible by 8. Only the last three digits affect the outcome.
The number 53,104 illustrates the rule: the last three digits form 104, and 104÷8=13 exactly, so 8∣53104 — as the figure below shows.
The number 12,345: the last three digits form 345, and 345÷8=43.125. So 8∤12345.
This rule is harder to apply mentally than the rules for 2 or 5, since it requires dividing a three-digit number by 8. For quick estimates, checking whether the three-digit number is close to a known multiple of 8 (8,16,24,…,992,1000) can help.
Each doubling of the divisor, from 2 to 4 to 8, adds one more final digit to check.
Divisibility by 9
RULE
A number is divisible by 9 if the sum of its digits is divisible by 9.
The reasoning is identical to the rule for 3: 10≡1(mod9), so every power of 10 is congruent to 1 modulo 9, and each digit contributes only its face value. The number is congruent to its digit sum modulo 9.
The number 8,127 illustrates the rule: 8+1+2+7=18, and 18÷9=2 exactly, so 9∣8127 — as shown below.
The number 4,825: 4+8+2+5=19, and 19÷9=2 remainder 1. So 9∤4825.
Fact: Swapped digits leave a multiple of 9
Writing 8,172 for 8,127 swaps two digits, and the error 45=9⋅5 is a multiple of 9, as it is for every such swap: both numbers have the same digit sum. Bookkeepers whose totals differ by a multiple of 9 look first for two transposed digits.
Since 9=32, every number divisible by 9 is automatically divisible by 3 — but not the other way around. The number 729 is divisible by both; the number 12 is divisible by 3 but not by 9.
Because only the digit sum matters, the test for 9 cannot see the order of the digits. The numbers 8,127, 8,172 and 7,281 all have the digit sum 18, so all three are multiples of 9, even though they are three different numbers. The test answers the same way for every rearrangement of the same digits.
Divisibility by 10
RULE
A number is divisible by 10 if its last digit is 0.
This is the simplest rule of all. The base of the number system is 10, so a number has no remainder when divided by 10 exactly when the ones place is empty.
The number 5,230 ends in 0, so 10∣5230 — as the figure below shows.
The number 5,235 ends in 5, so 10∤5235.
Since 10=2×5, divisibility by 10 requires divisibility by both 2 and 5. The only digit that is simultaneously even and a multiple of 5 is 0 — which is why the rule reduces to a single condition.
Divisibility by 11
RULE
A number is divisible by 11 if the alternating sum of its digits (from right to left: add, subtract, add, subtract, …) is divisible by 11.
The congruence behind the rule is 10≡−1(mod11). Successive powers of 10 alternate: 100=1, 101≡−1, 102≡1, 103≡−1. Each digit's contribution to the remainder alternates in sign depending on its position.
The number 9,273 illustrates the rule: alternating sum from the right gives 3−7+2−9=−11. Since 11∣(−11), the number is divisible by 11 — as the figure below shows.
The number 5,831: alternating sum gives 1−3+8−5=1. Since 11∤1, the number is not divisible by 11.
If the alternating sum is negative, that is fine — a negative multiple of 11 still indicates divisibility. The result −11, −22, or 0 all confirm the number is divisible by 11.
Combining Rules
RULE
Divisibility by a composite number can be tested by checking its coprime factors separately.
Example
Is 2,340 divisible by 12? Since 12=4×3 and gcd(4,3)=1, check each factor independently. Last two digits: 40, and 40÷4=10 exactly — divisible by 4. Digit sum: 2+3+4+0=9, divisible by 3. Both conditions hold, so 12∣2340.
Example
Is 8,910 divisible by 15? Since 15=5×3 and gcd(5,3)=1, check both. Last digit: 0 — divisible by 5. Digit sum: 8+9+1+0=18 — divisible by 3. Both pass, so 15∣8910.
The coprimality condition is essential. Testing divisibility by 12 as "divisible by 2 and divisible by 6" is not sufficient, because gcd(2,6)=2=1. The factorization must split 12 into coprime components — 4 and 3 — for the combined test to work.
Test a composite divisor through coprime factors only: factors that share a divisor can both pass while the number fails.
Worked Examples
Which of 2,3,4,5,6,8,9,10 divide 4,320? Last digit 0: divisible by 2, 5, and 10. Digit sum 4+3+2+0=9: divisible by 3 and 9. Since divisible by both 2 and 3: divisible by 6. Last two digits 20: 20÷4=5 — divisible by 4. Last three digits 320: 320÷8=40 — divisible by 8. The number passes every test.
Is 7,623 divisible by 3? Digit sum: 7+6+2+3=18. Since 3∣18, yes.
Is 7,623 divisible by 9? Same digit sum: 18. Since 9∣18, yes.
Is 7,623 divisible by 6? Last digit 3 is odd, so 2∤7623. Therefore 6∤7623, regardless of the digit sum.
Is 31,724 divisible by 11? Alternating sum from the right: 4−2+7−1+3=11. Since 11∣11, yes.
Common error: testing divisibility by 12 by checking 2 and 6 instead of 4 and 3. The number 18 is divisible by both 2 and 6, but 12∤18. Coprime factorization is required.
Why These Rules Work
Every divisibility rule is a consequence of how the base 10 behaves under modular arithmetic.
Fact: Seven has a test, but no digit pattern
On division by 7, the powers of 10 leave remainders 1,3,2,6,4,5 and then repeat, too irregular for a digit rule. Yet 7 divides 10a+b exactly when it divides a−2b, since 10(a−2b)=(10a+b)−21b: for 2,401, 240−2=238 and 23−16=7.
A number written in decimal is dk⋅10k+dk−1⋅10k−1+⋯+d1⋅10+d0. Reducing this expression modulo a divisor n replaces each 10j with its remainder modulo n, and the pattern of those remainders determines the rule. The symbol ≡ below reads "is congruent to" — the notation is introduced in the congruence section of the modulo page.
For n=2 or n=5: 10≡0, so all terms except d0 vanish. Only the last digit matters.
For n=4: 100≡0(mod4), so all terms beyond d1⋅10+d0 vanish. The last two digits determine divisibility.
For n=8: 1000≡0(mod8), extending the same logic to the last three digits.
For n=3 or n=9: 10≡1, so 10k≡1 for all k. Every digit contributes its face value and nothing more. The number reduces to its digit sum.
For n=11: 10≡−1, so 10k alternates between 1 and −1. Digits contribute with alternating signs, producing the alternating-sum rule.
Each rule is a human-readable compression of a modular identity. The modular arithmetic page develops these identities in full.
all digits except the last vanish — only the ones digit matters
rules for 2, 5, 10
10² ≡ 0 (mod 4)
all digits beyond the tens place vanish — only the last two matter
rule for 4
10³ ≡ 0 (mod 8)
all digits beyond the hundreds place vanish — only the last three matter
rule for 8
10 ≡ 1 (mod 3), (mod 9)
every power of 10 is ≡ 1 — every digit contributes its face value → digit sum
rules for 3, 9
10 ≡ −1 (mod 11)
powers of 10 alternate +1, −1, +1, … — digits contribute with alternating signs
rule for 11
Why These Rules WorkLearn Math Class
Summary: Master Rules Reference
Every rule introduced on this page has the same shape — read off a small slice of the number's digits, do a short calculation, check divisibility of the result. The table below collects all nine rules side by side, paired with a worked example and the modular identity that makes the rule work. It's designed as the page you'd bookmark and return to: one row per divisor, all the information for applying and understanding each rule in a single line.
alternating sum of digits (right → left) is divisible by 11
9273 → 3 − 7 + 2 − 9 = −11, and 11 ∣ (−11) ✓
10 ≡ −1 (mod 11)
Summary: Master Rules ReferenceLearn Math Class
Common Pitfalls
Four mistakes account for many of the wrong answers when the rules are applied. The first three are marked where they happen in the sections above, and the fourth is the one the Combining Rules section warns about; here each is worked through in full, with the wrong and the right working side by side.
The last-digit tests for 2, 5 and 10 are carried over to 3, and a number is judged by whether its last digit is a multiple of 3.
Wrong turn
Error here
2,143 ends in 3, so 3∣2143; 1,257 ends in 7, so 3∤1257.
Right path
The digit sum decides. 2+1+4+3=10 is not a multiple of 3, so 3∤2143, and indeed 2143=3⋅714+1. 1+2+5+7=15 is a multiple of 3, so 3∣1257, and indeed 1257=3⋅419.
Why it happensThe last-digit rules are learned first and are the simplest, so the same kind of rule is expected for every divisor. They work only for divisors of 10, and 3 does not divide 10: since 10≡1(mod3), every digit counts, not just the last one.
How to checkDivide once. 2143÷3 is 714 with remainder 1, while 1257÷3=419 exactly.
2Testing 4 by the last digit
The rule for 4 is shortened to look like the rule for 2: a number is judged by whether its last digit alone is a multiple of 4.
Wrong turn
Error here
2,134 ends in 4, so 4∣2134; 3,516 ends in 6, so 4∤3516.
Right path
The last two digits decide. 34=4⋅8+2, so 4∤2134. 16=4⋅4, so 4∣3516, and indeed 3516=4⋅879.
Why it happens4 is even, so a one-digit test like the one for 2 seems natural. But 10 is not a multiple of 4, so the tens digit still changes the remainder; only 100 is a multiple of 4. The endings 14 and 34 end in 4 and are not multiples of 4, while 16 and 36 end in 6 and are.
How to checkWith an even tens digit the last digit must be 0, 4 or 8; with an odd tens digit it must be 2 or 6. In 2,134 the tens digit 3 is odd and the last digit is 4, so 4∤2134.
3Stopping after one passed test
Divisibility by 6 needs two tests, and the number is declared divisible after passing only one of them, usually the test for 2.
Wrong turn
Error here
1,234 ends in 4, so it is even, and therefore 6∣1234.
Right path
The test for 3 has to pass as well. 1+2+3+4=10 is not a multiple of 3, so 3∤1234 and 6∤1234. Indeed 1234=6⋅205+4.
Why it happensA failed test settles the question at once, as for 2,135, where the odd last digit is enough. That shortcut is carried over to a passed test, which settles nothing on its own.
How to checkEvery multiple of 6 is also a multiple of 3. Since 1234=3⋅411+1, it cannot be a multiple of 6.
4Combining factors that are not coprime
A composite divisor is split into two factors that share a divisor, as when 12 is tested through 2 and 6, and passing both tests is taken as proof.
Wrong turn
Error here
18 is even and 18=6⋅3, so it passes the tests for 2 and for 6, and therefore 12∣18.
Right path
Split 12 into coprime factors, 12=4⋅3 with gcd(4,3)=1. The last two digits 18=4⋅4+2 fail the test for 4, so 12∤18. Indeed 18=12⋅1+6.
Why it happens2⋅6=12, so the split looks natural. But every multiple of 6 is already even, so the test for 2 adds nothing, and the two tests together only show divisibility by lcm(2,6)=6.
How to checkCompute the GCD of the two factors before using them. gcd(2,6)=2 rules the split out; the table in the Combining Rules section lists coprime splits such as 12=4⋅3 and 24=8⋅3.
Each slip applies a rule to the wrong digits or stops too soon. Divisibility by 3 depends on the digit sum and divisibility by 4 on the last two digits, a test for 6 needs both the test for 2 and the test for 3, and two tests combine only when their divisors are coprime, as in 12=4⋅3. A single division settles each case.
Skills You Should Learn
Each skill opens its step-by-step method page.
Arithmetic methods
Test divisibility by 3Single ruleYou want to know whether 3 divides a number without dividing it: 729, 1,234, 5,832.
Test divisibility by 6Single ruleYou need to know whether 6 divides a number: 1,254, 1,234, 4,512. Since 6=2⋅3 with gcd(2,3)=1, two quick tests decide it.
Test divisibility by 9Single ruleYou want to know whether 9 divides a number: 8,127, 4,825, 6,471. The digit sum also gives the remainder after division by 9.
Test divisibility by 11Single ruleYou want to know whether 11 divides a number, for example while factoring: 9,273, 5,831, 143.
Test divisibility by 2Single ruleYou need to know whether a whole number is even, for example before halving it or factoring out a 2: 1,746, 3,821, 90,318.
Test divisibility by 4Single ruleYou need to know whether 4 divides a number with three or more digits: 3,516, 7,230, 2,134.
Test divisibility by 5Single ruleYou want to know whether 5 divides a number, for example while factoring or simplifying a fraction: 4,835, 7,832, 990.
Test divisibility by 10Single ruleYou need to know whether 10 divides a number, or whether both 2 and 5 do: 5,230, 5,235, 7,250.
Test divisibility by 4 AND by 3 (coprime factors of 12). Check that the last two digits are divisible by 4 AND the digit sum is divisible by 3. For 1,236: 36 ÷ 4 = 9 and 1+2+3+6 = 12, so 12 | 1236. Do NOT test 2 and 6 — they are not coprime (gcd(2,6)=2≠1). Check any candidate with the divisibility calculator.Read more →
Why does the digit sum rule work for 3 and 9?
+
Because 10 ≡ 1 (mod 3) and 10 ≡ 1 (mod 9). Every power of 10 is congruent to 1, so a digit d in position k contributes d×10^k ≡ d×1 = d. The number reduces to the sum of its digits under these moduli.Read more →
Why does the alternating sum rule work for 11?
+
Because 10 ≡ -1 (mod 11): powers of 10 alternate, 10⁰ = 1, 10¹ ≡ -1, 10² ≡ 1, 10³ ≡ -1. Each digit's contribution therefore alternates in sign with its position, producing the alternating-sum pattern. For 9,273: from the right, 3 − 7 + 2 − 9 = −11, and 11 divides −11, so 11 | 9273.Read more →
Is there a divisibility rule for 7?
+
Yes, though not a digit pattern like the rules for 3 or 11. Write the number as 10a+b, with b its last digit, and compute a−2b: since 10(a−2b)=(10a+b)−21b and 7 shares no factor with 10, 7 divides the number exactly when it divides a−2b. Repeat until the number is small: for 2,401, 240−2=238, then 23−16=7, so 7∣2401.Read more →
Why is the error from swapped digits divisible by 9?
+
Because swapping two digits leaves the digit sum unchanged, and a number and its digit sum leave the same remainder on division by 9. The correct and the swapped number therefore leave the same remainder, so their difference is a multiple of 9: writing 8,172 for 8,127 makes an error of 45=9⋅5. That is why bookkeepers whose totals are off by a multiple of 9 look first for two transposed digits.Read more →