Remainder Calculator

Long division with steps

Divide any two numbers and get the quotient and remainder, the full digit-by-digit long division layout, the exact decimal with its repeating block, a mixed number, and a divisibility check against a list of divisors.

Basic ArithmeticUpdated October 21, 2026Checked against 7 reference values

Quotient and remainder: the division algorithm

Dividing a whole number a by a whole number b gives a whole-number quotient q and a remainder r that is smaller than the divisor:

a = b × q + r, with 0 ≤ r < b

For any positive a and b there is exactly one such pair, which is why the result is well defined. 157 ÷ 13 is 12 remainder 1, because 13 × 12 = 156 and one is left over. The calculator gives the quotient, the remainder and a check line, then continues the division past the decimal point, writes the result as a mixed number (12 1/13) and as a decimal, and lays out the full long division the way it is written by hand.

Long division step by step

Long division repeats four moves for each digit of the dividend: divide (how many times does the divisor fit?), multiply, subtract, and bring down the next digit. Here is 9,876 ÷ 24 as the calculator works it:

  1. Start with 98. 24 fits 4 times; 4 × 24 = 96; 98 − 96 = 2.
  2. Bring down the next digit to make 27. 24 fits 1 time; 1 × 24 = 24; 27 − 24 = 3.
  3. Bring down the next digit to make 36. 24 fits 1 time; 1 × 24 = 24; 36 − 24 = 12.

The quotient digits read 411, and the last subtraction leaves the remainder 12. Check: 24 × 411 + 12 = 9,876. The first digit, 9, is smaller than 24, so the work starts with 98; a leading zero in the quotient is never written. Every subtraction must leave less than the divisor; if it does not, the quotient digit was too small.

Carrying on past the decimal point

To turn the remainder into decimals, put a decimal point after the dividend and keep bringing down zeros. Because each remainder is smaller than the divisor, there are only so many possible remainders; as soon as one repeats, the digits repeat too. A fraction in lowest terms terminates exactly when its denominator has no prime factors other than 2 and 5. The calculator finds the repeating block, shown in brackets:

DivisionDecimalRepeating digits
1 ÷ 30.(3)1
1 ÷ 40.25none, it terminates
1 ÷ 60.1(6)1
1 ÷ 70.(142857)6
1 ÷ 80.125none, it terminates
3 ÷ 110.(27)2
1 ÷ 120.08(3)1
157 ÷ 1312.(076923)6

The repeating block can never be longer than the divisor minus one, which is why 1 ÷ 7 repeats after six digits. Choose how many decimal places to include in the written layout with the long division setting.

Decimal divisors and negative numbers

Long division needs a whole-number divisor, so a decimal divisor is cleared first by moving the decimal point in both numbers the same number of places. 7.5 ÷ 0.4 becomes 75 ÷ 4, which gives the same quotient, 18.75. The whole-number quotient is 18 and the remainder is 0.3, in the original units: 7.5 = 18 × 0.4 + 0.3.

With negative numbers the division is worked on the sizes and the sign applied afterward. The calculator's main answer rounds the quotient toward zero, as C, Java and JavaScript do: −17 ÷ 5 = −3 R −2. Python and spreadsheets round down instead, giving −4 R 3, and that version is shown too. The modulo calculator compares all the sign conventions in detail.

Checking divisibility against several numbers

A remainder of zero means the divisor goes in exactly. The divisibility list divides your dividend by each number you enter. For 360 and the divisors 2 to 12, everything divides evenly except 7 and 11, which is part of why 360 was a convenient number of degrees for a full turn.

Quick mental checks give the same answers for small divisors: a number is divisible by 3 or 9 when its digit sum is, by 4 when its last two digits are, by 5 when it ends in 0 or 5, and by 11 when the alternating sum of its digits is a multiple of 11.

Remainder Calculator: common questions

How do you find the remainder of a division?

Find the largest whole number of times the divisor fits into the dividend, multiply, and subtract: what is left is the remainder. For 157 ÷ 13, 13 fits 12 times (156), so the remainder is 1. The remainder is always smaller than the divisor.

What are the steps of long division?

Divide, multiply, subtract and bring down, repeated once for each digit of the dividend. The calculator writes out every round and draws the finished layout with the quotient above the bar and each subtraction underneath.

How do I turn a remainder into a decimal?

Keep dividing past the decimal point by bringing down zeros, or divide the remainder by the divisor. A remainder of 1 when dividing by 13 adds 1/13 = 0.076923 repeating, so 157 ÷ 13 = 12.076923 repeating.

Why do some divisions repeat forever?

Each step leaves a remainder smaller than the divisor, so a remainder must eventually come back, and from then on the digits repeat. The decimal stops only when the remainder reaches zero, which happens when the reduced denominator has no prime factors other than 2 and 5.

How do you do long division with a decimal divisor?

Move the decimal point in the divisor to the right until it is a whole number, and move it the same number of places in the dividend. 7.5 ÷ 0.4 becomes 75 ÷ 4, which has the same answer, 18.75.

What is the remainder when dividing a negative number?

It depends on the rounding rule. Rounding the quotient toward zero gives −17 ÷ 5 = −3 remainder −2, as in C or JavaScript; rounding down gives −4 remainder 3, as in Python. The calculator shows both.

Sources

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 6th edition (Oxford University Press, 2008), section 9.6 (decimals and their periods)
  • Donald E. Knuth, The Art of Computer Programming, Volume 2: Seminumerical Algorithms, 3rd edition (Addison-Wesley, 1997), section 4.3.1 (classical division algorithm)
  • ISO/IEC 9899:2011, Programming languages: C, section 6.5.5 (integer division truncates toward zero)