Instantly check divisibility by any integer, find all divisors, get prime factorization, and explore divisibility rules for numbers 1 through 20. A complete number theory toolkit for students, teachers, and curious minds.
Divisibility is a fundamental concept in arithmetic and number theory. An integer a is divisible by another integer b (with b ≠ 0) if there exists an integer k such that a = b · k. In other words, b divides a without leaving a remainder. We write this as b | a. Divisibility rules — sometimes called "divisibility tests" — are shortcuts that let you determine whether a given integer is divisible by a fixed divisor without performing the actual division.
For integers a and b ≠ 0:
b divides a ⇔ a = b · k for some integer k ⇔ a mod b = 0
This seemingly simple idea underpins many areas of mathematics: from elementary arithmetic and fractions to modular arithmetic, cryptography, and abstract algebra. The Divisibility Rule Calculator on this page brings these concepts to life. It not only tells you whether one number divides another, but also gives you a complete factorization, lists all divisors, and applies the classic divisibility rules for numbers 1 through 20.
When you enter an integer n, the tool performs the following steps:
The algorithms used are based on elementary number theory and are optimized for performance. For numbers up to 1012, the divisor enumeration and factorization run in sub‑millisecond time in modern browsers.
Divisibility rules are powerful mental shortcuts. Below is a reference table for the most common divisors, which the tool also applies automatically in the results grid.
| Divisor | Rule | Example |
|---|---|---|
| 2 | Last digit is even (0, 2, 4, 6, 8). | 144 → last digit 4 → divisible. |
| 3 | Sum of digits is divisible by 3. | 144 → 1+4+4=9 → divisible. |
| 4 | Last two digits form a number divisible by 4. | 144 → 44 → divisible by 4. |
| 5 | Last digit is 0 or 5. | 145 → last digit 5 → divisible. |
| 6 | Divisible by both 2 and 3. | 144 → even and sum 9 → divisible. |
| 7 | Double the last digit and subtract from the rest; repeat. | 343 → 34 − 2·3 = 28 → divisible. |
| 8 | Last three digits form a number divisible by 8. | 1440 → 440 → divisible by 8. |
| 9 | Sum of digits is divisible by 9. | 144 → 1+4+4=9 → divisible. |
| 10 | Last digit is 0. | 1440 → divisible. |
| 11 | Alternating sum of digits is divisible by 11. | 121 → (1 − 2 + 1) = 0 → divisible. |
| 12 | Divisible by both 3 and 4. | 144 → divisible by 3 & 4 → divisible. |
| 13 | Four times the last digit, add to the rest; repeat. | 169 → 16 + 4·9 = 52 → divisible. |
| 17 | Subtract 5 times the last digit from the rest; repeat. | 221 → 22 − 5·1 = 17 → divisible. |
| 19 | Add 2 times the last digit to the rest; repeat. | 361 → 36 + 2·1 = 38 → divisible. |
A school has 2520 pencils to distribute equally among classrooms. Without dividing, the principal can use divisibility rules to quickly know that 2520 is divisible by 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, and many more. In fact, 2520 is the least common multiple of 1 through 10, making it a highly composite number. This property is used in scheduling, inventory management, and even in music theory (time signatures). Our calculator instantly reveals that 2520 has 48 divisors, a fact that would take minutes to compute by hand.
Prime factorization is the foundation of the RSA encryption algorithm. The difficulty of factoring large numbers into primes is what makes RSA secure. While our tool works with numbers up to 1012 (for performance reasons), the same principles apply to the enormous primes used in real‑world cryptography. Understanding divisibility and factorization is the first step toward grasping modern encryption.