Mathematics

Divisibility Rules: Formula, Rules & Examples

Divisibility rules are shortcuts for determining whether one integer divides another exactly without performing the full division calculation. They are particularly useful for identifying factors, simplifying fractions, testing composite numbers, checking multiples, and working with large integers.

For example, 4,572 is divisible by 3 because its digits add to:

4 + 5 + 7 + 2 = 18

and:

18 ÷ 3 = 6

Since the digit sum is divisible by 3, the original number is also divisible by 3.

Mathematically, an integer n is divisible by a nonzero integer d when:

n = d × k

for some integer k.

Equivalently:

n mod d = 0

These two statements express the core idea behind every divisibility rule.

What Does Divisible Mean?

A number is divisible by another number when division produces an integer with no remainder.

For example:

42 ÷ 7 = 6

so 42 is divisible by 7.

But:

43 ÷ 7 = 6 remainder 1

so 43 is not divisible by 7.

The detailed relationship among dividend, divisor, quotient, and remainder belongs to division. Divisibility rules provide faster tests when the only question is whether the remainder would be zero.

Divisibility Rule for 2

An integer is divisible by 2 if its final digit is:

0, 2, 4, 6, or 8

These are the even digits.

For example:

7,438

ends in 8.

Therefore:

7,438 is divisible by 2.

Indeed:

7,438 ÷ 2 = 3,719

Example

Is 12,675 divisible by 2?

Its final digit is:

5

Since 5 is not even:

12,675 is not divisible by 2.

Only the final digit matters because every other decimal place represents a multiple of 10, and every multiple of 10 is divisible by 2.

Divisibility Rule for 3

An integer is divisible by 3 if the sum of its digits is divisible by 3.

For example:

6,372

Add the digits:

6 + 3 + 7 + 2 = 18

Since:

18 ÷ 3 = 6

the original number is divisible by 3.

Therefore:

6,372 is divisible by 3.

Another Rule-of-3 Example

Test:

8,541

Digit sum:

8 + 5 + 4 + 1 = 18

Since 18 is divisible by 3:

8,541 is divisible by 3.

In fact:

8,541 ÷ 3 = 2,847

Divisibility Rule for 4

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

For example:

13,724

Look only at:

24

Since:

24 ÷ 4 = 6

the entire number is divisible by 4.

Therefore:

13,724 is divisible by 4.

This works because every multiple of 100 is divisible by 4.

Rule-of-4 Example

Test:

8,318

The final two digits are:

18

Since 18 is not divisible by 4:

8,318 is not divisible by 4.

There is no need to divide the full number.

Divisibility Rule for 5

An integer is divisible by 5 if its final digit is:

0 or 5

Examples:

135 is divisible by 5.

2,840 is divisible by 5.

917 is not divisible by 5.

This is one of the fastest divisibility rules because only one digit needs to be examined.

Divisibility Rule for 6

A number is divisible by 6 when it is divisible by both 2 and 3.

Therefore, check:

  1. Is the number even?
  2. Is its digit sum divisible by 3?

For example:

1,254

The final digit is 4, so the number is divisible by 2.

Its digit sum is:

1 + 2 + 5 + 4 = 12

Since 12 is divisible by 3, both conditions hold.

Therefore:

1,254 is divisible by 6.

Check:

1,254 ÷ 6 = 209

Why Both Conditions Matter for 6

Consider:

15

Its digit sum is 6, so 15 is divisible by 3.

However, 15 is not even.

Therefore:

15 is not divisible by 6.

Now consider:

14

It is even, so it is divisible by 2.

Its digit sum is:

1 + 4 = 5

which is not divisible by 3.

Therefore:

14 is not divisible by 6.

A number must satisfy both tests.

Divisibility Rule for 7

The rule for 7 is less obvious.

Take the final digit, double it, and subtract that result from the number formed by the remaining digits.

If the resulting number is divisible by 7, then the original number is divisible by 7.

