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
The number being divided
The number you divide by
A list of divisors separated by commas
Examples
157 ÷ 13 =
12 R 1
Check: 12 × 13 + 1 = 157
- Quotient
- 12
- Remainder
- 1
- Decimal quotient
- 12.(076923)
- Repeating block of 6 digits in brackets
- Mixed number
- 12 1/13
Long division, digit by digit
- 15 ÷ 13 = 1; 1 × 13 = 13; 15 − 13 = 2
- 27 ÷ 13 = 2; 2 × 13 = 26; 27 − 26 = 1
- 10 ÷ 13 = 0; 0 × 13 = 0; 10 − 0 = 10
- 100 ÷ 13 = 7; 7 × 13 = 91; 100 − 91 = 9
- 90 ÷ 13 = 6; 6 × 13 = 78; 90 − 78 = 12
- 120 ÷ 13 = 9; 9 × 13 = 117; 120 − 117 = 3
- 30 ÷ 13 = 2; 2 × 13 = 26; 30 − 26 = 4
- 40 ÷ 13 = 3; 3 × 13 = 39; 40 − 39 = 1
| Divisor | Quotient | Remainder | Divisible? |
|---|---|---|---|
| 2 | 78 | 1 | No |
| 3 | 52 | 1 | No |
| 5 | 31 | 2 | No |
| 7 | 22 | 3 | No |
| 11 | 14 | 3 | No |
| 13 | 12 | 1 | No |
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:
- Start with 98. 24 fits 4 times; 4 × 24 = 96; 98 − 96 = 2.
- Bring down the next digit to make 27. 24 fits 1 time; 1 × 24 = 24; 27 − 24 = 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:
| Division | Decimal | Repeating digits |
|---|---|---|
| 1 ÷ 3 | 0.(3) | 1 |
| 1 ÷ 4 | 0.25 | none, it terminates |
| 1 ÷ 6 | 0.1(6) | 1 |
| 1 ÷ 7 | 0.(142857) | 6 |
| 1 ÷ 8 | 0.125 | none, it terminates |
| 3 ÷ 11 | 0.(27) | 2 |
| 1 ÷ 12 | 0.08(3) | 1 |
| 157 ÷ 13 | 12.(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)
Related calculators
- Modulo CalculatorFind a mod b with the quotient, the working and an exact remainder under the truncated (C, Java, JavaScript), floored (Python, Excel) and Euclidean conventions, for negative numbers, decimals and integers up to 60 digits.
- Fraction to Decimal ConverterConvert a fraction or mixed number to its exact decimal, with the repeating block, cycle length and long division shown. Convert terminating or repeating decimals back to fractions in lowest terms.
- Basic CalculatorA desk-style four-function calculator with percent, sign, CE and AC, four memory keys, keyboard input and a running tape, plus a check of how your entry would come out with order of operations.
- GCD & LCM CalculatorFind the GCD and LCM of 2 to 10 whole numbers with the Euclidean algorithm steps, prime factorizations, a factor Venn diagram, the reduced fraction and Bézout coefficients. Exact for numbers up to 40 digits.
- Polynomial Long Division CalculatorDivide any polynomial by any divisor, including quadratic and non-monic divisors, with long division shown column by column. Get the quotient, remainder, a factor check and a graph.