Remainder
calculator.
Divide two numbers and see the remainder, the long division and the decimal.
Long division
Round 2 of 2: 13 fits 2 times into 27, because 2 × 13 = 26. 27 − 26 = 1, the remainder.
13 fits 12 times into 157 and leaves 1. In groups of 13 that is 12 full groups; holding everything takes 13, and 12 more would fill the last one. The decimal repeats every 6 digits.
Long division
Round 2 of 2: 13 fits 2 times into 27, because 2 × 13 = 26. 27 − 26 = 1, the remainder.
Working
- 1How many times does 13 fit in 15?1 × 13 = 13; 15 − 13 = 2; bring down 7
- 2How many times does 13 fit in 27?2 × 13 = 26; 27 − 26 = 1
- 3Check: quotient × divisor + remainder gives the number you started with12 × 13 + 1 = 156 + 1 = 157, which matches; 1 is smaller than 13
- 4Answer157 ÷ 13 = 12 R 1
Share it into groups
157 cut into 12 groups of 13, with 1 left over.
Test other divisors of 157
Each divisor
| Divisor | Quotient | Remainder | Exact? |
|---|---|---|---|
| 2 | 78 | 1 | No |
| 3 | 52 | 1 | No |
| 5 | 31 | 2 | No |
| 7 | 22 | 3 | No |
| 11 | 14 | 3 | No |
| 13 | 12 | 1 | No |
Work backward
Know the quotient and the remainder? Find the number that was divided.
5 × 7 + 3 = 38. Check: 38 ÷ 7 = 5 R 3.
How it’s worked out
Dividing a by b asks how many whole b’s fit in a, and what is left. The whole number of times is the quotient q, and what is left is the remainder r:
For positive numbers there is only one pair that works. For 157 ÷ 13, q = 12 and r = 1, since 156 + 1 = 157.
Long division repeats four moves: divide, multiply, subtract, bring down. Here is 9,876 ÷ 24. The first digit, 9, is smaller than 24, so the work starts with 98.
- Start with 98. 24 fits 4 times, and 4 × 24 = 96. Subtract to get 2.
- Bring down the next digit to make 27. 24 fits 1 time, and 1 × 24 = 24. Subtract to get 3.
- Bring down the next digit to make 36. 24 fits 1 time, and 1 × 24 = 24. Subtract to get 12.
The digits read 411 and the last subtraction leaves 12. Every subtraction must leave less than the divisor. If it does not, that digit of the quotient was too small.
Decimals keep going. Put a point after the dividend and bring down zeros. Each remainder is smaller than the divisor, so only so many can occur. When one comes back, the digits repeat. A bar marks the repeating digits on the tool, and Copy result writes them in brackets:
| Division | Decimal | Digits that repeat |
|---|---|---|
| 1 ÷ 3 | 0.(3) | 1 |
| 1 ÷ 6 | 0.1(6) | 1 |
| 1 ÷ 7 | 0.(142857) | 6 |
| 1 ÷ 8 | 0.125 | none, it ends |
| 3 ÷ 11 | 0.(27) | 2 |
| 1 ÷ 12 | 0.08(3) | 1 |
A division in lowest terms ends only when the bottom number has no prime factors other than 2 and 5. That is why dividing by 8 ends and dividing by 3 never does.
A decimal divisor is cleared first. Move the point the same number of places in both numbers, which leaves the answer unchanged. 7.5 ÷ 0.4 becomes 75 ÷ 4.
Worked examples
Booking buses for a school trip
Mr. Okafor has 157 people going on a trip, and each bus seats 13. The answer is 12 R 1, so 12 buses fill up and 1 person is left at the curb. He has to book 13 buses. The last one has room for 12 more.
This is the question a remainder is good for. A plain calculator shows 12.0769, which tells him neither how many buses to book nor how many seats are spare.
Cutting ribbon into equal lengths
Ana has 7.5 m of ribbon and wants lengths of 0.4 m. Multiplying both by 10 makes it 75 ÷ 4, which gives 18 lengths. The leftover in the scaled sum is 3, but that is 3 tenths of a meter, so she has 0.3 m left. The check in her own numbers: 18 × 0.4 = 7.2, and 7.2 + 0.3 = 7.5.
Why 1 ÷ 7 never ends
Maya carries 1 ÷ 7 past the point for a homework question. The whole-number answer is 0 R 1, and the decimal is 0.(142857). After 6 digits the remainder is 1 again, so the same 6 digits come back forever. Set the decimal places to 10 under the layout and watch the remainders cycle.
Reading your result
The big answer reads quotient R remainder. The line under it writes the same thing as a = q × b + r, so you can check it with any calculator.
The tiles give the decimal and, for whole numbers with a remainder, the mixed number. For 157 ÷ 13 that is 12 113. The groups tiles answer sharing questions: how many groups hold everything, and how many more would fill the last.
A remainder of 0 means the divisor goes in exactly. Test a whole list at once under Test other divisors. For 360 and the divisors 2 to 12, everything divides evenly except 7 and 11, which helps explain why 360 is a handy number of degrees for a full turn.
Negative numbers have two common answers. Rounding the quotient toward zero, as C, Java and JavaScript do, gives −17 ÷ 5 = −3 R −2. Rounding it down, as Python and spreadsheets do, gives −4 R 3. Both pass the check, and the modulo calculator compares them language by language.
Working backward uses the same line. A quotient of 5 and a remainder of 3 with a divisor of 7 come from 5 × 7 + 3 = 38. The remainder has to be smaller than the divisor, or another whole group would fit.
Common mistakes
- Writing the remainder as a decimal. 17 ÷ 5 is 3 R 2, but it is not 3.2. The remainder is 2 out of 5, so the decimal is 3.4.
- Dropping a zero inside the quotient. 412 ÷ 4 is 103, not 13. When the divisor does not fit after you bring down a digit, write a 0 and bring down the next one.
- Stopping with a remainder bigger than the divisor. If you have 15 left when dividing by 13, one more 13 fits. The digit above is too small.
- Rounding people or buses the normal way. A little over 12 buses rounds to 12, which leaves someone behind. Round up when everything has to fit, and down when only full groups count.
- Moving the point in one number only. 7.5 ÷ 0.4 is the same as 75 ÷ 4, not 7.5 ÷ 4. The point moves the same number of places in both.
Questions people ask
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)