Example: 203

Separate the final digit:

20 and 3

Double 3:

2 × 3 = 6

Subtract:

20 – 6 = 14

Since:

14 is divisible by 7

we conclude:

203 is divisible by 7.

Check:

203 ÷ 7 = 29

Another Divisibility-by-7 Example

Test:

1,645

Remove the last digit 5:

164

Double 5:

10

Subtract:

164 – 10 = 154

Apply the rule again.

Remove 4:

15

Double 4:

8

Subtract:

15 – 8 = 7

Since 7 is divisible by 7:

1,645 is divisible by 7.

Indeed:

1,645 ÷ 7 = 235

Divisibility Rule for 8

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

For example:

27,416

Look at:

416

Since:

416 ÷ 8 = 52

the entire number is divisible by 8.

Therefore:

27,416 is divisible by 8.

The rule works because 1,000 is divisible by 8.

Rule-of-8 Example

Test:

53,214

The last three digits are:

214

Since 214 is not divisible by 8:

53,214 is not divisible by 8.

Divisibility Rule for 9

An integer is divisible by 9 when the sum of its digits is divisible by 9.

For example:

73,629

Add:

7 + 3 + 6 + 2 + 9 = 27

Since:

27 ÷ 9 = 3

the original number is divisible by 9.

Therefore:

73,629 is divisible by 9.

This rule resembles the rule for 3, but the digit sum itself must be divisible by 9.

Divisibility Rule for 10

A number is divisible by 10 if it ends in:

0

Examples:

70

540

18,230

are all divisible by 10.

A number ending in any other digit is not divisible by 10.

Divisibility Rule for 11

For divisibility by 11, find the difference between the sums of alternating digits.

If that difference is 0 or another multiple of 11, the number is divisible by 11.

Consider:

9,185

Add alternating positions:

9 + 8 = 17

and:

1 + 5 = 6

Find the difference:

17 – 6 = 11

Since 11 is divisible by 11:

9,185 is divisible by 11.

Check:

9,185 ÷ 11 = 835

Another Rule-of-11 Example

Test:

4,312

Alternating sums:

4 + 1 = 5

3 + 2 = 5

Difference:

5 – 5 = 0

Since 0 is a multiple of 11:

4,312 is divisible by 11.

Indeed:

4,312 ÷ 11 = 392

Divisibility Rule for 12

A number is divisible by 12 if it is divisible by both:

3 and 4

For example:

2,124

Digit sum:

2 + 1 + 2 + 4 = 9

So the number is divisible by 3.

Its final two digits are:

24

Since 24 is divisible by 4, both conditions hold.

Therefore:

2,124 is divisible by 12.

Check:

2,124 ÷ 12 = 177

Common Divisibility Rules at a Glance

DivisorQuick test
2Last digit is 0, 2, 4, 6, or 8
3Digit sum is divisible by 3
4Last two digits form a number divisible by 4
5Last digit is 0 or 5
6Divisible by both 2 and 3
7Double the last digit and subtract it from the remaining number
8Last three digits form a number divisible by 8
9Digit sum is divisible by 9
10Last digit is 0
11Difference of alternating digit sums is a multiple of 11
12Divisible by both 3 and 4

The table provides quick tests, but understanding why they work helps prevent misapplication.

Divisibility Rule for 15

A number is divisible by 15 when it is divisible by both:

3 and 5

For example:

735

Its digit sum is:

7 + 3 + 5 = 15

so it is divisible by 3.

It ends in 5, so it is divisible by 5.

Therefore:

735 is divisible by 15.

Check:

735 ÷ 15 = 49

Divisibility Rule for 18

A number is divisible by 18 if it is divisible by:

2 and 9

For example:

1,458

It ends in 8, so it is divisible by 2.

Its digit sum is:

1 + 4 + 5 + 8 = 18

which is divisible by 9.

Therefore:

1,458 is divisible by 18.

Divisibility Rule for 25

