Divisibility Algorithms
Divisibility Algorithms are quick rules that help you decide whether one whole number can be divided evenly by another number without doing long division.
If a number is divisible by another number, it means the division has no remainder. For example, since \(24 \div 6 = 4\), we say that 24 is divisible by 6.
These rules are helpful when you need to work with large numbers, find factors, identify prime numbers, or break numbers into smaller parts.
In this lesson, you will learn simple divisibility tests for several single-digit numbers and how to use them step by step.
Why divisibility rules work
Every whole number is built from digits. Divisibility algorithms use patterns in those digits to tell us whether a number can be divided evenly.
For example, numbers ending in 0, 2, 4, 6, or 8 are even, so they are divisible by 2. Numbers ending in 0 or 5 are divisible by 5. Some rules use the last digit, while others use the sum of the digits.
Main divisibility rules
- Divisible by 2: The last digit is 0, 2, 4, 6, or 8.
- Divisible by 3: Add the digits. If the sum is divisible by 3, then the number is divisible by 3.
- Divisible by 4: Look at the last two digits. If that two-digit number is divisible by 4, then the whole number is divisible by 4.
- Divisible by 5: The last digit is 0 or 5.
- Divisible by 6: The number must be divisible by both 2 and 3.
- Divisible by 8: Look at the last three digits. If that three-digit number is divisible by 8, then the whole number is divisible by 8.
- Divisible by 9: Add the digits. If the sum is divisible by 9, then the number is divisible by 9.
- Divisible by 10: The last digit is 0.
Important idea: Some divisibility tests are based on other tests. For example, divisibility by 6 depends on divisibility by 2 and 3.
How to use a divisibility algorithm
- Choose the divisor you are testing, such as 2, 3, 4, 5, 6, 8, 9, or 10.
- Use the matching divisibility rule.
- Check whether the number fits the rule.
- Decide whether the number is divisible or not divisible.
Worked Example 1: Testing divisibility by 2 and 5
Is \(3{,}470\) divisible by 2? Is it divisible by 5?
For 2, check the last digit. The last digit is 0, and 0 is an even digit. So \(3{,}470\) is divisible by 2.
For 5, check the last digit again. A number is divisible by 5 if it ends in 0 or 5. Since \(3{,}470\) ends in 0, it is divisible by 5.
We can write:
$$3{,}470 \text{ is divisible by } 2 \text{ and } 5.$$
Worked Example 2: Testing divisibility by 3 and 9
Is \(5{,}328\) divisible by 3? Is it divisible by 9?
Add the digits:
$$5 + 3 + 2 + 8 = 18$$
Since 18 is divisible by 3, the number \(5{,}328\) is divisible by 3.
Since 18 is also divisible by 9, the number \(5{,}328\) is divisible by 9 too.
So:
$$5{,}328 \div 3 \text{ has no remainder, and } 5{,}328 \div 9 \text{ has no remainder.}$$
Worked Example 3: Testing divisibility by 4 and 8
Is \(7{,}416\) divisible by 4? Is it divisible by 8?
For 4, look at the last two digits. The last two digits are 16.
Since \(16 \div 4 = 4\), 16 is divisible by 4. So \(7{,}416\) is divisible by 4.
For 8, look at the last three digits. The last three digits are 416.
Check whether 416 is divisible by 8:
$$416 \div 8 = 52$$
Since the division is exact, \(7{,}416\) is divisible by 8.
Worked Example 4: Testing divisibility by 6
Is \(2{,}154\) divisible by 6?
To be divisible by 6, a number must be divisible by both 2 and 3.
First, test divisibility by 2. The last digit is 4, so the number is divisible by 2.
Next, test divisibility by 3. Add the digits:
$$2 + 1 + 5 + 4 = 12$$
Since 12 is divisible by 3, \(2{,}154\) is divisible by 3.
Because \(2{,}154\) is divisible by both 2 and 3, it is divisible by 6.
Using divisibility rules to break apart numbers
Divisibility algorithms can help you decompose, or break apart, a number into factors.
Suppose you want to break apart \(180\).
- It ends in 0, so it is divisible by 10.
- Its last digit is 0, so it is divisible by 2 and 5.
- The digit sum is \(1+8+0=9\), so it is divisible by 3 and 9.
- The last two digits are 80, so it is divisible by 4.
This tells us that 180 has many factors. For example:
$$180 = 18 \times 10 = 36 \times 5 = 9 \times 20$$
Divisibility rules help you find these factor pairs much faster.
Common mistakes to avoid
- Mixing up the rules for 3 and 9: Both use the sum of the digits, but make sure you check whether the sum is divisible by 3 or by 9.
- Using only one part of the rule for 6: A number must pass both tests, for 2 and for 3.
- Looking at the whole number instead of the ending digits: For 4, check the last two digits. For 8, check the last three digits.
- Forgetting what divisible means: It means there is no remainder.
Quick check examples
- \(246\): divisible by 2 because it ends in 6.
- \(246\): divisible by 3 because \(2+4+6=12\), and 12 is divisible by 3.
- \(246\): not divisible by 9 because 12 is not divisible by 9.
- \(1{,}235\): divisible by 5 because it ends in 5.
- \(1{,}232\): divisible by 4 because the last two digits, 32, are divisible by 4.
Summary
Divisibility algorithms are fast methods for deciding whether a number can be divided evenly by another number.
You can often check just the last digit, the last two or three digits, or the sum of the digits. Learning these patterns makes it easier to find factors, simplify number problems, and work with larger numbers confidently.
Put what you read to the test
You've worked through Divisibility Algorithms. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.