gizmobench
BrowseDaily

Divisibility Calculator

Enter an integer and a nonzero divisor to check whether they divide exactly. See the quotient and remainder, open the divisibility solution steps, or compare the worked digit rules for divisors 2 to 12. Both inputs can have up to 1,000 significant digits; larger divisors use exact division without a digit rule.

Divisible by 3Yes12,345 = 3 × 4,115 · digit sum 15 is itself a multiple of 3
The number
Divided by
Quotient
4,115
Remainder
0
Digit sum
15
Rule
Digit sum

12,345 is divisible by 3: the quotient is 4,115 and the remainder is 0.

A whole number is divisible by 3 when the sum of its digits is. The division is exact, so the remainder is 0 whichever convention you use.

Divisibility solution steps
  1. Divide 12,345 by 3 and truncate the quotient toward zero: 4,115.
  2. Subtract divisor times quotient from the number: 12,345 - (3 × 4,115) = 0.
  3. The remainder is 0, so the number is divisible by the divisor.

Every rule from 2 to 12

The digit rules use the number's absolute value; its sign does not change divisibility. The quotients and remainders use the signed number you entered.

  • 12,345 by 2last digit 5 is odd
    no, remainder 1
  • 12,345 by 3digit sum 15 is itself a multiple of 3
    yes, 4,115 exactly
  • 12,345 by 4last two digits 45 leave 1 over 4
    no, remainder 1
  • 12,345 by 5last digit is 5
    yes, 2,469 exactly
  • 12,345 by 6it fails the 2 rule and passes the 3 rule
    no, remainder 3
  • 12,345 by 7three-digit groups alternate to 333, which leaves 4 over 7
    no, remainder 4
  • 12,345 by 8last three digits 345 leave 1 over 8
    no, remainder 1
  • 12,345 by 9digit sum 15 leaves 6 over 9
    no, remainder 6
  • 12,345 by 10last digit 5 is not 0
    no, remainder 5
  • 12,345 by 11alternating digit sum 3 leaves 3 over 11
    no, remainder 3
  • 12,345 by 12it passes the 3 rule and fails the 4 rule
    no, remainder 9
Accuracy. Exact integer arithmetic in big integers, so a number a thousand digits long is divided exactly rather than through a float. Beside the quotient and remainder the page prints the digit rule that applies and the intermediate it used, such as the digit sum, so you can check the rule instead of taking it on trust. The remainder convention for negative inputs is stated next to the result. Divisors past 12 are divided rather than ruled: the quotient and the remainder are exact, there is simply no short digit rule in this set to show beside them.

Common questions

How do I know if a number is divisible by 3?
Add the digits. If the sum is a multiple of 3, so is the number; the same rule works for 9. For 12,345, the digit sum is 15, so 12,345 = 3 × 4,115 exactly. That sum leaves 6 over 9, and 12,345 = 9 × 1,371 + 6. The digit sum carries the same remainder as the absolute value of the number for these divisors.
What are the divisibility rules for 2, 5 and 10?
Look at the last digit: an even digit passes the rule for 2, a 0 or 5 passes the rule for 5, and a 0 passes the rule for 10. The rows for all three divisors update together for your number. For 12,345, the last digit is 5, so it passes 5 with a quotient of 2,469 and fails 2 and 10.
What is the divisibility rule for 7?
Split the absolute value into three-digit groups from the right and alternately add and subtract them. This works because 1,001 = 7 × 11 × 13, so 1,000 is congruent to -1 modulo 7. For 12,345, the group sum is 345 - 12 = 333, which leaves 4 over 7. The division agrees: 12,345 = 7 × 1,763 + 4.
What is the divisibility rule for 11?
Take the digits of the absolute value from the right and alternately add and subtract them. For 12,345, that is 5 - 4 + 3 - 2 + 1 = 3, so the number is not divisible by 11: 12,345 = 11 × 1,122 + 3. The rule works because 10 is congruent to -1 modulo 11. An even-length string of ones, such as 1,111, has alternating sum 0 and is divisible by 11.
Why do the rules for 4 and 8 only look at the last digits?
Because 100 is a multiple of 4 and 1,000 is a multiple of 8. Only the last two digits affect the remainder over 4, and only the last three affect the remainder over 8. For 12,345, the page uses 45 for the rule for 4 and 345 for the rule for 8; both leave a remainder of 1.
Does it show a solution with steps?
Open Divisibility solution steps to see three steps for your inputs: take the integer quotient toward zero, subtract divisor times quotient from the number, and check whether the remainder is 0. The digit-rule rows show their intermediate values. These are remainder-proof steps; the page does not draw handwritten long-division columns.
How large a number can I test?
Each input can have up to 1,000 significant digits; a sign, supported separators and leading zeros do not count toward that limit. Big-integer division keeps the quotient and remainder exact. For example, a 1 followed by 999 zeros divided by 8 gives 125 followed by 996 zeros. Longer inputs get an error instead of being truncated. Decimal points and exponent notation are not accepted. Commas, spaces, underscores and apostrophes are read as separators, not decimal marks.
How are negative numbers handled?
The quotient is truncated toward zero, so a nonzero remainder takes the sign of the number: -12,345 = 7 × -1,763 - 4. The page also gives the least nonnegative remainder, which is 3 in that example. Digit rules use the absolute value, so their intermediate remainders can differ from the signed division remainder. Use Flip the sign or Flip divisor sign to enter negatives with a numeric keyboard.
Does it find all the factors of a number?
It checks the divisor you enter and the divisors 2 to 12. It does not search for every factor or perform arbitrary large-number factorization. For a divisor whose absolute value exceeds 12, it shows the exact quotient and remainder without a short digit rule.
Can it prove divisibility by induction?
No. This calculator checks a specific integer and divisor. It does not accept formulas with a variable, construct an induction base case, or prove a statement for all integers.
Is the calculator free to use online?
Yes. The divisibility check, solution steps and rules table are free to use in your browser without an account or an installation.
What happens to the numbers I enter?
The arithmetic runs in your browser and the calculator does not upload your inputs. After you edit a field, it saves the number and divisor in this browser’s storage. If storage is blocked, the calculation still works. Back to the example restores 12,345 divided by 3.

Exact integer arithmetic in big integers, so a number a thousand digits long is divided exactly rather than through a float. Beside the quotient and remainder the page prints the digit rule that applies and the intermediate it used, such as the digit sum, so you can check the rule instead of taking it on trust. The remainder convention for negative inputs is stated next to the result.