Divisibility means that one integer divides another exactly, with no remainder.
If \(d\) is a nonzero integer, then \(d\) divides \(n\) when there is an integer \(q\) such that
where \(q\) is the quotient and \(r\) is the remainder.
The remainder satisfies
The divisibility test is simple:
\[
\begin{aligned}
d\mid n \quad \Longleftrightarrow \quad r=0.
\end{aligned}
\]
2. Why digit rules work
Digit rules work because our number system is base \(10\).
A number like \(123456\) can be written as
\[
\begin{aligned}
123456
&=1\cdot10^5+2\cdot10^4+3\cdot10^3+4\cdot10^2+5\cdot10+6.
\end{aligned}
\]
Many divisibility rules come from how powers of \(10\) behave modulo a divisor.
3. Divisibility by 2
A number is divisible by \(2\) if its last digit is even.
\[
\begin{aligned}
\text{last digit}\in\{0,2,4,6,8\}.
\end{aligned}
\]
Example:
\[
\begin{aligned}
123456 \text{ ends in }6,
\end{aligned}
\]
so it is divisible by \(2\).
4. Divisibility by 3
A number is divisible by \(3\) if the sum of its digits is divisible by \(3\).
\[
\begin{aligned}
123456:\quad 1+2+3+4+5+6=21.
\end{aligned}
\]
Since \(21\) is divisible by \(3\), \(123456\) is divisible by \(3\).
5. Divisibility by 4
A number is divisible by \(4\) if its last two digits form a number divisible by \(4\).
\[
\begin{aligned}
123456:\quad \text{last two digits}=56.
\end{aligned}
\]
Since \(56\div4=14\), \(123456\) is divisible by \(4\).
6. Divisibility by 5 and 10
A number is divisible by \(5\) if it ends in \(0\) or \(5\).
It is divisible by \(10\) if it ends in \(0\).
\[
\begin{aligned}
n\equiv0\pmod{10}
\quad\Rightarrow\quad
n\text{ ends in }0.
\end{aligned}
\]
7. Divisibility by 6
Since
\[
\begin{aligned}
6=2\cdot3
\end{aligned}
\]
and \(2\) and \(3\) are relatively prime, a number is divisible by \(6\) exactly when it is divisible by both \(2\) and \(3\).
\[
\begin{aligned}
6\mid n
\quad\Longleftrightarrow\quad
2\mid n\ \text{and}\ 3\mid n.
\end{aligned}
\]
8. Divisibility by 7
A useful rule for \(7\) is:
remove the last digit, double it, and subtract it from the remaining number.
The original number is divisible by \(7\) if the transformed number is divisible by \(7\).
\[
\begin{aligned}
203:\quad 20-2\cdot3=14.
\end{aligned}
\]
Since \(14\) is divisible by \(7\), \(203\) is divisible by \(7\).
9. Divisibility by 8 and 16
A number is divisible by \(8\) if its last three digits form a number divisible by \(8\).
\[
\begin{aligned}
123456:\quad 456\div8=57.
\end{aligned}
\]
So \(123456\) is divisible by \(8\).
A number is divisible by \(16\) if its last four digits form a number divisible by \(16\).
\[
\begin{aligned}
123456:\quad 3456\div16=216.
\end{aligned}
\]
10. Divisibility by 9
A number is divisible by \(9\) if the sum of its digits is divisible by \(9\).
\[
\begin{aligned}
123456:\quad 1+2+3+4+5+6=21.
\end{aligned}
\]
Since \(21\) is not divisible by \(9\), \(123456\) is not divisible by \(9\).
11. Divisibility by 11
For \(11\), subtract the sum of alternating digits.
If the difference is divisible by \(11\), the number is divisible by \(11\).
For \(123456\), counting from the right:
\[
\begin{aligned}
(6+4+2)-(5+3+1)
&=12-9\\
&=3.
\end{aligned}
\]
Since \(3\) is not divisible by \(11\), \(123456\) is not divisible by \(11\).
12. Composite divisibility rules
Some divisibility rules are combinations of simpler rules.
When the factors are relatively prime, the number must pass both tests.
| Divisor |
Rule |
Reason |
| \(6\) |
Divisible by \(2\) and \(3\) |
\(6=2\cdot3\) |
| \(12\) |
Divisible by \(3\) and \(4\) |
\(12=3\cdot4\), with \(\gcd(3,4)=1\) |
| \(14\) |
Divisible by \(2\) and \(7\) |
\(14=2\cdot7\) |
| \(15\) |
Divisible by \(3\) and \(5\) |
\(15=3\cdot5\) |
| \(18\) |
Divisible by \(2\) and \(9\) |
\(18=2\cdot9\), with \(\gcd(2,9)=1\) |
13. Divisibility by 13, 17, and 19
These divisors have useful transformation rules:
| Divisor |
Transformation rule |
Example form |
| \(13\) |
Add four times the last digit to the remaining number. |
\(10a+b\to a+4b\) |
| \(17\) |
Subtract five times the last digit from the remaining number. |
\(10a+b\to a-5b\) |
| \(19\) |
Add twice the last digit to the remaining number. |
\(10a+b\to a+2b\) |
These transformations preserve divisibility by the corresponding number.
They can be repeated until a smaller number is obtained.
14. Divisibility by 20
A number is divisible by \(20\) if its last two digits form a number divisible by \(20\).
Equivalently, the last two digits must be one of
\[
\begin{aligned}
00,\ 20,\ 40,\ 60,\ 80.
\end{aligned}
\]
15. Worked example: \(123456\)
Check the common rules:
\[
\begin{aligned}
123456 &\text{ is divisible by }2,\\
123456 &\text{ is divisible by }3,\\
123456 &\text{ is divisible by }4,\\
123456 &\text{ is divisible by }6,\\
123456 &\text{ is divisible by }8,\\
123456 &\text{ is divisible by }12,\\
123456 &\text{ is divisible by }16.
\end{aligned}
\]
It is not divisible by \(5\), \(7\), \(9\), \(10\), \(11\), \(13\), \(14\), \(15\), \(17\), \(18\), \(19\), or \(20\).
16. Formula summary
| Divisor |
Fast rule |
| \(2\) | Last digit is even. |
| \(3\) | Digit sum is divisible by \(3\). |
| \(4\) | Last two digits are divisible by \(4\). |
| \(5\) | Last digit is \(0\) or \(5\). |
| \(6\) | Passes rules for \(2\) and \(3\). |
| \(7\) | Double last digit and subtract from the rest. |
| \(8\) | Last three digits are divisible by \(8\). |
| \(9\) | Digit sum is divisible by \(9\). |
| \(10\) | Last digit is \(0\). |
| \(11\) | Alternating digit-sum difference is divisible by \(11\). |
| \(12\) | Passes rules for \(3\) and \(4\). |
| \(13\) | Add four times the last digit to the rest. |
| \(14\) | Passes rules for \(2\) and \(7\). |
| \(15\) | Passes rules for \(3\) and \(5\). |
| \(16\) | Last four digits are divisible by \(16\). |
| \(17\) | Subtract five times the last digit from the rest. |
| \(18\) | Passes rules for \(2\) and \(9\). |
| \(19\) | Add twice the last digit to the rest. |
| \(20\) | Last two digits are divisible by \(20\). |
17. Common mistakes
- Forgetting that the rule for \(6\) requires both \(2\) and \(3\).
- Using the rule for \(3\) when testing divisibility by \(9\); the digit sum must be a multiple of \(9\), not only \(3\).
- Forgetting that \(1\) divides every integer, but this calculator focuses on divisors \(2\) through \(20\).
- Assuming a number is prime just because it is not divisible by \(2\) through \(20\).
- Thinking negative signs affect divisibility. They do not: \(d\mid n\) if and only if \(d\mid |n|\).
Key idea: a divisibility rule is a shortcut for checking whether the remainder is zero.