HomeMath › Divisibility Calculator

Divisibility Calculator

Check a whole number against every divisor from 2 through 12 in one shot. Enter any integer — positive or negative — and see which divisors go in evenly, plus the digit-sum test for 3 and 9 and the alternating-sum test for 11 worked out.

Example: with Whole number to test 3168 → Divisible by: 2, 3, 4, 6, 8, 9, 11, 12.

  • Not divisible by5, 7, 10
  • Digit sum (rule for 3 and 9)18 → divisible by both 3 and 9
  • Alternating sum (rule for 11)0 → divisible by 11

Computed by the calculator below using its default values. Change any input to see your own numbers.

Divisible by
Not divisible by
Digit sum (rule for 3 and 9)
Alternating sum (rule for 11)

A number is divisible by d when division leaves remainder 0. The classic shortcut rules (last-digit, digit-sum, alternating-sum) all fall out of how powers of 10 behave in modular arithmetic.

Why the shortcut rules work

Every divisibility rule is a fact about powers of 10. Since 10, 100, 1,000, … each leave remainder 1 when divided by 3 or 9, a number leaves the same remainder as its digit sum — so 3,168 is divisible by 9 exactly because 3 + 1 + 6 + 8 = 18 is. For 11 the powers of 10 alternate between +1 and −1, so you alternate signs across the digits: 8 − 6 + 1 − 3 = 0, and 0 is divisible by 11, so 3,168 is too.

Divisors that are powers of 2 or 5 only care about trailing digits, because higher place values are already multiples of them: check the last digit for 2 and 5, the last two for 4, the last three for 8. Composite divisors piggyback on their coprime parts — 6 means passing 2 and 3, 12 means passing 3 and 4.

How it’s calculated

Direct test: n mod d = 0 for each d from 2 to 12, computed exactly for integers up to 2⁵³ − 1 = 9,007,199,254,740,991. Digit sum shown for the 3/9 rule (n ≡ digit sum, mod 3 and mod 9); alternating sum taken from the units digit leftward with signs +, −, +, … for the 11 rule (n ≡ alternating sum, mod 11). Sign of n is ignored — divisibility is about magnitude.

Whole numbers only; decimals have no divisibility in the integer sense, and inputs beyond 2⁵³ lose exactness in double-precision arithmetic.

Divisibility rules for 2 through 12

DivisorRule
2Last digit is even: 0, 2, 4, 6, or 8
3 and 9Digit sum divisible by 3 (for 9: digit sum divisible by 9)
4Number formed by the last two digits divisible by 4
5 and 10Ends in 5 or 0 (for 10: ends in 0)
6 and 126: passes both 2 and 3. 12: passes both 3 and 4
7Double the last digit, subtract from the rest; repeat — 343 → 34 − 6 = 28 ✓
8Number formed by the last three digits divisible by 8
11Alternating digit sum (units +, tens −, …) divisible by 11, counting 0

Standard modular-arithmetic rules; each follows from the remainders of powers of 10 modulo the divisor.

Common mistakes

  • Testing 6 with the digit sum alone — 21 has digit sum 3 but is odd, so it fails 6. Divisibility by 6 needs both the 2 rule and the 3 rule.
  • Forgetting that an alternating sum of 0 counts as divisible by 11 (0 is a multiple of every number) — 3,168 passes with alternating sum 0.
  • Applying the 4 rule to one digit: 4 divides numbers by their last TWO digits — 116 works because 16 does, even though 6 alone does not.
  • Chaining the 3 rule to 12: digit sum handles the 3 part, but you still must check the last two digits for 4 — 15 is divisible by 3, not by 12.

Frequently asked questions

What does divisible mean?

n is divisible by d when n ÷ d leaves remainder 0 — the quotient is a whole number. 3,168 ÷ 11 = 288 exactly, so 3,168 is divisible by 11. The formal test is n mod d = 0.

What is the divisibility rule for 3?

Add the digits; if the sum is divisible by 3, so is the number. 3,168 → 3 + 1 + 6 + 8 = 18 → divisible. It works because every power of 10 leaves remainder 1 when divided by 3.

What is the rule for 11?

Alternate signs across the digits starting from the units place: for 3,168, take 8 − 6 + 1 − 3 = 0. If the result is a multiple of 11 (including 0), the number is divisible by 11.

Why is there no simple digit rule for 7?

Powers of 10 cycle through remainders 1, 3, 2, 6, 4, 5 modulo 7, so no clean digit pattern exists. The usual trick: double the last digit and subtract it from the rest, repeating until small — 343 → 34 − 6 = 28, and 28 = 4 × 7.

Is 0 divisible by these numbers? What about negatives?

Yes — 0 divided by any nonzero integer is 0 with no remainder, so 0 passes every test. Negative numbers divide exactly like their absolute values: −3,168 is divisible by 11 too.