Divisibility Test Calculator
If you have ever struggled with testing for divisibility, rest assured that these times are gone for good: we present Omni's divisibility test calculator, the ultimate tool on your journey to master divisibility tests once and for all!
While scrolling down to a short article below, you will get a chance to:
 Learn what divisibility tests are;
 Get tips on how to most efficiently use this divisibility test calculator; and
 Discover various tests for divisibility, including:
 Those that are the simplest and most useful in real life, like the divisibility test of 2 or 10;
 Those that are most widespread in schools, like the divisibility test of 3, 9 or 11; and
 Those that are a bit more complicated and seldom even mentioned, so useful when you want to, e.g., impress your teacher, like the divisibility test of 7 or 13.
Ready?
What are divisibility tests?
Let us first recall what "divisibility" means. We say that a natural number n
is divisible by another natural number k
if dividing n / k
leaves no remainder (i.e., the remainder is equal to zero).
Example: 18
is divisible by 3
because 18 / 3 = 6
and there is no remainder. 18
is also divisible by 6
, by 2
, and by 9
— but not by 7
, as 18 / 7 = 2.57
.
Now we move on to divisibility rules. These are mathematical procedures, recipes and tricks that allow us to quickly and easily determine if a given number n
is divisible by some specific divisor k
but without performing the actual division, which is very useful if the number we need to examine is very large and long division would take us veeeery long.
Usually, a divisibility rule tells us how to replace our problem with an easier problem — that is, transform n
into a smaller number. The strategies include:
 Looking only at the last digit and ignoring the rest (e.g., the divisibility test for 2);
 Looking only at several last digits and ignoring the rest (e.g., the divisibility test for 4);
 Computing the sum of digits of a number (e.g., the divisibility test of 9);
 Computing the alternating sum of digits of a number (e.g., the divisibility test of 11);
 Computing the sum of blocks of digits of a number (e.g., another divisibility test for 11); and
 Computing the alternating sum of blocks of digits of a number (e.g., the divisibility test of 13).
We then check the desired divisibility for this smaller number, which is much easier in principle. If it is still hard, you often can apply the divisibility test again, leading to a yet smaller number, for which the solution to the divisibility question should be clear.
In what follows, we first explain how our divisibility test calculator works. Next, we will lead you through all the most useful divisibility tests.
How to use this divisibility test calculator?
Our divisibility test calculator has two modes: Details
and Summary
.

