ToolNimba

โž— Remainder Calculator: Quotient and Remainder of Division

Shihab Mia By Shihab Mia ยท Updated 2026-07-04

Result
-
Quotient (integer)
-
Remainder
-
Exact quotient
-
Modulo (a % b)
-

Enter a dividend and a divisor to see the quotient and remainder. The remainder takes the sign of the dividend, matching the JavaScript % operator.

This remainder calculator divides one whole number by another and gives you the quotient and the remainder in one step. Enter 17 divided by 5 and you get 3 remainder 2, because 5 goes into 17 three times with 2 left over. It also shows the exact decimal quotient (3.4) and the modulo result, and it handles negative numbers so you can see how the remainder behaves in both directions.

What is the Remainder Calculator?

When you divide two whole numbers that do not divide evenly, you are left with a leftover amount called the remainder. A remainder calculator does this for you: it finds how many whole times the divisor fits into the dividend (the quotient) and how much is left over (the remainder). For 17 divided by 5, the divisor 5 fits into 17 three whole times, using up 15, and the leftover 2 is the remainder. Every division with remainder obeys the same identity: dividend = quotient x divisor + remainder, so 17 = 3 x 5 + 2.

The quotient here is the truncated (integer) quotient, meaning it drops any fractional part rather than rounding. That is different from the exact decimal quotient, which for 17 divided by 5 is 3.4. This remainder calculator shows both so you never confuse the two: the whole-number quotient 3 with remainder 2 is what you use for long division and clock arithmetic, while 3.4 is the true value of the fraction. A handy check is that the fractional part of the exact quotient, 0.4, is exactly the remainder over the divisor, 2 divided by 5.

The remainder is closely related to the modulo operation, often written a mod b or a % b in programming. For positive numbers they are the same thing, but the sign of the result depends on the convention. This remainder calculator truncates the quotient toward zero, so the remainder always carries the sign of the dividend, exactly like the JavaScript, C and Java % operator. That means -17 divided by 5 gives a quotient of -3 and a remainder of -2. Some mathematicians and languages such as Python instead use a floored modulo that keeps the remainder the same sign as the divisor, giving -4 remainder 3 for the same inputs.

Because the two conventions disagree only when the dividend is negative, this remainder calculator shows both a truncated remainder and an always-positive floored remainder whenever you enter a negative dividend. That way you can match whichever definition your textbook, spreadsheet, or programming language uses. For everyday positive division the answer is unambiguous, and the remainder calculator simply gives you the quotient and remainder you would get from long division, only faster and without arithmetic slips.

When to use it

  • Checking a long division answer by confirming the quotient and remainder are correct.
  • Working out how many full groups fit and how many items are left over, such as seating 100 guests at tables of 7.
  • Understanding how the modulo operator behaves for negative numbers before writing code.
  • Finding the day of the week or a clock time using remainder (modular) arithmetic.
  • Teaching or learning the relationship dividend = quotient x divisor + remainder.
  • Splitting a total into equal shares and seeing the leftover that cannot be shared evenly.

How to use the Remainder Calculator

  1. Enter the dividend, the number you want to divide, in the first box.
  2. Enter the divisor, the number you are dividing by, in the second box (it cannot be 0).
  3. Read the headline result in the form "dividend divided by divisor = quotient remainder r".
  4. Check the quotient, remainder, exact decimal quotient, and modulo in the four result panels.
  5. If the dividend is negative, compare the truncated and always-positive remainder in the extra panel, then copy the result if you need it.

Formula & method

quotient = trunc(dividend / divisor) (drop the fractional part, toward zero). remainder = dividend - quotient x divisor. This always satisfies dividend = quotient x divisor + remainder, and the remainder shares the sign of the dividend, matching the % operator. The exact decimal quotient is simply dividend / divisor.
17 divided by 5 = 3 remainder 23 full groups of 5 (the quotient)5552remainder17 = 3 x 5 + 2

Worked examples

Divide 17 by 5 and find the quotient and remainder.

  1. Ask how many whole times 5 fits into 17: it fits 3 times, since 3 x 5 = 15.
  2. Subtract to find the leftover: 17 - 15 = 2, so the remainder is 2.
  3. Check the identity: 3 x 5 + 2 = 17.
  4. The exact decimal quotient is 17 / 5 = 3.4.

