Skip to main content

Math Basics

Divisibility Rules

In this article, we'll take a closer look at divisibility rules.
These are simple tricks that help you quickly determine if one number can be divided by another, without actually doing the division.

These rules are really helpful for mental math, allowing you to solve problems faster, whether you're working with factors, simplifying fractions, or using modular arithmetic.

Each divisibility rule is based on patterns found in the digits of a number.
This means you don't need to perform long division to check if a number is divisible by 2, 3, 5, or other numbers.

Divisibility by 1

Rule: Every number is divisible by 1.
This is the simplest rule. Since dividing any number by 1 results in the number itself, all numbers satisfy this rule.

Divisibility by 2

Rule: A number is divisible by 2 if its last digit is 0, 2, 4, 6, or 8.
For example, 34 ends in 4, which is even, so 34 is divisible by 2.
This is because even numbers end in these digits.

Divisibility by 3

Rule: A number is divisible by 3 if the sum of its digits is divisible by 3.
For example, To check if 123 is divisible by 3, add the digits: 1 + 2 + 3 = 6. Since 6 is divisible by 3, So 123 is too divisible by 3.

Let's understand the reasoning behind this trick.

Any decimal number N can be represented as : 

N = a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d​, where a, b, c, d are the digits of the numbers.

So if we observe a property, i.e. when you divide the power of 10 by 3 we get 1 as the remainder.

i.e. 10%3 = 1, 100%3 = 1, 1000%3 = 1 and so on.

So for any integer n, (10^n) % 3 = 1.

Now so, N = a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d, if we take the modulo of N with 3 we get,

N%3 = (a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d)%3.

= ((a​*10^k)%3 + (b*10^(k−1))%3 + ⋯ + (c​*10^1)%3 + d%3)

As for any integer n, 10^n % 3 = 1.

So our N simplified to

= (a%3 + b%3 + ⋯ + c%3 + d%3)

= (a + b + c + d)%3

i.e. Sum of digits of n should be divisible by 3.

Divisibility by 4

Rule: A number is divisible by 4 if the number formed by its last two digits is divisible by 4.

For example, for the number 132, consider the last two digits (32). Since 32 is divisible by 4, 132 is divisible by 4.

Let's understand the reasoning behind this trick.

Let's consider a decimal number N. We can express N in terms of its last two digits and the remaining part of the number:

N = 100*Q + R

where Q is the integer part of the number when the last two digits are removed, and R is the number formed by the last two digits.

To understand why only the last two digits matter, let's look at the properties of powers of 10 modulo 4:

10^1 % 4 = 2

10^2 % 4 = 0

10^3 % 4 = 0

10^4 % 4 = 0 and so on.

So for any 10^n % 4 = 0 for n>=2, this tells us that any power of 10 higher than or equal to 10^2 (i.e., 100) is divisible by 4.

When we take modulo by N, we get 

N%4 = (100*Q + R)%4 
Since 100%4 = 0 , 100*Q % 4 = 0, 
Therefore N%4 = (0 + R)%4 = R%4.

This shows that the remainder when N is divided by 4 is the same as the remainder when the last two digits R are divided by 4.

Divisibility by 5

Rule: A number is divisible by 5 if its last digit is 0 or 5.

For example, 245 ends in 5, so it is divisible by 5. Similarly, 450 ends in 0, so it is also divisible by 5.

Since the odd multiple of 5 has the last digit as 5 in it.

For example: 5*1 = 5, 5*3 = 15, 5*5 = 25, 5*7 = 35 and so on.

Even a multiple of 5 has 0 as the last digit. 

For example: 5*2 = 10, 5*4 = 20, 5*6 = 30, 5*8 = 40 and so on.

So to check whether a number is divisible by 5 or not we check its last digit whether it is 0 or 5 or not.

Divisibility by 6

Rule: A number is divisible by 6 if it is divisible by both 2 and 3.

The number 6 can be factored into prime numbers as 6=2×3.

Therefore, a number divisible by 6 must be divisible by both 2 and 3, because 6 is the product of these two factors.

For example, 54 is divisible by 2 (the last digit is 4) and 3 (54 is divisible by 3 because 5 + 4 = 9, and 9 is divisible by 3). Therefore, 54 is divisible by 6.

Divisibility by 7

Rule: Subtract twice the last digit from the rest of the number. If the result is divisible by 7 (or is 0), then the original number is divisible by 7.

For example, for 203, subtract 2 times the last digit (3) from the rest (20) : 

20 - 2*3 = 20 - 6 = 14, which is divisible by 7. 

Therefore, 203 is divisible by 7.

