Numbers & Arithmetic

Divisibility Rules: Quick Tests for 2 Through 13

A whole number nn is divisible by dd when dividing leaves remainder 00, and for most small divisors the digits alone tell you. Check the last digit for 22, 55 and 1010, the last two digits for 44, the last three for 88, the digit sum for 33 and 99, and the alternating digit sum for 1111.

d∣n  ⟺  n≡0(modd)d \mid n \iff n \equiv 0 \pmod{d}

Try it with your numbers

Show every step

These shortcuts save time on dividing integers, reducing fractions and factoring. Each rule comes from one idea about place value, so once you see that idea you can rebuild any rule from scratch instead of memorizing it.

Divisibility rules from 2 to 12 at a glance

The table covers every divisor from 22 to 1212 with a number that passes. Rules for 66 and 1212 are combinations of simpler rules, and 77 is the only one that needs real arithmetic.

Divisor Test Passing example
22 Last digit is 0,2,4,6,80, 2, 4, 6, 8 358358
33 Digit sum divisible by 33 471471 (sum 1212)
44 Last two digits divisible by 44 37163716 (since 1616)
55 Last digit is 00 or 55 27852785
66 Passes both the 22 and 33 tests 42364236
77 Rest of number minus double the last digit 18271827 (182−14=168182-14=168)
88 Last three digits divisible by 88 51285128 (since 128128)
99 Digit sum divisible by 99 63816381 (sum 1818)
1010 Last digit is 00 45704570
1111 Alternating digit sum is 00 or a multiple of 1111 91639163
1212 Passes both the 33 and 44 tests 58325832

A useful side fact: divisibility by 2525 needs the last two digits to be 0000, 2525, 5050 or 7575. If you want to see these patterns as lists, the multiples of numbers 1 to 100 and the factors of numbers 1 to 100 show them directly.

Why do divisibility rules work?

Every rule rests on how place value splits a number. Take a three-digit number with digits aa, bb, cc. It equals 100a+10b+c100a+10b+c, and you can regroup it around multiples of 99 or 1111:

100a+10b+c=(99a+9b)+(a+b+c)100a+10b+c = (99a+9b) + (a+b+c)

100a+10b+c=(99a+11b)+(a−b+c)100a+10b+c = (99a+11b) + (a-b+c)

The first bracket is always a multiple of 99, so nn and its digit sum leave the same remainder when divided by 99 (or by 33, since 33 divides 99). The second bracket is always a multiple of 1111, so nn behaves like the alternating sum a−b+ca-b+c. The one-line reason is that 1010 leaves remainder 11 when divided by 99 and remainder −1-1 when divided by 1111.

The last-digit rules use the opposite trick. Since 1010, 100100 and 10001000 are multiples of 22 and 55, 100100 is a multiple of 44 and 2525, and 10001000 is a multiple of 88, everything except the last one, two or three digits is already divisible. Only the tail can spoil it. In modular notation, d∣nd \mid n means n≡0(modd)n \equiv 0 \pmod{d}, and each rule is a quick way to find n mod dn \bmod d.

Quick check

Without dividing, decide whether 5,300,0285{,}300{,}028 is divisible by 44.

How to use the divisibility rules for 3, 9 and 11

The digit-based rules reward a systematic habit: write the digits, do the sum, and test the sum, not the number. Here is a full test of 74257425 against 33, 99 and 1111.

Example 1. Test 74257425.

  1. Digit sum: 7+4+2+5=187+4+2+5=18.
  2. 1818 is divisible by 99, so 74257425 is divisible by 99, and therefore by 33.
  3. Alternating sum from the right: 5−2+4−7=05-2+4-7=0. Zero counts, so 74257425 is divisible by 1111.
  4. Check: 7425=11⋅6757425 = 11 \cdot 675 and 675=27⋅25675 = 27\cdot 25, so 7425=33⋅52⋅117425 = 3^3 \cdot 5^2 \cdot 11.

That last line is the payoff. Each passed test peels off a factor, which makes prime factorization fast.

The trap that costs the most points is mixing up which rules use digit sums. Digit sums work only for 33 and 99. Students often apply the digit sum to 66, 44 or 1212 directly, or conclude that a digit sum of 1212 means divisibility by 99. Always compare the digit sum with the divisor you are testing: 1212 is a multiple of 33 but not of 99.

Digit sum shortcut

If the digit sum is large, add its digits again. For 9,876,5439{,}876{,}543 the sum is 4242, then 4+2=64+2=6, so the number is divisible by 33 but not by 99.

