Divisibility Test Calculator - Pass Fail Quotient Remainder
Use this divisibility test calculator to check any integer against a chosen divisor. Get the pass/fail result, integer quotient, remainder, and matching rule.
Divisibility Test Calculator
Results
Divisibility Rules Table (Divisors 2-12)
| Divisor | Result | Quotient | Remainder | Rule |
|---|---|---|---|---|
| Enter a number above to populate the rules table. | ||||
What Is This Calculator?
A divisibility test is a quick way to check whether one whole number can be split into equal groups of another whole number with nothing left over. The tool applies the same rules taught in elementary and middle-school math, so you can type any non-negative integer, pick a divisor, and see the pass/fail result together with the integer quotient and remainder.
- • Homework self-check: Use the tool to confirm an answer while you practice the rules, so it doubles as a self-check for grade-school math.
- • Factoring and prime work: When deciding whether a number is composite or prime, the pass/fail result for small divisors (2, 3, 5, 7, 11) lets you rule out factors one at a time.
- • Dividing bills or items: Pick a divisor such as the number of people in a group to see whether the split is even or whether there is a leftover item to assign.
- • Programming and algorithms: If you are writing or reviewing code that loops over integers, the calculator mirrors the n mod d == 0 check, so it is a quick reference for what the code is doing.
The idea of a divisibility test is older than the modern school curriculum. Mathematicians have used rules for the small integers 2, 3, 5, 7, 9, and 11 for centuries because they collapse the problem from a full long division into a small look at the digits of the number.
If you want a deeper dive into modular arithmetic, our modulo calculator returns the same remainder in a more general form and supports any positive divisor.
How the Calculator Works
The calculator uses the standard modular-arithmetic definition of divisibility: the entered number n is divisible by the divisor d exactly when n mod d equals 0. The page also shows the matching one-line rule, so you can see the arithmetic shortcut the rule is based on and verify it against the pass/fail result.
- n: The integer you are testing. Defaults to 2520, chosen because it is divisible by every small divisor from 1 to 10.
- d: The positive divisor you are testing n against. Defaults to 7, the small divisor with the most-memorized rules.
- remainder: The leftover after dividing n by d. When 0, the number is divisible; otherwise the leftover equals the remainder.
- quotient: The integer result of the division. For 2520 / 7 the quotient is 360; for 17 / 5 the quotient is 3 and the leftover 2 is the remainder.
Behind the scenes the same calculation runs as a JavaScript modulo: the entered number is restricted to a non-negative integer, the divisor to a positive integer, and the page divides and reports the integer quotient and the remainder using the standard formula above. As Math is Fun explains, a number is divisible by d when d divides it with no leftover, which is exactly the case the calculator labels 'Divisible'.
2520 / 7 (default example, divisible)
Number n = 2520, Divisor d = 7
1. 2520 mod 7 = 0 because 7 * 360 = 2520. 2. Quotient = (2520 - 0) / 7 = 360. 3. Remainder is 0, so the result is 'Divisible'.
Result: Divisible. Integer quotient: 360. Remainder: 0.
The result matches the rule for 7 because 2520 is the LCM(1..10) and is divisible by 7.
According to Math is Fun, a number is divisible by 2, 5, or 10 when its last digit matches the expected pattern, and divisible by 3 or 9 when the sum of its digits is divisible by 3 or 9, which is why the calculator reports those rules as one-line pass/fail tests.
When the pass/fail result is 'Not Divisible' for every small divisor and you suspect the number is prime, our prime number checker runs a dedicated primality test and lists the nearest prime neighbors.
Key Concepts Explained
Four small ideas cover every result the calculator can show.
Divisibility definition
A non-negative integer n is divisible by a positive integer d when there exists an integer k such that n = d * k. The remainder is 0, and the quotient is k. This is the textbook definition the calculator uses.
Quotient and remainder
Dividing n by d always produces an integer quotient and a non-negative remainder that is strictly less than d. For 17 / 5, the quotient is 3 and the remainder is 2, because 3 * 5 + 2 = 17.
Common small divisors
Rules are easiest to apply for d in 2 through 12. The calculator lists the rule and the pass/fail result for each, so you can scan a number against every small divisor at once.
Digit-sum shortcut for 3 and 9
A number is divisible by 3 (or 9) exactly when the sum of its digits is divisible by 3 (or 9). For 12345 the digit sum is 15, so it is divisible by 3 but not by 9.
These four ideas show up in every divisibility test, even when the divisor is large. A divisor that is not in 2-12 still uses the same n mod d = 0 check, but the rule is no longer a one-line shortcut, so the calculator falls back to direct modular arithmetic for custom divisors.
When the result for a small divisor is 'Not Divisible' and you want to keep factoring, the prime factorization calculator breaks the number into its prime factors in a single step.
How to Use This Calculator
Five short steps are enough to read the calculator confidently.
- 1 Enter the number: Type the non-negative integer you want to test in the 'Number to Test' field. The default 2520 is a friendly starting point because it is divisible by 2 through 10.
- 2 Pick a divisor: Type a positive integer in the 'Divisor' field. Small divisors (2 through 12) show a one-line rule, but any positive integer works because the calculator always falls back to modular arithmetic.
- 3 Read the pass/fail result: 'Divisible' means the number can be split into equal groups with nothing left over. 'Not Divisible' means there is a leftover.
- 4 Check the quotient and remainder: The integer quotient is the number of equal groups, and the remainder is the leftover. When the remainder is 0, the number is divisible; when it is non-zero, the leftover equals the remainder.
- 5 Scan the rules table: The rules table below the calculator runs the same test for d = 2 through 12 and labels each row with the matching one-line rule, so you can see which small divisors your number is divisible by in a single glance.
Enter 2520 in the number field and 7 in the divisor field. The result panel will read 'Divisible' with quotient 360 and remainder 0. If you change the divisor to 11, the result flips to 'Not Divisible' because 2520 is not a multiple of 11.
If you need the long form of the division with the digits, carry, and remainder shown step by step, the long division calculator is the right companion to this tool.
Benefits of Using This Calculator
A purpose-built calculator saves time and avoids the mental math errors that come from doing the rule by hand.
- • Covers every small divisor at once: The rules table tests d = 2 through 12 in one click, so you do not need to remember the rule for 7 or 11.
- • Shows the arithmetic, not just the answer: Quotient and remainder sit next to the pass/fail result, so you can reconstruct the original division and use it in a worksheet.
- • Works for custom large divisors: Enter any positive integer as the divisor and the calculator still applies n mod d = 0. The one-line rule is reserved for d in 2-12.
- • Useful for school and work: Students use the tool as a self-check, and anyone doing scheduling or allocation work (splitting bills, packing boxes, dividing a roster) can see at a glance whether a number is divisible by a chosen group size.
If you need the long form of the division (digits, carry, remainder) the long division calculator shows the work, and the factor calculator lists every factor of the number at once.
If you have two numbers and want the largest shared divisor, the greatest common factor calculator returns the GCD in a single step and is a natural follow-up when this tool reports a successful divisibility test.
Factors That Affect Your Results
The rules table below the result panel runs all eleven checks for d = 2 through 12 against the entered number. The factor cards here describe the rule itself, in the same order the table renders them, so the prose and the live results stay in sync.
Rule for 2
Last digit is even (0, 2, 4, 6, 8).
Rule for 3
Sum of digits is divisible by 3.
Rule for 4
Last two digits form a multiple of 4.
Rule for 5
Last digit is 0 or 5.
Rule for 6
Divisible by both 2 and 3 at the same time.
Rule for 7
Double the last digit, subtract from the rest, and repeat until small enough to check by eye.
Rule for 8
Last three digits form a multiple of 8.
Rule for 9
Sum of digits is divisible by 9.
Rule for 10
Last digit is 0.
Rule for 11
Alternating digit sum (digit 1 minus digit 2 plus digit 3, and so on) is divisible by 11.
Rule for 12
Divisible by both 3 and 4 at the same time.
- • The calculator accepts any non-negative integer up to 999,999,999,999,999 (15 digits), and the divisor any positive integer up to the same cap. This matches the precision the underlying number inputs and validator can hold reliably.
- • The one-line rules in the rules table are only rendered for d in 2 through 12. Custom divisors (any positive integer) still work in the result panel, but the table only shows the eleven canonical small-divisor rules.
When the result panel says 'Not Divisible' and you want every factor of the number, the prime factorization calculator is the natural follow-up. As Wolfram MathWorld states, an integer n is divisible by a non-zero integer d exactly when n = d * k for some integer k, which is the same definition the calculator uses.
According to Wolfram MathWorld, an integer n is divisible by a non-zero integer d exactly when there exists an integer k such that n = d times k, and the calculator uses that exact definition to label the primary result and every rule in the rules table.
When the result panel says 'Not Divisible' and you want to see every factor of the number at once, the factor calculator lists them in sorted order alongside the count of factors.
Frequently Asked Questions
Q: What is the divisibility test?
A: A divisibility test is a quick rule for deciding whether one whole number can be divided by another whole number with nothing left over. The calculator on this page applies the standard modular definition and the one-line hand shortcuts for divisors 2 through 12.
Q: How do you check if a number is divisible by 7?
A: Enter the number in the calculator, set the divisor to 7, and read the pass/fail result. A common hand shortcut doubles the last digit, subtracts it from the rest of the number, and repeats until the result is small enough to check by eye.
Q: What is the divisibility rule for 11?
A: Take the alternating sum of the digits (digit 1 minus digit 2 plus digit 3 minus digit 4, and so on). If the alternating sum is divisible by 11, so is the original number. The calculator runs the same test for d = 11 in the rules table.
Q: Is 0 divisible by every number?
A: Yes, 0 is divisible by every positive integer. The quotient is 0 and the remainder is 0 for any d greater than 0, so the calculator always labels 0 as 'Divisible' regardless of the chosen divisor.
Q: How do you test divisibility by 8 quickly?
A: Look only at the last three digits of the number. If the three-digit number they form is divisible by 8, so is the original number. For 2520 the last three digits are 520, and 520 divided by 8 equals 65 exactly, so the rule passes.
Q: Why does the digit sum rule work for 9 but not for 7?
A: Because 10 is congruent to 1 modulo 9, every digit contributes its value to the remainder when dividing by 9, so the digit sum has the same remainder. Modulo 7 this trick fails because 10 is not congruent to 1 mod 7, which is why the rule for 7 needs a different shortcut.