Let's understand the reasoning behind this trick.

  • Representation of the Number:
    • Any number n can be expressed in the form: n=10a+b
      where:
      • a is the number formed by the digits of n, excluding the last digit.
      • b is the last digit of n.
  • Modulo 7 Properties:
    • To test if n is divisible by 7, we check if n % 7=0.
  • Breaking n into Parts:
    • Substitute n=10a+b into the expression n mod 7:
      n % 7=(10a+b) % 7
    • Using the distributive property of modular arithmetic:
      n % 7=(10a % 7+b % 7) % 7
  • Simplify 10%7:
    • Since 10 % 7=3, we replace 10a % 7 with 3a%7, so n%7 = (3a+b)%7
  • Reformulate the Rule:
    • Rearrange the terms to isolate a: 3a+b≡0 (mod 7)
    • Subtract 2b (because 2b % 7=−b % 7): a−2b≡0(mod7)
    • This simplifies to: a−2b % 7=0

Interpret the Rule:
This shows that subtracting twice the last digit b from the rest of the number a preserves divisibility by 7.

If the result (a−2b) is divisible by 7 (or equals 0), then the original number n is divisible by 7.

Divisibility by 8

Rule: A number is divisible by 8 if the number formed by its last three digits is divisible by 8.

For example, for the number 1,216, look at the last three digits (216). Since 216 is divisible by 8 (216 ÷ 8 = 27), 1,216 is divisible by 8.

Let's understand the reasoning behind this trick.

Let's consider a decimal number N. We can express N in terms of its last two digits and the remaining part of the number:

N = 1000*Q + R

where Q is the integer part of the number when the last three digits are removed, and R is the number formed by the last three digits.

To understand why only the last two digits matter, let's look at the properties of powers of 10 modulo 8:

10^1 % 8 = 2

10^2 % 8 = 4

10^3 % 8 = 0

10^4 % 8 = 0 

10^5 % 8 = 0 and so on.

So for any 10^n % 8 = 0 for n>=3, this tells us that any power of 10 higher than or equal to 10^3 

(i.e., 1000) is divisible by 8.

When we take modulo by N, we get 

N%8 = (1000*Q + R)%8 

Since 1000%8 = 0 , 1000*Q % 8 = 0, 

Therefore N%8 = (0 + R)%8 = R%8.

Divisibility by 9

Rule: A number is divisible by 9 if the sum of its digits is divisible by 9.

For example, for 729, add the digits: 7 + 2 + 9 = 18. Since 18 is divisible by 9, 729 is divisible by 9.

Let's understand the reasoning behind this trick.

Any decimal number N can be represented as : 

N = a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d​, where a, b, c, d are the digits of the numbers.

So if we observe a property, i.e. when you divide the power of 10 by 9 we get 1 as the remainder.

i.e 10%9 = 1, 100%9 = 1, 1000%9 = 1 and so on.

So for any integer n, 10^n % 9 = 1.

Now so, N = a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d, if we take the modulo of N with 9 we get,

N%9 = (a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d)%9.

= ((a​*10^k)%9 + (b*10^(k−1))%9 + ⋯ + (c​*10^1)%9 + d%9)

As for any integer n, 10^n % 9 = 1.

So our N simplified to

= (a%9 + b%9 + ⋯ + c%9 + d%9)

= (a + b + c + d)%9

i.e. Sum of digits of n should be divisible by 9.

Divisibility by 10

Rule: A number is divisible by 10 if its last digit is 0.

For example, 450 ends in 0, so it is divisible by 10. However, 47 ends in 7, so it is not divisible by 10.

Any number that ends in 0 is a multiple of 10 because it can be expressed as  N=10⋅(some integer).

Divisibility by 11

Rule: Alternate adding and subtracting the digits from left to right. If the result is divisible by 11 (or is 0), then the original number is divisible by 11.

For example, for 2728, alternate the sum: 2 - 7 + 2 - 8 = -11. 

Since -11 is divisible by 11, 2728 is divisible by 11.

Let's understand the reasoning behind this trick.

Any decimal number N can be represented as : 

N = a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d​, where a, b, c, d are the digits of the numbers.

So if we observe a property, i.e. when you divide the power of 10 by 11 

i.e 10%3 = -1, 

But when 100%11 = 1, 

and then when 1000%11 = -1 and so on.

So for any integer n, 10^n % 11 = -1 if n is odd, and - if n is even

Now so, N = a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d, if we take the modulo of N with 11 we get,

N%11 = (a​*10^k + b*10^(k−1) + ⋯ + c​*10^1 + d)%11.

= ((a​*10^k)%11 + (b*10^(k−1))%11 + ⋯ + (c​*10^1)%11 + d%11)

N%11 = (a-b+c-d​) % 11.

The alternating sum a-b+c-d+e….. and so on effectively gives the remainder when N is divided by 11. 

Therefore, if this alternating sum is divisible by 11 (or is zero), then the original number N is divisible by 11.

💡
Showcase your skills by joining LearnYard as a Technical Content Writer. Apply now and inspire the next generation of learners—fill out the form: https://forms.gle/CGDsbGkcapSfvXKM8