What is the divisibility rule for 7 and 13?

Three step cards showing 376,285 split in threes, subtracted to negative 91, then factored as 7 times 13
Splitting 376,285 into groups of three gives 285 − 376 = −91 = −7 × 13, so the number is divisible by 7 and 13 but not 11.

The rule for 77 is the one that most people forget, but it follows the same logic. Write n=10a+bn = 10a + b, where bb is the last digit and aa is everything before it. Then

n=10(a−2b)+21bn = 10(a - 2b) + 21b

Since 21b21b is always a multiple of 77, and 1010 shares no factor with 77, nn is divisible by 77 exactly when a−2ba-2b is. That is the doubling rule.

  1. Cut off the last digit.
  2. Double it.
  3. Subtract it from the remaining number.
  4. Repeat until the result is small enough to recognize, then ask whether it is a multiple of 77 (including 00 or a negative multiple).

For 18271827: 182−14=168182-14=168, then 16−16=016-16=0. Zero is a multiple of 77, so 1827=7⋅2611827 = 7 \cdot 261. The same pattern with +4b+4b in place of −2b-2b tests 1313.

For long numbers there is a faster route. Because 1001=7⋅11⋅131001 = 7\cdot 11\cdot 13, split the number into groups of three digits from the right and alternate the signs.

Example 2. Test 376,285376{,}285 against 77, 1111 and 1313.

285−376=−91285 - 376 = -91

Since −91=−7⋅13-91 = -7\cdot 13, the number is divisible by 77 and by 1313. It is not divisible by 1111, because 9191 is not a multiple of 1111. Check: 376,285=7⋅13⋅4135=91⋅4135376{,}285 = 7 \cdot 13 \cdot 4135 = 91 \cdot 4135.

Repeating blocks

Any number of the form abcabcabcabc equals abc×1001abc \times 1001, so it is always divisible by 77, 1111 and 1313. For instance, 482,482=482×1001482{,}482 = 482 \times 1001.

Divisibility rules for 6, 12 and other composite numbers

Wrong pair 4 and 6 versus right pair 3 and 8 for testing divisibility by 24
The number 12 passes the 4 and 6 tests but not 24, while the coprime pair 3 and 8 catches it.

To test a composite divisor, split it into factors that share no common factor, then test each one. A number is divisible by 66 if it is divisible by 22 and 33, and by 1212 if it is divisible by 33 and 44. The pair must be coprime. Using 22 and 66 to test 1212 would be wrong, and this is the trap that costs the most points here.

The reason is that the product of coprime divisors divides the number, but shared factors get counted twice. A number divisible by both 44 and 66 is only guaranteed to be divisible by their least common multiple, which is 1212, not 2424. The number 1212 itself passes both tests and fails the 2424 test.

Example 3. Is 58325832 divisible by 1212? By 2424?

  1. For 1212, test 33 and 44. Digit sum: 5+8+3+2=185+8+3+2=18, a multiple of 33. Last two digits: 32=4⋅832 = 4\cdot 8. Both pass, so 12∣583212 \mid 5832, and 5832=12⋅4865832 = 12\cdot 486.
  2. For 2424, use the coprime pair 33 and 88. The digit sum still passes. Last three digits: 832=8⋅104832 = 8\cdot 104. Both pass, so 24∣583224 \mid 5832, and 5832=24⋅2435832 = 24 \cdot 243.

The same method gives rules for 1515 (test 33 and 55), 1818 (test 22 and 99) and 3636 (test 44 and 99).

Quick check

A number is divisible by both 66 and 1010. Must it be divisible by 6060?

Do divisibility rules work for negatives and zero?

They do, with a few clarifications. A number and its opposite have identical divisors, so test the absolute value and ignore the sign. For example, −91-91 is divisible by 77 because −91=7⋅(−13)-91 = 7\cdot(-13).

Zero is divisible by every nonzero integer, because 0=d⋅00 = d\cdot 0. It also passes every digit test: its digit sum is 00. What fails is using 00 as the divisor, since division by zero is undefined. Also, 11 divides everything, and every nonzero number divides itself.

Divisibility is defined for integers only. A statement like ”4.54.5 is divisible by 1.51.5” is not used, even though 4.5÷1.5=34.5 \div 1.5 = 3, because the question asks whether the quotient is a whole number when dividing integers. The statement ”dd divides nn” is written d∣nd \mid n, which the page on what a|b means in math covers in detail.

