Understanding the divisibility test calculator — concept and principle
This calculator applies the classic divisibility rules for 2 through 13 to a whole number and shows the quantity each rule checks: the last digit, the digit sum, the last two or three digits, the alternating digit sum and the alternating sum of three-digit groups. The list of divisors is confirmed by exact division. Use it for factoring, simplifying fractions and number-sense practice.
How it is calculated
- 2, 5, 10: last digit even; 0 or 5; 0.
- 3 and 9: digit sum divisible by 3 or 9.
- 4: last two digits divisible by 4; 8: last three digits divisible by 8.
- 6: divisible by 2 and 3; 12: divisible by 3 and 4.
- 11: alternating digit sum (ones − tens + hundreds − …) divisible by 11.
- 7, 11, 13: split into three-digit groups from the right and alternately add and subtract them; test that result.
The principle
Each rule uses what the base-10 place values leave as remainders. Because 10, 100 and 1,000 are multiples of 2 and 5, of 4, and of 8 respectively, only the last one, two or three digits matter for those divisors. Because every power of 10 leaves remainder 1 when divided by 3 or 9, the digit sum keeps the remainder. Powers of 10 alternate between +1 and −1 modulo 11, giving the alternating sum. And 1,000 leaves remainder −1 modulo 1,001 = 7 × 11 × 13, which is why alternating three-digit groups work for 7, 11 and 13 together.
Worked example
Default input: 7,560.
- Last digit 0: divisible by 2, 5 and 10.
- Digit sum 7 + 5 + 6 + 0 = 18: divisible by 3 and 9.
- Last two digits 60 (divisible by 4); last three 560 (560 = 8 × 70, divisible by 8); so also 6 and 12.
- Groups: 560 − 7 = 553 = 7 × 79, so divisible by 7, but not by 11 or 13; alternating digit sum −8 confirms no 11.
- Divisible by 2, 3, 4, 5, 6, 7, 8, 9, 10, 12; not by 11, 13.
How to read the result
A long list of divisors means the number has many small prime factors; 7,560 = 2³ × 3³ × 5 × 7. The tests are most useful for spotting a common factor quickly before simplifying a fraction, or for checking the result of a multiplication.
Common mistakes
- Using the digit sum to test for 6 without also checking 2.
- Testing 4 with only the last digit.
- Thinking that divisible by 2 and 4 means divisible by 8.
- Grouping digits from the left instead of the right for the 7, 11, 13 test.
Frequently asked questions
How do I know if a number is divisible by 4?
Check whether the number formed by its last two digits is divisible by 4.
Is there a test for 7?
Yes, the alternating sum of three-digit groups from the right; that result must be divisible by 7.
Why does the digit sum test for 9 work?
Every power of 10 leaves remainder 1 when divided by 9.
Sources: OpenStax, Prealgebra 2e (2020), §2.4 Find Multiples and Factors