Divisibility Test Calculator
Test if a number is divisible by another number. Check multiple divisors, learn divisibility rules for 2-12, and see step-by-step calculations.
What is Divisibility?
A number $A$ is divisible by another number $B$ if when you divide $A$ by $B$, you get a whole number with no remainder. In other words, $A$ divided by $B$ equals an integer. We write this as $B \mid A$ (read as "$B$ divides $A$") or say that "$A$ is a multiple of $B$."
$$A \text{ is divisible by } B \iff A \bmod B = 0$$
For example, 24 is divisible by 4 because $24 \div 4 = 6$ (a whole number with no remainder). However, 24 is not divisible by 5 because $24 \div 5 = 4$ with a remainder of 4.
Divisibility Rules (2-12)
Divisibility rules are shortcuts that let you determine if a number is divisible by another without performing the full division. These rules are essential for simplifying fractions, prime factorization, and number theory.
| Divisor | Rule | Example |
|---|---|---|
| 2 | Last digit is even (0, 2, 4, 6, 8) | 128 ends in 8 (even), so divisible |
| 3 | Sum of digits is divisible by 3 | 123: 1+2+3=6, and 6/3=2, so divisible |
| 4 | Last two digits form a number divisible by 4 | 1324: last two digits = 24, 24/4=6, divisible |
| 5 | Last digit is 0 or 5 | 785 ends in 5, so divisible |
| 6 | Divisible by both 2 AND 3 | 72: even and 7+2=9/3=3, so divisible |
| 7 | Double last digit, subtract from rest; repeat | 161: 16-2(1)=14, 14/7=2, divisible |
| 8 | Last three digits form a number divisible by 8 | 7120: 120/8=15, so divisible |
| 9 | Sum of digits is divisible by 9 | 729: 7+2+9=18, 18/9=2, divisible |
| 10 | Last digit is 0 | 340 ends in 0, so divisible |
| 11 | Alternating sum of digits is divisible by 11 | 1364: 1-3+6-4=0, divisible |
| 12 | Divisible by both 3 AND 4 | 144: 1+4+4=9/3=3, 44/4=11, divisible |
How to Use This Calculator
- Enter the number: Type the integer you want to test for divisibility. The calculator accepts positive and negative integers.
- Choose test mode: Select Common Divisors (2-12), Prime Divisors (2-97), or Custom Divisors for your own list.
- Enter custom divisors (if applicable): Separate multiple divisors with commas.
- Review results: Green checkmarks indicate divisibility with the quotient shown; red X marks show non-divisibility with the remainder and rule explanation.
Prime Factorization and Divisibility
Every positive integer greater than 1 can be expressed as a unique product of prime numbers - its prime factorization. A number is divisible by another if and only if all prime factors of the divisor are contained in the factorization of the number.
For example, $60 = 2^2 \times 3 \times 5$. Since $12 = 2^2 \times 3$, and 60 contains at least $2^2$ and $3^1$, 60 is divisible by 12. However, 60 is not divisible by $8 = 2^3$ because 60 only has $2^2$.
Applications of Divisibility
- Simplifying fractions: Find common factors between numerator and denominator
- Finding GCD and LCM: Divisibility tests help identify common divisors
- Cryptography: Many encryption algorithms rely on divisibility properties of prime numbers
- Computer science: Hash functions, modular arithmetic, and data structures use divisibility
- Number theory: Proving properties about integers and prime numbers
- Calendar calculations: Leap years are determined by divisibility rules (by 4, 100, 400)
Frequently Asked Questions
What does it mean for a number to be divisible by another?
A number A is divisible by another number B if dividing A by B gives a whole number with no remainder. For example, 24 is divisible by 4 because 24 / 4 = 6 exactly. However, 24 is not divisible by 5 because 24 / 5 = 4 with a remainder of 4.
What are the divisibility rules for 2, 3, 4, 5, and 6?
Divisibility by 2: last digit is even. By 3: sum of all digits is divisible by 3. By 4: last two digits form a number divisible by 4. By 5: last digit is 0 or 5. By 6: number is divisible by both 2 and 3.
How do I check if a number is divisible by 7?
To test divisibility by 7: take the last digit, double it, and subtract from the remaining number. If the result is divisible by 7 (including 0), the original is too. For example, 161: double the last digit (1x2=2), subtract from remaining (16-2=14), and 14 is divisible by 7, so 161 is divisible by 7.
What is the divisibility rule for 9 and 11?
Divisibility by 9: sum of digits is divisible by 9. For example, 729: 7+2+9=18, and 18/9=2. Divisibility by 11: calculate the alternating sum of digits (add and subtract alternately). If the result is divisible by 11, so is the number.
How does prime factorization relate to divisibility?
A number is divisible by another only if all prime factors of the divisor are present in the original number's factorization. For example, 60 = 2^2 x 3 x 5 is divisible by 12 = 2^2 x 3 because 60 contains both factors. You can check divisibility further with our Prime Factorization Calculator.
What is the fastest way to check divisibility for large numbers?
For large numbers, use efficient shortcuts: for 2, 5, 10 just check the last digit; for 3, 9 sum all digits; for 4 check last two digits; for 8 check last three digits; for 11 use the alternating sum rule. This calculator automates all these checks with step-by-step explanations using our Modulo Calculator for direct verification.