Result: 17 divided by 5 = 3 remainder 2

Divide -17 by 5 using the truncated (JS %) convention.

  1. Compute the exact quotient: -17 / 5 = -3.4.
  2. Truncate toward zero (drop the decimals): the quotient is -3, not -4.
  3. Find the remainder: -17 - (-3 x 5) = -17 - (-15) = -2.
  4. Check the identity: -3 x 5 + (-2) = -15 - 2 = -17.
  5. Note: the floored convention would instead give -4 remainder 3.

Result: -17 divided by 5 = -3 remainder -2 (truncated)

Quotient and remainder for common divisions

DivisionQuotientRemainderExact quotient
17 / 5323.4
100 / 714214.2857...
42 / 6707
1 / 3010.3333...
23 / 4535.75
9 / 10090.9

Truncated vs floored remainder for a negative dividend (-17 / 5)

ConventionUsed byQuotientRemainder
Truncated toward zeroJS, C, Java, this tool-3-2
Floored (always-positive)Python, spreadsheets MOD()-43

Common mistakes to avoid

  • Confusing the remainder with the decimal part of the quotient. For 17 divided by 5 the remainder is 2, not 0.4. The decimal 0.4 is the remainder divided by the divisor (2 / 5). The remainder is a whole number left over, while 0.4 is the fractional part of the exact quotient.
  • Rounding the quotient instead of truncating it. The integer quotient drops the fractional part toward zero, it does not round. 17 / 5 = 3.4 gives a quotient of 3, and even 19 / 5 = 3.8 still gives a quotient of 3 with remainder 4, not a rounded 4.
  • Expecting a positive remainder for a negative dividend. With the truncated convention used here, -17 divided by 5 gives a remainder of -2 because the remainder shares the sign of the dividend. If you need an always-positive remainder, use the floored value of 3 shown in the negative-dividend panel.
  • Trying to divide by zero. The divisor can never be 0, because dividing by zero is undefined and has no quotient or remainder. This remainder calculator shows a friendly error and asks for a non-zero divisor.

Glossary

Dividend
The number being divided, the total you are splitting up. In 17 / 5, the dividend is 17.
Divisor
The number you divide by, the size of each group. In 17 / 5, the divisor is 5.
Quotient
How many whole times the divisor fits into the dividend. In 17 / 5, the quotient is 3.
Remainder
The amount left over after taking out all the whole groups. In 17 / 5, the remainder is 2.
Modulo
The remainder operation, written a mod b or a % b in code. For positive numbers it equals the remainder.
Truncation
Dropping the fractional part of a number toward zero, so 3.4 and -3.4 become 3 and -3.

Frequently asked questions

How do you calculate the remainder of a division?

Find how many whole times the divisor fits into the dividend, which is the quotient, then subtract quotient x divisor from the dividend. For 17 divided by 5, the quotient is 3 and 17 - (3 x 5) = 2, so the remainder is 2. In short, remainder = dividend - quotient x divisor.

What is 17 divided by 5 with a remainder?

17 divided by 5 is 3 remainder 2. The divisor 5 fits into 17 three whole times (3 x 5 = 15), and the leftover 17 - 15 = 2 is the remainder. The exact decimal quotient is 3.4.

What is the difference between the remainder and the modulo?

For positive numbers the remainder and the modulo (a % b) are the same. They can differ for negative numbers: the truncated remainder used by this tool takes the sign of the dividend, while a floored modulo, as in Python, keeps the sign of the divisor. So -17 divided by 5 is -2 truncated but 3 floored.

How does the calculator handle negative numbers?

It truncates the quotient toward zero, so the remainder carries the sign of the dividend, matching the JavaScript % operator. For -17 divided by 5 that gives -3 remainder -2. When the dividend is negative it also shows the always-positive floored remainder (3) so you can use whichever convention you need.

Can the remainder ever equal the divisor?

No. The remainder is always smaller in size than the divisor. If it were as large as the divisor, the divisor would fit in one more time and the quotient would increase. A remainder of 0 means the divisor divides the dividend exactly, as in 42 / 6 = 7 remainder 0.

Why can you not divide by zero?

Dividing by zero is undefined because no number multiplied by zero can give a non-zero dividend, so there is no valid quotient or remainder. This remainder calculator blocks a divisor of 0 and shows a friendly error asking for a non-zero divisor.

Sources