A divisibility test calculator tells you at once which of the numbers 2 to 13 divide your number, and shows the rule that proves it, such as the digit sum for 3 and 9 or the alternating sum for 11. You can add your own divisor too. Enter a number and press the button. The rules follow the Wikipedia page on divisibility rules, and the work is done in your browser. It is a quick way to learn the rules and to check homework.
How to use the divisibility test calculator
- Enter the number to test. Commas are allowed.
- If you like, enter a divisor of your own.
- Press Test.
The rules for 2, 3, 4, 5, 6, 8, 9 and 10
The page lists the classic rules. A number is divisible by 2 if its last digit is even, by 5 if its last digit is 0 or 5, and by 10 if its last digit is 0. It is divisible by 4 if its last two digits form a number divisible by 4, as in 40,832, where 32 works, and by 8 if its last three digits do, as in 34,152, where 152 is 19 times 8. It is divisible by 3 if its digit sum is divisible by 3, and by 9 if the digit sum is divisible by 9. For 2,880, the digits add up to 18, so it is divisible by 9. A number is divisible by 6 if it is even and its digit sum is divisible by 3.
The rules for 7, 11, 12 and 13
For 11, form the alternating sum of the digits. For 918,082 it is 9 − 1 + 8 − 0 + 8 − 2, which is 22, a multiple of 11. For 12, check that the number is divisible by both 3 and 4: 324 passes. For 7 and for 13 the page gives a rule based on blocks of three digits. Take the blocks from right to left and alternate the signs. For 1,369,851 the blocks are 851, 369 and 1, and 851 − 369 + 1 is 483, which is 7 times 69, so the number is divisible by 7. For 2,911,272, the sum is 272 − 911 + 2, which is −637, a multiple of 13, since 637 is 49 times 13. The rule works because 1,001 is 7 × 11 × 13.
The general principle
The page states a general principle: a number is divisible by 2ᵐ, 5ᵐ or 10ᵐ exactly when the number formed by its last m digits is divisible by that number. This covers the rules for 2, 4, 8, 5, 10 and also 16, 25 and 100. The rules for 3 and 9 work because 10 leaves a remainder of 1 when divided by 9 or by 3, so a number leaves the same remainder as its digit sum.
A divisor of your own
For any other divisor, the calculator divides the number directly and writes the result as the number equals the divisor times the quotient plus the remainder. For 324 and the divisor 17, it shows 324 = 17 × 19 + 1, so 324 is not divisible by 17. A remainder of 0 means that it is.
Why divisibility rules help
The rules make it easy to simplify fractions, find factors, test for primes and check calculations without a calculator. They also reveal patterns: any number divisible by both 2 and 3 is divisible by 6, and any number divisible by both 3 and 4 is divisible by 12. When the factors share a common factor, as 2 and 4 do, you cannot combine them in this way.
A worked example with a long number
Take 123,456,789. The digit sum is 45, which is divisible by 9, so the number is divisible by 3 and by 9. The last digit is 9, so it is odd and not divisible by 2 or 5. The last two digits are 89, which is not divisible by 4. For 7, the blocks are 789, 456 and 123, and the alternating sum is 789 − 456 + 123, which is 456. Since 456 is not a multiple of 7, 123,456,789 is not. For 11, the alternating sum of the digits is 1 − 2 + 3 − 4 + 5 − 6 + 7 − 8 + 9, which is 5, so it is not divisible by 11. The calculator lists all of these for you.
Using the rules to factor a number
The rules help find the prime factors of a number by hand. Start with the small ones: divide by 2 as many times as possible, then test 3, 5, 7, 11 and 13 with the rules above. Each time a test passes, divide and test again with the quotient. This is often enough to factor numbers up to a few thousand. For a longer number, use the factoring calculator and the prime number checker on this site.
Beyond 13
The calculator also accepts a divisor of your own, which is useful for numbers such as 17, 19 or 101, which have no simple digit rule. It divides the number exactly, however long it is, and shows the quotient and remainder. The same box is a quick way to check a rule you have just learned.
Typing numbers
You can paste a number with commas or spaces between the groups of digits; they are removed before the test. Use digits only. A decimal point or a minus sign is not accepted, since divisibility is a property of whole numbers.
Common mistakes
- Using the digit sum for 4 or 8. Those use the last digits.
- Forgetting that 6 needs both 2 and 3. An even number with digit sum 4 is not divisible by 6.
- Starting the 11 test from the wrong end. Either end works, but the signs must alternate.
- Combining 2 and 4 to get 8. They share a factor, so the rule does not apply.
- Dropping the sign in the block rule. Subtract every second block.
What next
Use this often? Add Divisibility to your Home screen.
Frequently asked questions
What is a divisibility test calculator?
A tool that checks whether a number divides another exactly, using the shortcut rules, and shows the working.
How do you test divisibility by 3 or 9?
Add the digits. If the sum is divisible by 3 (or 9), so is the number. For 2,880 the digit sum is 18, so it is divisible by 9.
How do you test divisibility by 11?
Take the alternating sum of the digits. For 918,082 it is 9 − 1 + 8 − 0 + 8 − 2 = 22, a multiple of 11.
How do you test divisibility by 7 or 13?
Subtract and add blocks of three digits from the right. For 1,369,851: 851 − 369 + 1 = 483 = 7 × 69.
How do you test divisibility by 12?
Check that the number is divisible by both 3 and 4. For example 324.
Sources
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.