Divisibility Test Calculator

Test any integer for divisibility by 2–12 or custom divisors and learn the divisibility rules instantly.

Enter a positive integer and choose between checking common divisors (2–12) or specifying your own. Results show whether each divisor divides evenly.

Divisibility Test Calculator
Test any integer for divisibility by 2–12 or custom divisors and learn the divisibility rules instantly.

About the Divisibility Test Calculator

Divisibility is one of the foundational concepts in number theory. A number n is divisible by d if the division n ÷ d leaves no remainder — in other words, d divides n evenly and the result is an integer. Testing divisibility is a key step in many mathematical procedures: simplifying fractions by finding common factors, identifying prime numbers, factoring polynomials, and solving modular arithmetic problems all require knowing which integers divide a given number. For small divisors, mathematicians have developed elegant shortcut rules that let you decide divisibility without performing long division. The rule for 2 is the simplest: any integer ending in 0, 2, 4, 6, or 8 is divisible by 2. For 5, the last digit must be 0 or 5. For 10, the last digit must be 0. These rules work because our number system is base ten, so the last digit fully determines the remainder when dividing by 2, 5, or 10. Divisibility by 3 depends on the digit sum: add all the digits together, and if the sum is divisible by 3 then so is the original number. For example, 123 has digit sum 1+2+3 = 6, which is divisible by 3, so 123 is divisible by 3. The same rule applies to 9, except the digit sum must be divisible by 9 rather than 3. For 6, a number must be divisible by both 2 and 3 simultaneously (since 6 = 2 × 3 and 2 and 3 are coprime). Divisibility by 4 depends on the last two digits: if the two-digit number formed by the tens and units digits is divisible by 4, the full number is divisible by 4. For example, 316 ends in 16, and 16 ÷ 4 = 4 exactly, so 316 is divisible by 4. Divisibility by 8 extends this: the last three digits must form a number divisible by 8. For 11, the alternating digit sum rule applies: subtract the sum of digits in odd positions from the sum of digits in even positions. If the result is 0 or divisible by 11, the original number is divisible by 11. For 7 there is no simple shortcut as elegant as the others, so the calculator uses the straightforward modular arithmetic check. For 12, a number must be divisible by both 3 and 4 (since 12 = 3 × 4 and gcd(3,4) = 1). The calculator checks this compound condition automatically. Beyond the preset divisors 2–12, the custom mode accepts any comma-separated list of positive integers, making this tool useful for checking divisibility by primes (13, 17, 19, …), powers (16, 25, 32, …), or any other divisors relevant to your problem.

Divisibility Test Examples

Three worked examples showing how divisibility rules apply to different types of integers.

NumberDivisible ByKey Rule Applied
3602, 3, 4, 5, 6, 8, 9, 10, 12360 ends in 0 (÷2, ÷5, ÷10), digit sum 9 (÷3, ÷9), last two digits 60 ÷ 4 (÷4, ÷8), divisible by both 2 and 3 (÷6), and by both 3 and 4 (÷12).
1233Digit sum 1+2+3 = 6 is divisible by 3, but 123 is odd (not ÷2), doesn't end in 0 or 5 (not ÷5), and fails all other common tests.
10017, 111001 = 7 × 11 × 13. The alternating digit sum for 11: 1−0+0−1 = 0, confirming ÷11. Direct mod check confirms ÷7.

How to Use the Divisibility Test Calculator

  1. Enter the positive integer you want to test in the Number to Test field.
  2. Choose Common Divisors (2–12) to test all divisors from 2 to 12 at once, or choose Custom Divisors to specify your own list.
  3. If you chose Custom Divisors, enter them as comma-separated integers in the Custom Divisors field (e.g. 2, 3, 5, 7).
  4. Click Test Divisibility to see a table showing whether each divisor divides the number evenly and the remainder for each test.
  5. Click Reset to clear the fields and test a different number.

Divisibility Test FAQ

What does it mean for a number to be divisible by another?
A number n is divisible by d if n ÷ d produces an integer with no remainder — that is, n mod d = 0. For example, 12 is divisible by 4 because 12 ÷ 4 = 3 exactly. Divisibility is one of the most basic relationships in number theory and underlies factoring, simplification of fractions, and modular arithmetic.
What are the divisibility rules for 2 and 3?
For 2: a number is divisible by 2 if its last digit is 0, 2, 4, 6, or 8 (i.e., it is even). For 3: add all the digits; if the sum is divisible by 3, so is the original number. For example, 573 has digit sum 5+7+3 = 15, which is divisible by 3, so 573 is divisible by 3.
How do I test divisibility by 7?
There is no simple single-step rule for 7 as elegant as those for 2, 3, or 5. The most reliable approach is to compute the remainder directly using modular arithmetic: n mod 7. The calculator does exactly this. If the remainder is zero, n is divisible by 7; otherwise it is not.
Why test divisibility by composite numbers like 6 or 12?
Testing for composite divisors is equivalent to testing for all their prime factors simultaneously. A number is divisible by 6 if and only if it is divisible by both 2 and 3. Divisible by 12 means divisible by both 3 and 4. These compound tests are shortcuts for factoring and simplifying expressions in everyday arithmetic.
Can I test very large numbers?
Yes. The calculator handles positive integers up to JavaScript's safe integer limit (2⁵³ − 1 ≈ 9 × 10¹⁵, which is 16 digits). For most classroom, homework, and everyday use this is more than sufficient. For numbers with more than 15 digits, a dedicated arbitrary-precision library would be needed.
How does the alternating digit sum rule for 11 work?
For divisibility by 11, assign signs alternating +, −, +, − to the digits from right to left, then sum them. If the result is 0 or divisible by 11, the number is divisible by 11. For 1001: starting from the right, 1×(+1) + 0×(−1) + 0×(+1) + 1×(−1) = 1 − 1 = 0, so 1001 is divisible by 11.