A number is divisible by 25 when its final two digits are:

00, 25, 50, or 75

Examples:

1,300

2,425

6,750

9,175

are all divisible by 25.

This rule follows from the repeating pattern of multiples of 25 in base 10.

Why the Rule for 3 Works

Consider a decimal integer such as:

4,572

Its expanded form is:

4 × 1000 + 5 × 100 + 7 × 10 + 2

When considering divisibility by 3:

10 leaves the same remainder as 1.

So do:

100

1000

and every higher power of 10.

Therefore, the original number has the same remainder modulo 3 as:

4 + 5 + 7 + 2

This is why the digit sum can replace the whole number when testing divisibility by 3.

Why the Rule for 9 Works

The same reasoning applies to 9 because:

10 = 9 + 1

Therefore every power of 10 has remainder 1 when divided by 9.

So a number and its digit sum have the same remainder modulo 9.

For:

45,783

the digit sum is:

4 + 5 + 7 + 8 + 3 = 27

Since 27 is divisible by 9:

45,783 is divisible by 9.

Why the Rule for 4 Uses Two Digits

Every integer can be separated into:

a multiple of 100 + its last two digits

Since:

100 ÷ 4 = 25

every multiple of 100 is already divisible by 4.

Therefore, only the final two digits can determine whether a remainder remains.

For:

62,316

the number can be viewed as:

62,300 + 16

The first part is divisible by 4, and:

16 ÷ 4 = 4

so the entire number is divisible by 4.

Why the Rule for 8 Uses Three Digits

The logic is similar.

Since:

1000 ÷ 8 = 125

every multiple of 1000 is divisible by 8.

Therefore, only the last three digits need to be tested.

For:

931,624

consider:

624

Since:

624 ÷ 8 = 78

the original number is divisible by 8.

Divisibility and Remainders

Divisibility is fundamentally a remainder question.

If:

n = dq + r

with:

0 ≤ r < |d|

then n is divisible by d exactly when:

r = 0

For example:

68 = 7 × 9 + 5

so 68 is not divisible by 7.

But:

70 = 7 × 10 + 0

so 70 is divisible by 7.

This relationship connects divisibility with the arithmetic of quotients and remainders.

Divisibility Rules and Factors

If d divides n, then d is a factor of n.

For example, because:

84 ÷ 7 = 12

the number 7 is a factor of 84.

Divisibility rules can therefore help identify possible factor relationships before building a complete factor list.

For two or more integers, identifying which divisors work for all of them leads to common factors.

Divisibility Rules and Prime Numbers

A number greater than 1 is composite if a nontrivial divisor can be found.

For example:

231

Digit sum:

2 + 3 + 1 = 6

Since 6 is divisible by 3:

231 is divisible by 3

Therefore 231 cannot be prime.

The broader testing and classification of prime numbers requires more than a small set of divisibility shortcuts, but these rules can eliminate many candidates immediately.

Divisibility Rules and Composite Numbers

Suppose:

4,095

Its digit sum is:

4 + 0 + 9 + 5 = 18

so it is divisible by both 3 and 9.

It also ends in 5, so it is divisible by 5.

Finding even one nontrivial divisor proves that the number belongs among composite numbers.

There is no need to identify every factor merely to prove compositeness.

Divisibility and Prime Factorization

Divisibility tests can help start a prime factorization.

Consider:

1,260

It ends in 0, so it is divisible by 10:

1,260 = 126 × 10

The digit sum of 126 is:

1 + 2 + 6 = 9

so 126 is divisible by 9 and therefore by 3.

Systematically identifying such divisors can help break a composite integer into prime factors.

The full decomposition procedure remains a separate problem from a simple divisibility test.

Divisibility and the Euclidean Algorithm

The Euclidean algorithm repeatedly uses division and remainders to find a greatest common divisor.

Divisibility rules can sometimes identify an obvious factor before that algorithm begins, but the two methods serve different purposes.

A divisibility rule answers:

Does this divisor work exactly?

The Euclidean algorithm answers:

What is the greatest divisor shared by these integers?

Divisibility and Decimal Fractions

Divisibility rules apply directly to integers, not arbitrary decimal values such as:

12.75

However, converting a terminating decimal to fraction often produces integers in the numerator and denominator that can then be simplified using divisibility.

For example:

0.45 = 45/100

Both 45 and 100 are divisible by 5:

45/100 = 9/20

So divisibility becomes useful after the decimal has been represented as an integer ratio.

Divisibility and Decimal Operations

Ordinary decimal operations work with non-integer values as well as integers, while classical divisibility tests focus on exact integer division.

For example:

7.5 ÷ 2.5 = 3

is a valid decimal calculation.

But statements such as:

7,542 is divisible by 3

belong specifically to integer arithmetic.

Keeping those contexts separate avoids extending digit-based rules to situations where they were not designed to apply.

Divisibility and Determinants

A matrix calculation may produce an integer determinant, after which divisibility rules can analyze that integer.

For example, suppose a determinant calculation gives:

det(A) = 1,386

Its digit sum is:

1 + 3 + 8 + 6 = 18

Therefore, 1,386 is divisible by 9 and by 3.

The divisibility test analyzes the determinant’s numerical result; it does not replace the matrix calculation that produced it.

Divisibility and Information-Theory Quantities

Not every numerical concept is an integer-divisibility problem. A quantity such as entropy may involve logarithms and non-integer values, so digit-based divisibility tests generally do not determine its mathematical behavior.

This distinction is useful: divisibility rules are specialized tools for integer structure, not universal shortcuts for every calculation involving numbers.

Repeated Digit-Sum Tests

A digit sum can itself be tested again.

For example:

987,654,321

Add its digits:

9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 45

Since:

45 is divisible by 9

the original number is divisible by 9.

You can continue:

4 + 5 = 9

which makes the result even easier to recognize.

Testing a Large Number Efficiently

Suppose we want to test:

8,734,752

for divisibility by several numbers.

For 2, inspect the final digit:

2

So it is divisible by 2.

For 3, calculate the digit sum:

8 + 7 + 3 + 4 + 7 + 5 + 2 = 36

So it is divisible by 3.

Because it is divisible by both 2 and 3:

it is divisible by 6.

For 4, inspect the final two digits:

52

Since:

52 ÷ 4 = 13

it is divisible by 4.

For 8, inspect the final three digits:

752

Since:

752 ÷ 8 = 94

it is divisible by 8.

For 9, the digit sum is 36, which is divisible by 9.

Therefore, the number is divisible by:

2, 3, 4, 6, 8, and 9

among other possible divisors.

Combining Divisibility Rules

Rules for composite divisors can often be built from smaller coprime factors.

For example:

6 = 2 × 3

so testing divisibility by 2 and 3 tests divisibility by 6.

Likewise:

15 = 3 × 5

so divisibility by both 3 and 5 establishes divisibility by 15.

And:

18 = 2 × 9

so divisibility by both 2 and 9 establishes divisibility by 18.

However, simply combining any two divisor tests without understanding their relationship can be misleading.

A Caution About Overlapping Factors

Consider testing divisibility by 12.

Since:

12 = 3 × 4

and 3 and 4 are coprime, requiring divisibility by both works cleanly.

But saying a number is divisible by 12 merely because it is divisible by 2 and 6 is not sufficient in every naïve factor-combination argument, because 2 and 6 overlap in their factor of 2.

For example:

18

is divisible by 2 and 6 but is not divisible by 12.

So composite divisibility tests must be based on enough prime-power information to guarantee the full divisor.

Common Divisibility Mistakes

A frequent error is using the digit-sum rule for divisors where it does not apply.

For example, a digit sum divisible by 4 does not prove that the original number is divisible by 4.

For 22:

2 + 2 = 4

but:

22 ÷ 4

