BedrockCalculator
Figures cited to primary sourcesWritten by Aapt Dubey, MBA (Marketing & Banking), ISB 3 primary sourcesLast updated

Division Calculator with Remainder (Quotient, Remainder and Modulo)

Divide two numbers to get the quotient and remainder, the exact decimal with repeating digits and the mixed number, with all three remainder rules.

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.

Assumptions

Computed

Preset scenarios

Quotient and remainder
3 R 2
Quotient
3
Remainder (modulo)
2
Check
5 × 3 + 2 = 17
Exact decimal quotient
3.4
As a mixed number
3 2/5
Euclidean rule
3 R 2
Truncated rule
3 R 2
Floored rule
3 R 2

Remainders under the three rules

Download CSV
Each row is this calculator run on the dividend and divisor shown. Every entry is quotient R remainder, and in every case divisor × quotient + remainder = dividend.
DividendDivisorEuclideanTruncatedFloored
1753 R 23 R 23 R 2
-175-4 R 3-3 R -2-4 R 3
17-5-3 R 2-3 R 2-4 R -3
-17-54 R 33 R -23 R -2
2045 R 05 R 05 R 0
370 R 30 R 30 R 3
-37-1 R 40 R -3-1 R 4
100911 R 111 R 111 R 1

This table and its CSV are free to reuse with a link to this page, CC BY 4.0.

Division Calculator with Remainder (Quotient, Remainder and Modulo): Quotient and remainder 3 R 2 (Dividend (number being divided): 17; Divisor (number you divide by): 5; Remainder rule for negative numbers: Euclidean: remainder never negative).

Save or share this result

A one-page summary of this calculator's default example, drawn from the same calculation as the result above.

The infographic is free to reuse with a link to this page, CC BY 4.0.

Illustration of red apples shared among woven baskets on a wooden table, with one apple left over
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

  1. Enter the dividend, the number being divided.
  2. Enter the divisor, the number you divide by. It cannot be zero.
  3. Choose the remainder rule if either number is negative. For positive numbers the choice makes no difference.
  4. 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?

  1. Divide exactly. The dividend is divided by the divisor in exact decimal arithmetic.
  1. 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.
  1. 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)

  1. 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).
  1. 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:

  1. 17 ÷ 5 = 3.4 exactly.
  2. The whole number of fives in 17 is 3 (3 × 5 = 15).
  3. The remainder is 17 - 15 = 2.
  4. Check: 5 × 3 + 2 = 17.
  5. 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?

3 remainder 2, written 3 R 2.

How do I turn a remainder into a decimal?

Divide the remainder by the divisor and add it to the quotient. For 17 ÷ 5 that is 3 + 2/5 = 3.4, which is the exact decimal card.

How do I find the quotient?

The quotient is the whole-number part of the division: the number of times the divisor fits into the dividend. For 1,000 ÷ 7 it is 142.

What is the difference between remainder and modulus?

For positive numbers, nothing. For negative numbers, "remainder" often means the truncated rule and "modulus" the floored or Euclidean rule, but usage varies, which is why the calculator shows all three.

Can the remainder be zero?

Yes. A remainder of zero means the divisor divides the dividend exactly, as with 20 ÷ 4, which is 5 R 0.

Why does 1,000 ÷ 7 repeat?

Because 7 is not a factor of any power of ten, the long division never ends; after six digits the remainders start to cycle, so the digits do too.

Sources

Did this calculator answer your question?

How this calculator is tested

This calculator is checked by 7 automated test cases: specific inputs whose correct result is known in advance, and rules the output must always obey. They run on every change to the site. See the testing and corrections policy.

Show the test cases
  • Default: 17 / 5 is 3 R 2, 3.4, 3 2/5
  • 1,000 / 7 is 142 R 6 with a six-digit repeating block
  • negative dividend: the three rules
  • negative divisor: Euclidean keeps r >= 0, floored takes the divisor sign
  • modulo on decimals and on a clock
  • exact divisions and division by zero
  • builds the reference table, and every row satisfies a = bq + r

Add This Website as Preferred Source on Google

See Bedrock Calculator first in your Search results & AI Overviews