Try this: Pick any number between 100100 and 999999. Reverse its digits and subtract the smaller number from the larger. Test the difference for divisibility by 99 and by 1111. You will find it always passes both, and the regrouping from the earlier section tells you why.

How divisibility rules help with fractions and primes

The most common use is reducing fractions. To simplify 168252\frac{168}{252}, run the tests: both are even and both have digit sums divisible by 33 (1515 and 99). The last two digits 6868 and 5252 are multiples of 44, so divide by 44 to get 4263\frac{42}{63}, then by 33 to get 1421\frac{14}{21}, then by 77 to get 23\frac{2}{3}. The product 4⋅3⋅7=844\cdot 3\cdot 7=84 is the greatest common factor, and the same reasoning drives simplifying fractions.

Divisibility rules also speed up primality testing. To decide whether nn is prime you only need to test primes up to n\sqrt{n}. For anything under 121121, that means just 22, 33, 55 and 77.

The 121 cutoff

Because 112=12111^2=121, any composite number below 121121 has a prime factor of 77 or less. Test 9191: it fails 22, 33 and 55, and 9−2=79-2=7 passes, so 91=7⋅1391=7\cdot 13.

That is why 9191 is a favorite trick question: it looks prime but is not. You can check any result against the prime numbers from 1 to 100.

Calendars use the same idea. A year is a leap year when:

  • it is divisible by 44, and
  • it is not divisible by 100100, unless it is also divisible by 400400.

So 20002000 was a leap year, 21002100 will not be, and 20282028 will be.

How to check your arithmetic with casting out nines

Because a number and its digit sum leave the same remainder mod 99, you can check a multiplication of integers by replacing each number with its digit sum, reducing to a single digit, and comparing. If 4729×83=392,5074729 \times 83 = 392{,}507, the check goes:

4729→22→4,83→11→2,4⋅2=84729 \to 22 \to 4, \qquad 83 \to 11 \to 2, \qquad 4\cdot 2 = 8

392,507→26→8392{,}507 \to 26 \to 8

The two results agree, so the answer is very likely right. The method also works for addition and subtraction.

The limits matter. A matching result does not prove the answer: any error that changes the result by a multiple of 99 goes unnoticed, and swapping two digits does exactly that. A mismatch, however, always means a mistake. Treat the check as a fast filter for wrong answers, not as proof of a right one.

The same idea applies to any divisor. Check the remainder against 1111 using the alternating sum, and you catch the digit swaps that casting out nines misses. Running both checks together is a quick safeguard for hand calculations.

Quick check

Casting out nines: does 612×25=15,400612 \times 25 = 15{,}400 pass the check?

Practice problems

0 of 5 solved

  1. Is 42364236 divisible by 66?

  2. What digit dd makes 41d641d6 divisible by 99?

  3. Use the alternating sum to decide whether 91639163 is divisible by 1111.

  4. Use the doubling rule to decide whether 21842184 is divisible by 77.

  5. Use divisibility rules to simplify 13862079\dfrac{1386}{2079} to lowest terms.

Common questions

What are the divisibility rules for 2, 3, 4, 5, 6, 8, 9 and 10?

For 2, 5 and 10 look at the last digit. For 4 look at the last two digits and for 8 the last three. For 3 and 9 add the digits, and for 6 check that the number passes both the 2 and the 3 test.

How do you know if a number is divisible by 7?

Remove the last digit, double it, and subtract it from the remaining number. If the result is a multiple of 7 (including 0 or a negative multiple), the original number is too. Repeat the step on large numbers until the result is easy to judge.

What is the divisibility rule for 11?

Add and subtract the digits in turn, starting from either end. If the result is 0 or a multiple of 11, the number is divisible by 11. For example, 9163 gives 3 - 6 + 1 - 9 = -11, so it passes.

Is 0 divisible by every number?

Yes, 0 is divisible by every nonzero integer, because 0 = d times 0. Division by 0 itself is undefined, so 0 is not a valid divisor.

Do divisibility rules work for negative numbers?

Yes. A number and its opposite have exactly the same divisors, so test the absolute value. For example, -91 is divisible by 7 because 91 is.

Why does the digit sum test work for 3 and 9 but not for other numbers?

It works because 10 leaves remainder 1 when divided by 3 or 9, so every place value leaves remainder 1 too. For other divisors, such as 7, powers of 10 leave different remainders, so adding digits tells you nothing.

Up next