is not an integer.

The correct test for 4 uses the final two digits.

Another common mistake is treating divisibility by 6 as equivalent to divisibility by either 2 or 3. Both conditions are required.

For 7, it is easy to add the doubled final digit instead of subtracting it. The standard rule described here uses subtraction.

Divisibility Is Exact

A number is either divisible by a given integer or it is not.

For example:

100 ÷ 6 ≈ 16.667

does not make 100 divisible by 6.

Divisibility requires an integer quotient:

n / d = integer

or equivalently:

remainder = 0

An approximate quotient is not enough.

How to Verify a Divisibility Test

After using a shortcut, direct division can confirm the answer.

Suppose the digit-sum rule says:

6,237 is divisible by 3.

Check:

6,237 ÷ 3 = 2,079

The quotient is an integer, confirming the test.

For larger numbers, direct verification may be less convenient, which is exactly where divisibility rules save time.

Frequently Asked Questions

What are divisibility rules?

Divisibility rules are shortcuts that determine whether an integer can be divided exactly by another integer without carrying out the entire division.

What is the mathematical formula for divisibility?

An integer n is divisible by a nonzero integer d if:

n = dk

for some integer k.

Equivalently:

n mod d = 0

What is the rule for divisibility by 2?

The final digit must be:

0, 2, 4, 6, or 8.

What is the rule for divisibility by 3?

Add the digits. If their sum is divisible by 3, the original number is divisible by 3.

What is the rule for divisibility by 4?

Check the final two digits. If the number formed by those two digits is divisible by 4, the full number is divisible by 4.

What is the rule for divisibility by 5?

The number must end in:

0 or 5.

What is the rule for divisibility by 6?

The number must be divisible by both 2 and 3.

What is the rule for divisibility by 7?

Double the final digit and subtract it from the remaining leading digits. If the resulting number is divisible by 7, the original number is divisible by 7. The procedure can be repeated when necessary.

What is the rule for divisibility by 8?

Check the final three digits. If they form a number divisible by 8, the complete integer is divisible by 8.

What is the rule for divisibility by 9?

Add the digits. If the digit sum is divisible by 9, the original number is divisible by 9.

What is the rule for divisibility by 10?

The number must end in 0.

What is the rule for divisibility by 11?

Subtract one alternating digit sum from the other. If the difference is 0 or a multiple of 11, the number is divisible by 11.

Why are divisibility rules useful?

They allow factors and multiples to be recognized quickly, reduce unnecessary long calculations, assist fraction simplification, and provide fast checks during number-theory calculations.

Final Example

Determine whether:

48,312

is divisible by 2, 3, 4, 6, 8, 9, 10, 11, and 12.

For 2, the number ends in 2:

divisible by 2.

For 3, the digit sum is:

4 + 8 + 3 + 1 + 2 = 18

so:

divisible by 3.

For 4, the final two digits are:

12

so:

divisible by 4.

Since it is divisible by both 2 and 3:

divisible by 6.

For 8, examine:

312

and:

312 ÷ 8 = 39

so:

divisible by 8.

The digit sum is 18, which is also divisible by 9:

divisible by 9.

The number does not end in 0:

not divisible by 10.

For 11, calculate the alternating sums:

4 + 3 + 2 = 9

and:

8 + 1 = 9

Difference:

9 – 9 = 0

so:

divisible by 11.

Finally, it is divisible by both 3 and 4:

divisible by 12.

Therefore, 48,312 is divisible by:

2, 3, 4, 6, 8, 9, 11, and 12

but not by 10.

Divisibility rules turn many exact integer-division questions into quick pattern checks, while still resting on the same fundamental condition: the remainder must be zero.

Mehran Khan

Mehran Khan is the primary author at The Logic Library and CEO & Founder of One Digit Media. With 10+ years of experience in software engineering, SEO, and digital publishing, he uses a research-led approach to Logics, Maths, Tech, Formulas, Science, and AI.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button