Clear methods, worked examples and practical results.toolsgenio.com
☰

Divisibility Test Calculator

Your inputs

Calculated result

Yes

Your result

144 is divisible by 12

This calculator provides an estimate based on the entered values. Verify the assumptions and results before making decisions.

Intro

Divisibility is a foundational relation in elementary number theory. It connects integer multiplication, factorization, modular arithmetic, and many familiar computational shortcuts. A divisibility test is not simply a technique for recognizing convenient digit patterns; it is a method for determining whether one integer belongs to the collection of integer multiples of another.

This distinction becomes important when working with negative numbers, zero, unusual divisors, and composite-number conditions. By examining the underlying definitions, it is possible to understand why standard decimal rules work and where careless generalizations fail. This guide develops divisibility from its mathematical definition, explains key boundary cases, and applies the principles to a negative-integer example using exact arithmetic.

About this result

How to use

Enter the requested values, then select Calculate to view the result.

Formula

For integers a and b with a not equal to zero, a | b means there exists k in the integers such that b = a × k. Equivalently, b belongs to the set of integer multiples of a. In modular notation, this can be expressed as b ≡ 0 (mod a).

The congruence says that b and zero differ by an integer multiple of a. For operational calculations involving negative values, different programming languages may choose different remainder-sign conventions, but the question of whether the remainder is zero remains unchanged. The decimal digit-sum test follows from the congruence 10 ≡ 1 (mod 9).

Raising both sides to a nonnegative integer power gives 10^j ≡ 1 (mod 9). For a decimal integer with digits d_j, the number and the sum of its digits are therefore congruent modulo 9. An analogous argument works modulo 3.

For divisibility by 8, observe that 1000 ≡ 0 (mod 8). Every place value from the thousands position upward contributes zero modulo 8, so the final three digits determine divisibility. For composite tests, the correct general identity is that simultaneous divisibility by a and b implies divisibility by lcm(|a|, |b|), provided both are nonzero.

If their greatest common divisor is 1, this least common multiple equals |a × b|. These identities establish a rigorous foundation for shortcuts and clarify why overlapping factor tests can be insufficient.

Worked example

Determine whether the negative integer -14,256 is divisible by -8, and verify the conclusion. Step 1: Identify the integers. The dividend is -14,256 and the divisor is -8. Both are integers, and the divisor is nonzero, so the divisibility question is mathematically valid.

Step 2: Consider magnitudes. Changing the signs of the dividend and divisor does not affect whether exact integer division is possible. It is sufficient to examine whether 14,256 is divisible by 8.

Step 3: Apply the decimal rule for 8. Only the final three decimal digits matter. These digits form the integer 256.

Step 4: Test the ending. Since 256 ÷ 8 = 32, the final three digits are divisible by 8. Consequently, 14,256 is divisible by 8.

Step 5: Determine the quotient with signs. The exact calculation is -14,256 ÷ -8 = 1,782. Dividing two negative integers produces a positive quotient.

Step 6: Verify the defining equation. Multiplying -8 × 1,782 gives -14,256. Therefore, the dividend equals the divisor multiplied by an integer.

Step 7: State the result. The expression -14,256 is divisible by -8, and its remainder is zero. For contrast, consider -14,257 divided by -8.

The magnitude ends in 257, which is not divisible by 8. No integer quotient can satisfy -14,257 = -8 × k, so divisibility fails. This example demonstrates that divisibility is fundamentally a relation among integers, not a property limited to positive numbers or visually convenient decimal endings.

Understand the calculation

Let a and b be integers. The statement that a divides b means there exists an integer k such that b = a × k. In standard integer number theory, the divisor a is generally required to be nonzero when the relationship is connected to ordinary division and remainder calculations. For a nonzero divisor, this condition is equivalent to saying that the dividend produces a zero remainder.

Unlike approximate numerical closeness, divisibility is exact. The integer 100 is divisible by 25 because 100 = 25 × 4. The integer 101 is not divisible by 25 because no integer multiplier produces 101. Signs do not change whether an integer multiple exists.

If 24 is divisible by 8, then -24 is divisible by 8, 24 is divisible by -8, and -24 is divisible by -8. The associated quotient signs differ, but the divisibility property is preserved. Zero requires careful treatment.

For any nonzero integer a, the statement a | 0 is true because 0 = a × 0. However, using zero as a divisor in a quotient or modulo operation is undefined. Some abstract mathematical conventions discuss divisibility involving zero separately, but such conventions should not be confused with an operational division-by-zero calculation.

The number 1 divides every integer, as does -1. Prime numbers have especially simple positive-divisor structures, while composite numbers have factorizations that can support shorter divisibility procedures. Decimal divisibility rules follow from modular relationships among powers of ten.

For example, the test for 9 works because 10, 100, 1000, and all higher powers of 10 each leave remainder 1 upon division by 9. The test for 8 works because 1000 and every higher decimal place value are multiples of 8. Combining tests requires attention to the prime factors represented.

If an integer is divisible by both a and b, it is divisible by their least common multiple. Their product is guaranteed only when a and b are relatively prime. This explains why divisibility by both 2 and 6 does not imply divisibility by 12. The distinction between a divisibility shortcut and a general remainder computation is also important.

Not every possible divisor has a convenient short digit-based test. Exact integer division provides a general method for any nonzero integer divisor. Because the supplied engine information is unverified, this discussion addresses mathematical definitions and correct procedures without asserting implementation-specific behavior, accepted input syntax, or remainder-sign conventions.

Questions

How is divisibility expressed formally in number theory?

For nonzero integer a and integer b, the notation a | b means there exists an integer k satisfying b = a × k. This defines exact integer divisibility.

Why is divisibility unaffected by changing number signs?

Changing the sign of a nonzero divisor or dividend changes the sign of the required integer quotient. The existence of an integer quotient remains the same.

What makes division by zero different from other edge cases?

Ordinary division and modulo operations require a nonzero divisor. No unique quotient can be determined by dividing by zero, so a conventional numerical divisibility calculator must not evaluate that operation.

What role does the least common multiple play in composite tests?

If an integer is divisible by two nonzero integers, it is divisible by their least common multiple. This captures all necessary prime factors without double-counting overlapping contributions.

Do divisibility rules depend on the number base?

Yes. Familiar final-digit and digit-sum tests depend on decimal place values. In another positional numeral system, corresponding rules must be derived from powers of that base.

Can a modulo convention change whether divisibility is true?

No. Some computational conventions assign different signs to nonzero remainders involving negative numbers, but they agree that a zero remainder corresponds to exact divisibility by a nonzero integer.