Quick Answer: 17 divided by 5 is 3 R 2: 5 goes into 17 three times, with 2 left over. As an exact decimal it is 3.4, and as a mixed number 3 2/5.
What does this calculator do?
This division calculator gives the answer to a division three ways: as a whole-number quotient with a remainder, as an exact decimal, and as a mixed number.
It also works as a modulo calculator, since the remainder is what "a mod b" means, and it shows a check line, divisor times quotient plus remainder, so you can see the answer is right.
When both numbers are positive there is only one quotient and remainder. When one of them is negative, there are three conventions in common use, and different programming languages and spreadsheets pick different ones. The calculator shows all three and lets you choose which one is the headline:
- Euclidean: the remainder is never negative. This is the mathematical definition.
- Truncated: the quotient is rounded toward zero, so the remainder takes the sign of the dividend. This is what the % operator does in C, Java and JavaScript.
- Floored: the quotient is rounded down, so the remainder takes the sign of the divisor. This is Python's % and the MOD function in spreadsheets.
Using the Division Calculator
- Enter the dividend, the number being divided.
- Enter the divisor, the number you divide by. It cannot be zero.
- Choose the remainder rule if either number is negative. For positive numbers the choice makes no difference.
- Read the quotient and remainder at the top, written as "3 R 2". The cards show the check, the exact decimal, the mixed number and the result under each rule.
How is this calculated?
- Divide exactly. The dividend is divided by the divisor in exact decimal arithmetic.
- Round the quotient to a whole number by the rule. Truncated rounds toward zero, floored rounds down toward minus infinity, and Euclidean rounds down when the divisor is positive and up when it is negative, which is what keeps the remainder at zero or above.
- Remainder. Whatever is left: the dividend minus the divisor times the quotient. So every rule satisfies the same identity.
a = b × q + r
0 ≤ r < |b| (Euclidean); r = a − b⌊a/b⌋ (floored)
- Exact decimal quotient. The two numbers are turned into an exact fraction and divided by long division. If a remainder in the long division repeats, the digits repeat from there, and that block is shown in brackets: 1,000 ÷ 7 is 142.(857142).
- Mixed number. The same exact fraction is written as a whole part and a proper fraction in lowest terms.
Worked Example
Using the defaults, 17 ÷ 5:
- 17 ÷ 5 = 3.4 exactly.
- The whole number of fives in 17 is 3 (3 × 5 = 15).
- The remainder is 17 - 15 = 2.
- Check: 5 × 3 + 2 = 17.
- Exact decimal: 3.4. Mixed number: 3 2/5, since the remainder 2 over the divisor 5 is the fractional part.
A longer one, from the 1,000 ÷ 7 preset: the quotient is 142 with remainder 6. The exact decimal is 142.(857142), the six digits 857142 repeating forever, and the mixed number is 142 6/7.
How Do You Divide with a Remainder?
Find the largest whole number of times the divisor fits into the dividend, then subtract to find what is left. For 50 ÷ 24, 24 fits 2 times (48), leaving 2. That is also how clock arithmetic works: 50 hours after midnight is 2 a.m. two days later, because 50 mod 24 is 2.
The remainder is always smaller than the divisor; if it is not, the quotient is too small.
What Is the Remainder for Negative Numbers?
It depends on the rule. For -17 ÷ 5:
- Euclidean: -4 R 3, because 5 × -4 + 3 = -17 and 3 is not negative.
- Truncated: -3 R -2, because the quotient -3.4 is cut toward zero to -3.
- Floored: -4 R 3, because -3.4 rounds down to -4.
The reference table shows all four sign combinations of 17 and 5. Notice that Euclidean and floored agree whenever the divisor is positive, and that truncated and floored agree whenever both numbers have the same sign. If code you are writing gives a negative remainder you did not expect, the language is using the truncated rule.
What Does Modulo Mean?
"a mod b" is the remainder when a is divided by b. Modulo is used to wrap numbers around a cycle: hours on a clock, days of the week, positions in a circular list, or checking whether a number is even (n mod 2 is 0).
Modulo is not limited to whole numbers: the 7.5 mod 2 preset gives 3 R 1.5, since 2 fits three times into 7.5 with 1.5 left over.
What does this calculator not account for?
- Division by zero. It has no answer, and the calculator says so.
- Very large whole numbers. The inputs are ordinary number boxes, which hold about 15 significant digits. For larger numbers, the quotient and remainder may not reflect the digits you typed.
- Long division layout. The calculator gives the results of long division, not the written steps digit by digit.
- The IEEE remainder. The IEEE 754 remainder function rounds the quotient to the nearest integer (ties to even), giving yet another remainder for some inputs. It is not one of the three rules here.
What mistakes do people make with this?
- Writing the remainder as a decimal. 17 ÷ 5 is 3 R 2, or 3.4, but not "3.2". The remainder 2 is two fifths, which is 0.4.
- A remainder larger than the divisor. That means the quotient can go up by one more.
- Assuming every language computes % the same way. -17 % 5 is -2 in JavaScript and 3 in Python.
- Using the remainder as the fractional part with the wrong denominator. The fractional part is the remainder over the divisor, not over the dividend.
- Rounding the decimal quotient when you need the remainder. 1,000 ÷ 7 rounded to two decimal places hides the fact that the exact remainder is 6.
Frequently Asked Questions
What is 17 divided by 5 with a remainder?
How do I turn a remainder into a decimal?
How do I find the quotient?
What is the difference between remainder and modulus?
Can the remainder be zero?
Why does 1,000 ÷ 7 repeat?
Sources
- NIST Digital Library of Mathematical Functions, section 27.1: notation for divisibility and greatest common divisors. dlmf.nist.gov/27.1
- NIST Dictionary of Algorithms and Data Structures, Euclid's algorithm: repeated division with remainder. xlinux.nist.gov/dads/HTML/euclidalgo.html
- IEEE 754-2019, Standard for Floating-Point Arithmetic: defines the remainder operation with the quotient rounded to nearest. standards.ieee.org/ieee/754/6210

