How to use the divisibility rules calculator
- Type a whole number. Commas and spaces are ignored, a minus sign is allowed, and it can have up to 100 digits.
- Read the headline for the list of divisors from 2 to 12 that divide the number evenly.
- In the table, read the answer for each divisor together with what was checked, such as the last digit, the digit sum or the alternating sum.
- Export the table as CSV or print it for a study sheet.
Formula
2: last digit is even. 5: last digit is 0 or 5. 10: last digit is 0
4: last two digits divisible by 4. 8: last three digits divisible by 8
3 and 9: digit sum divisible by 3 or 9
11: alternating digit sum divisible by 11
6 = 2 and 3. 12 = 3 and 4. 7: remove the last digit, subtract twice it, repeat
Every rule looks at only some of the digits, which is why you can apply it without dividing. The rule for 7 shrinks the number until it is below 100, and the table shows where it ended.
123,456 and 999,999
123,456 ends in 6, so it is even. Its digit sum is 1 + 2 + 3 + 4 + 5 + 6 = 21, which is a multiple of 3 but not 9. Its last two digits, 56, are a multiple of 4, and its last three digits, 456, are a multiple of 8. So it is divisible by 2, 3, 4, 6, 8 and 12. For 7 the rule gives 12,345 - 12 = 12,333, then 1,233 - 6 = 1,227, then 122 - 14 = 108, then 10 - 16 = -6, which is not a multiple of 7.
999,999 has a digit sum of 54, so it is divisible by 3 and 9. Its alternating sum is 0, so 11 works too, and the rule for 7 reduces it to 84, which is 7 x 12. It is odd and does not end in 0 or 5, so 2, 4, 5, 6, 8, 10 and 12 fail.
Why the digit rules work
Our number system is built on powers of 10. Since 10 leaves a remainder of 1 when divided by 3 or 9, every digit contributes only itself to the remainder, so the digit sum has the same remainder as the number. For 11, 10 leaves a remainder of -1, so digits alternately add and subtract. For 2, 4 and 8, powers of 10 become multiples of the divisor from 10, 100 and 1,000 upward, so only the last digits can matter.
The rule for 7 is a shortcut found by working with 10 = 7 + 3, and unlike the others it is applied repeatedly rather than once.
Related tools
Divisibility is the first step in factoring. To list factors and test primes, use the prime number calculator. To find a greatest common factor or a least common multiple, use the GCF and LCM calculator. To see the quotient and remainder, use the long division calculator.
Assumptions and limits
- The number is read as a whole number in base 10. Decimals, fractions and other bases are not accepted.
- A negative number is tested by its size, because divisibility does not depend on the sign.
- Zero is divisible by every divisor, so all eleven show as yes.
- Only the divisors 2 through 12 are checked. For other divisors, use the long division calculator.
Frequently asked questions
How can I tell if a number is divisible by 7?
Remove the last digit, double it and subtract it from what is left. Repeat until the number is small, then check whether it is a multiple of 7. If the final number is 0 or a multiple of 7, so is the original.
Why does the digit sum test work for 9?
Each place value is one more than a multiple of 9 (1, 10, 100 and so on leave a remainder of 1), so a number leaves the same remainder as its digit sum. If the digit sum is a multiple of 9, the number is too.
Is zero divisible by 3?
Yes. Zero divided by any nonzero number is zero with no remainder, so it passes every test from 2 to 12.
How large a number can I test?
Up to 100 digits. The digit rules and an exact remainder check run on the whole number, so there is no rounding even for very large inputs.