Toolvito

Works on this device

Division & Remainder Calculator

Divide two numbers and see the whole-number quotient, the remainder, the decimal result and a check. The same page works out modulo problems, modular inverses and powers, systems of remainders, and division of polynomials.

Enter your values

Divides one number by another and gives the whole-number quotient, the remainder, the decimal result and a check.

Your values

A whole number of any length, a decimal such as 7.5 or a fraction such as 22/7. It can be negative.

It cannot be 0.

More options

This only matters when the dividend or the divisor is negative.

Leave 10 for ordinary numbers. In another base, such as 2, 5 or 16, type whole numbers in that base.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

How to use this calculator

  1. Choose what you want to do, for example Divide and find the quotient and remainder.
  2. Enter the dividend (the number you divide) and the divisor (the number you divide by). Whole numbers can have up to 1,000 digits. Decimals and fractions also work.
  3. Choose Calculate. You get the quotient, the remainder, the result as a fraction and as a decimal, and a table of the long division.
  4. For negative numbers, open More options to choose which rule the remainder follows.

The rules behind the results

  • Division with remainder: dividend = divisor × quotient + remainder. The quotient is a whole number, and the remainder is smaller in size than the divisor.
  • Modulo: a mod n is the remainder of a divided by n. Two numbers are congruent modulo n, written a ≡ b (mod n), when a − b is a multiple of n.
  • Negative numbers have three rules in use. Cut towards zero: −7 ÷ 2 = −3 remainder −1. Rounded down: −7 ÷ 2 = −4 remainder 1. Never negative (Euclidean): the same here, −4 remainder 1.
  • Inverse modulo n: the number x with a × x ≡ 1 (mod n). It exists only when a and n share no factor.
  • Remainder theorem: when a polynomial p(x) is divided by x − c, the remainder is p(c). If p(c) = 0, then x − c is a factor.
  • Chinese remainder theorem: for moduli that share no factors, there is one number below their product that leaves each given remainder.

Worked examples

Division. 47 ÷ 5 = 9 remainder 2, because 5 × 9 + 2 = 47. As a decimal it is 9.4, and as a mixed number 9 2/5.

Modulo with a negative number. −7 mod 3 is 2 under the two rules where the remainder follows the divisor, and −1 where it follows the dividend.

A large power. 7^222 mod 13 = 12. The power itself has 188 digits, but only 8 squaring steps are needed.

Chinese remainder theorem. The number that leaves 2, 3 and 2 when divided by 3, 5 and 7 is 23, and then every 105 after it.

Polynomials. (x^3 − 2x^2 + 4) ÷ (x − 3) = x^2 + x + 3 remainder 13. The remainder theorem agrees: 3^3 − 2 × 3^2 + 4 = 13.

Limits you should know

  • Whole numbers can have up to 1,000 digits. Decimals and fractions can have up to 60 typed characters.
  • A repeating decimal is shown with brackets when its repeating part has at most 200 digits. Longer ones are only rounded.
  • Another number base (2 to 36) works for whole numbers only.
  • The modular modes need a modulus of 2 or more. The system of remainders takes 2 to 20 lines with numbers up to 300 digits.
  • Polynomials use one letter, whole-number powers up to 200 and number coefficients. Division by a polynomial in two letters is not covered.
  • To find an unknown coefficient, k may appear only to the first power.

Related tools