In the
Summary
mode, you can overview the divisibility properties of a given integer: the calculator will tell you which numbers between 2 and 13 are its divisors. 
In the
Details
mode, you can understand why a number between 2 and 13 is (or is not) a divisor of a given integer. The calculator will display the appropriate divisibility rule and will show you how to apply it.
Divisibility tests of 2, 4, and 8
In general, to test divisibility by any natural number of the form 2ⁿ
, we only have to examine its last n
digits and check if they form a number that is divisible by 2ⁿ
. In particular:
Divisibility test of 2
A number is divisible by 2 if and only if its last digit is even, i.e., divisible by 2. In other words, the last digit must be equal to 0, 2, 4, 6, or 8.
Divisibility test of 4
A number is divisible by 4 if and only if its last two digits form a number divisible by 4, i.e., they are equal to any of the following numbers: 00, 04, 08, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, or 96.
Divisibility test of 8
A number is divisible by 8 if and only if its last three digits form a number divisible by 8.
As you can see, already for 8 this rules is not very practical — deciding on the fly if a given threedigit number is divisible by 8 may be hard. Fortunately, there's another divisibility rule for 8, which involves examining separately the hundreds digit and the last two digits.
Alternative divisibility test of 8
If its hundreds (thirdlast) digit is even, a number is divisible by 8 if and only if the number formed by the last two digits is divisible by 8.
If its hundreds digit is odd, a number is divisible by 8 if and only if the number formed by the last two digits plus 4 is divisible by 8.
Divisibility tests of 3 and 9
These next two divisibility tests are very popular among math teachers, they love talking about them. Learn them to be prepared!
Divisibility test of 3
A number is divisible by 3 if and only if the sum of its digits is divisible by 3.
Divisibility test of 9
A number is divisible by 9 if and only if the sum of its digits is divisible by 9.
How do I prove the divisibility rules for 3 and 9?
The two rules above seem nonobvious and maybe even impossible, but in fact it is quite easy to prove them! Let's consider a natural number n
which has five digits: a
, b
, c
, d
, e
(when looking from left to right).
Since we use the positional system with base 10, we can rewrite this number as
n = 10000a + 1000b + 100c + 10d + e
Let's perform a simple trick:
n = 9999a + 999b + 99c + 9d + (a + b + c + d + e)
Now we see that
n  (a + b + c + d + e) = 9999a + 999b + 99c + 9d
n  (a + b + c + d + e) = 9 * (1111a + 111b + 11c + d)
We now stop the calculations and think for a moment.
The righthand side is clearly divisible by both 3 and 9, because of the 9 at the start. This means our lefthand side (which is the difference between our initial number n
and the sum of its digits) is also divisible by both 3 and 9. Because of that, we can say that both n
and (a + b + c + d + e)
have the same remainder when divided by 3 or by 9. We can then check the remainder of n/3
by checking (a + b + c + d + e) / 3
's remainder (and the same for 9
), which would be a much easier calculation.
Therefore, n
itself is divisible by 3
if and only if the sum of its digits is divisible by 3
. In the same way, n
is only divisible by 9
if its digits' sum is 9
. And this is exactly what we wanted to prove!
Divisibility tests of 5 and 25
To test the divisibility of n
by 5ᵏ
, we only need to examine the divisibility of the last k
digits of n
by 5ᵏ
.
Divisibility test of 5
A number is divisible by 5 if and only if its last digit is 0 or 5.
Divisibility test of 25
A number is divisible by 25 if and only if its last two digits form a multiple of 25, i.e., they are one of the following: 00, 25, 50, or 75.
Divisibility tests of 10, 100, etc.
These rules are very simple and similar to what we've seen with 5 and 25: for divisibility by powers of 10, we need as many zeroes at the end of our number as there are zeros in the divisor:

A number is divisible by 10 if and only if its last digit is 0.

A number is divisible by 100 if and only if its last two digits are 00.

A number is divisible by
10ⁿ
if and only if its lastn
digits are all zeros.
Divisibility test of 7
A number is divisible by 7 if and only if subtracting two times the last digit from the rest gives a number divisible by 7.
Don't hesitate to use Omni's divisibility test calculator to generate examples and see how this rule works in practice!
In fact, there are several popular divisibility tests for 7 — let's take at look at two more:
Alternative rule for divisibility by 7
A number is divisible by 7 if and only if subtracting nine times the last digit from the rest gives a number divisible by 7.
Yet another alternative rule for divisibility by 7
A number is divisible by 7 if and only if the alternating sum of blocks of three digits from right to left is divisible by 7.
🙋 Computing the alternating sum of some numbers means that we have to alternate sign. That is, we start with addition, which is followed by subtraction, then by addition again, etc. For example, the alternating sum of the digits of 918,273,645
is 9−1+8−2+7−3+6−4+5 = 25
.
Divisibility test of 11
A number is divisible by 11 if and only if the alternating sum of its digits is divisible by 11.
🙋 The alternating sum of digits may yield a negative number. Fear not — you can simply ignore the minus sign. For instance, if the alternating sum equals −55, then we can simply observe that 55 is divisible by 11, and so your initial number is also divisible by 11.
There's yet another divisibility test for 11, where we do not have to perform an alternating sum but a normal one. However, we have to take blocks of two digits:
Alternative rule for divisibility by 11
A number is divisible by 11 if and only if adding its digits in blocks of two from right to left we get a number divisible by 11.
Divisibility test of 13
A number is divisible by 13 if and only if the alternating sum of blocks of three digits from right to left is divisible by 13.
For instance, if you deal with n = 9,111,414
, you calculate 414 − 111 + 9 = 312
. Since 312
is divisible by 13
(because 312 / 24 = 13
), we conclude that 9,111,414
is divisible by 13 as well.
To see more examples, use our divisibility test calculator!
Other divisibility tests
It is simple to derive divisibility tests for nonprime divisors using prime factorization. Namely, consider the divisor of the form
k = pᵃ * qᵇ * ... * rᶜ
where
p
,q
, andr
are prime numbers; anda
,b
, andc
are the prime number's powers in this factorization.
To find out if a given number n
is divisible by this k
, we need to test its divisibility by all prime numbers raised to their respective powers in the factorization, i.e., by pᵃ
, by qᵇ
, etc.
Let's look at some examples of k
, how each k
is factorized into primepower pairs, and how that determines the divisibility rule for k
:
 A number is divisible by
