On this page
You probably learnt this as a line to memorise: last two digits for 4, last three for 8. It is much harder to get wrong once you see why it works, and that takes two lines of place value.
What is the divisibility rule for 4 and 8?
A number is divisible by 4 if the number formed by its last two digits is divisible by 4, as stated in Wolfram MathWorld's list of divisibility tests.
A number is divisible by 8 if the number formed by its last three digits is divisible by 8, according to the same MathWorld page.
So for 40,832 you only look at 32, which is 4 × 8, and the whole number is divisible by 4. For 34,152 you only look at 152, which is 8 × 19, so the whole number is divisible by 8. Both examples come from the divisibility rule article on Wikipedia.
Why do only the last two digits matter for 4?
Split any whole number into "everything before the last two digits" and "the last two digits". Take 7,345,128:
7,345,128 = 73,451 × 100 + 28
Since 100 = 4 × 25, the front part is a multiple of 4 no matter what 73,451 is. Only the leftover, 28, decides. Since 28 = 4 × 7, the number 7,345,128 is divisible by 4.
This also tells you something stronger: the remainder when you divide the whole number by 4 is the same as the remainder when you divide its last two digits by 4. That is the starting point of the remainder methods in our post on finding remainders of large powers for JEE.
Why does the rule for 8 need three digits, not two?
Because 100 is not a multiple of 8: 100 = 8 × 12 + 4. The hundreds digit leaves a remainder behind, so it still matters. 216 and 316 both end in 16, and 16 = 8 × 2. But 216 = 8 × 27, while 316 ÷ 8 = 39.5. Same last two digits, different answers.
Move up one place and the problem disappears, because 1000 = 8 × 125. Write 7,345,128 as 7,345 × 1000 + 128. The front part is a multiple of 8, and 128 = 8 × 16, so the whole number is divisible by 8. The Wikipedia article states the general pattern: to test divisibility by a power of 2, say 2 to the power n, you only need to look at the last n digits.
How can you check the last digits quickly?
Three fast ways to test the short number:
For 4, look at the tens digit. If the tens digit is even, the ones digit must be 0, 4 or 8; if it is odd, the ones digit must be 2 or 6 (Wikipedia). So 76 passes (7 is odd, ends in 6) and 54 fails (5 is odd, ends in 4).
For 8, use a weighted sum. Add the ones digit, twice the tens digit and four times the hundreds digit; if that total is divisible by 8, so is the number (MathWorld). For 34,152: 2 + 2 × 5 + 4 × 1 = 16, which is divisible by 8.
For either, halve. Halve the last two digits twice (for 4) or the last three digits three times (for 8). If you never reach a fraction, it divides. For 152: 76, 38, 19. Three clean halvings, so 34,152 is divisible by 8.
What are the common slip-ups?
Checking only the last digit. 1,234 ends in 4, but 34 ÷ 4 = 8.5, so 1,234 is not divisible by 4.
Using two digits for 8. The 216 and 316 pair above is the trap. Always take three digits.
Dropping zeros in the last three digits. In 5,008, the last three digits are 008, which is 8. It is divisible by 8.
Assuming "divisible by 4" means "divisible by 8". 12 passes the test for 4 but is not a multiple of 8. Every multiple of 8 is a multiple of 4, not the other way round; our explainer on factors and multiples covers why.
Try these five
Decide whether each is divisible by 4, by 8, both or neither. Answers below.
9,876,512
4,330
2,716
1,000,104
58,382
Answers: (1) both, since 512 = 8 × 64. (2) neither, since 30 is not a multiple of 4. (3) 4 only: 16 passes, but 716 ÷ 8 = 89.5. (4) both, since 104 = 8 × 13. (5) neither, since 82 ÷ 4 = 20.5.
Next, try counting problems such as how many numbers up to 1000 are not divisible by 2, 3 or 5. If you cannot see where a solution went wrong, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If place value itself feels shaky, the Fermi Concept Library gives each mathematics concept its own lesson.