6 = 2 * 3
if and only if it is divisible by 2 and by 3.  A number is divisible by
12 = 2² * 3
if and only if it is divisible by 4 and by 3.  A number is divisible by
15 = 3 * 5
if and only if it is divisible by 3 and 5.  A number is divisible by
18 = 2 * 3²
if and only if it is divisible by 2 and 9.  A number is divisible by
20 = 2² * 5
if and only if it is divisible by 4 and by 5.
Simple — automatic even — but less and less useful, right? However, sometimes we can rephrase these rules into slightly more useful counterparts. Let's see how we rephrase the last rule from simply "divisible by 20 means divisible by 4 and by 5":
"A number is divisible by 20 if and only if the secondlast digit is even and the last digit is 0."
How do we prove this reworded rule? It's easy! Let's take a look.
Since our number must be divisible by 5 (the first requirement from our original divisibleby20 rule), we remember its last digit must be 0 or 5. But if it were 5, then there would be no chance for the divisibility by 2, and thus by 4 (which is the second requirement). Hence, the last digit must be 0.
And now, we recall the divisibility rule for 4: the last two digits must form a number that is divisible by 4. So far, we've established that the last digit must be zero, and so the last two digits are allowed to be any of 00, 10, 20, 30, 40, 50, 60, 70, 80
, and 90
. Those among them that are divisible by 4 are 00, 20, 40, 60
, and 80
. What do they have in common? Their first digit is even, exactly as we claimed with our rephrased rule.
FAQ
What is a divisibility test?
A divisibility test is a mathematical procedure that allows you to quickly determine whether a given number is divisible by some divisor. Either we can completely avoid the need of the long division or at least end up performing a much simpler one (i.e., for smaller numbers).
How do I test divisibility by 7?
To check if a number is divisible by 7, follow these steps:
 Divide your number into blocks of three digits from right to left.
 Compute the alternating sum of these blocks, from right to left.
 Checks if the result is divisible by 7. If it is, then your number is divisible by 7 too. If not, then your number is not divisible by 7.
 If the result to be examined is very large, then repeat Steps 1 and 2 with this new number.
How do I test divisibility by 11?
We check if a number is divisible by 11 as follows:
 Compute the alternating sum of digits.
 Checks if the result is divisible by 11. If it is, then so is your number. If not, then your number is not divisible by 11.
 If the result to be examined is very large, repeat Steps 1 and 2 with this new number.
 Alternatively, you can replace Step 1 as follows: Divide your number into blocks of two digits from right to left, then compute the sum of these blocks.
Is 1111 divisible by 11?
Yes, 1111 is divisible by 11. To verify this claim, compute the alternating sum of digits and check if it is divisible by 11: 1 − 1 + 1 − 1 = 0
. Of course, 0 is divisible by 11 (and by any other number), and so 1111 is divisible by 11.
Is 111 divisible by 11?
No, 111 is not divisible by 11. Computing the alternating sum of digits we get: 1 − 1 + 1 = 1
. And of course, 1 is not divisible by 11.