Remainder Calculator
Divide any two numbers and instantly find the remainder, quotient, and the leftover expressed as a fraction. Choose between three modulo conventions (truncated, floored, or Euclidean) to match the behaviour of your programming language or mathematical context.
Formula
Worked example
Divide 17 by 5 (truncated): 5 goes into 17 three whole times (3 x 5 = 15), leaving 17 - 15 = 2. Quotient = 3, Remainder = 2, written 17 = 3 x 5 + 2, or in R-notation: 3 R 2, or as a mixed number: 3 2/5.
What the remainder means and how to read the result
When you divide one whole number (the dividend) by another (the divisor), the quotient is how many whole times the divisor fits, and the remainder is the amount left over that is too small to fill another full group. The remainder is always smaller in absolute value than the divisor. A remainder of zero means the divisor divides the dividend exactly and is therefore a factor of it. This calculator shows the result in three equivalent forms: R-notation (3 R 2), mixed-number fraction (3 2/5), and the full division identity (17 = 3 x 5 + 2), so you can copy whichever format your textbook or programming language expects.
Three modulo conventions and when they matter
For positive numbers all three conventions give the same answer, so you only need to care when working with negative dividends or divisors. The truncated convention rounds the quotient toward zero and is used in C, Java, JavaScript, and most languages integer division. The floored convention rounds the quotient toward negative infinity and is used by Python's % operator and Ruby, giving a remainder that always matches the sign of the divisor. The Euclidean convention guarantees the remainder is always non-negative (between 0 and |divisor| - 1) and is the version used in formal mathematics and cryptography. Example: -7 divided by 3 gives remainder -1 (truncated), remainder 2 (floored), or remainder 2 (Euclidean). The difference between floored and Euclidean shows up when the divisor is negative: -7 / -3 gives remainder -1 (floored) or remainder 2 (Euclidean).
Writing a remainder as a fraction and in R-notation
Two standard ways to write a remainder are the R-notation and the mixed-number fraction. In R-notation you write the quotient, then "R", then the remainder: for 346 / 7 that is 49 R 3. In fraction form you express the leftover as a fraction whose numerator is the remainder and whose denominator is the divisor, giving the mixed number 49 3/7. Both mean the same thing: 7 fits into 346 exactly 49 times with 3 left over, and 49 x 7 + 3 = 346. The decimal quotient 49.4286 is a third option that merges the remainder into the decimal places.
Quick divisibility tricks for common divisors
You can often find the remainder without a calculator using simple digit rules. For any number divided by 10, the remainder is simply the last digit (346 / 10 has remainder 6). For division by 9, add all the digits together, repeat until you have one digit, and that single digit is the remainder (346: 3 + 4 + 6 = 13, 1 + 3 = 4, so 346 / 9 has remainder 4). For division by 2, check whether the number is even (remainder 0) or odd (remainder 1). For division by 5, the remainder is 0 if the last digit is 0 or 5, otherwise 1 to 4 based on the last digit. These shortcuts let you verify calculator results by hand.
Modular arithmetic and real-world applications
The remainder operation is the foundation of modular arithmetic, a branch of mathematics that treats numbers as cycling around a fixed modulus. Clock arithmetic is the most familiar example: 11 hours after 3 o'clock is (3 + 11) mod 12 = 2, not 14. The same idea appears in computing day-of-week from a date, generating hash table indices, checking credit card digits using the Luhn algorithm, and in public-key cryptography (RSA uses modular exponentiation). In programming, the modulo operator % is used constantly for tasks like alternating row colors (row % 2), wrapping array indices, and generating pseudo-random numbers. Understanding which modulo convention your language uses prevents hard-to-find bugs when negative numbers are involved.
Quick divisibility shortcuts
| Divisor | Remainder is zero when... | Example |
|---|---|---|
| 2 | The last digit is 0, 2, 4, 6, or 8 (even number) | 48 / 2 remainder 0 |
| 3 | The sum of all digits is divisible by 3 | 123: 1+2+3 = 6, remainder 0 |
| 4 | The last two digits form a number divisible by 4 | 312: 12 / 4 = 3, remainder 0 |
| 5 | The last digit is 0 or 5 | 85 / 5 remainder 0 |
| 9 | The sum of all digits is divisible by 9 | 729: 7+2+9 = 18, remainder 0 |
| 10 | The last digit is 0; the remainder equals the last digit otherwise | 346 / 10 remainder 6 |
Mental-math tricks: if the condition is true, the remainder is zero for that divisor.
Frequently asked questions
What is the difference between the quotient and the remainder?
The quotient is how many whole times the divisor fits into the dividend. The remainder is what is left over after subtracting that many copies of the divisor. Together they satisfy the division identity: dividend = quotient x divisor + remainder. For example, 17 / 5 gives quotient 3 and remainder 2, because 3 x 5 + 2 = 17.
Why cannot I divide by zero?
Division by zero is undefined because there is no number of times zero can be added to reach a non-zero dividend. Any quotient multiplied by zero is still zero, so no quotient or remainder can satisfy the division identity when the divisor is zero. Enter any non-zero divisor to get a result.
Can the remainder be larger than the divisor?
No. The remainder is always smaller in absolute value than the divisor. If a leftover were as large as the divisor, you could fit one more whole group into the dividend, which would increase the quotient by one and reduce the leftover accordingly.
What is the difference between remainder and modulo?
For positive numbers, remainder and modulo are the same. They differ when negative numbers are involved. The truncated remainder takes the sign of the dividend (-7 / 3 gives remainder -1). The floored modulo takes the sign of the divisor (-7 / 3 gives remainder 2). The Euclidean modulo is always non-negative. Use the convention selector to pick the one that matches your context.
How do I write a remainder as a fraction?
Express the quotient as the whole-number part, then write the remainder over the divisor as the fractional part. For 17 / 5, quotient 3 and remainder 2, the mixed-number form is 3 2/5. This means "3 whole groups and 2/5 of another group". The R-notation for the same result is 3 R 2.
What is the remainder when dividing by 10?
The remainder when dividing any whole number by 10 is exactly its last digit. For example, 346 / 10 has remainder 6. This is because 10 fits into 346 exactly 34 times (34 x 10 = 340), leaving 6 behind.
How do I find the remainder when dividing by 9?
Add all the digits of the number together, then repeat for the result until you have a single digit (this is called the digital root). That single digit is the remainder when dividing by 9. For example, 599: 5 + 9 + 9 = 23, then 2 + 3 = 5, so the remainder is 5. Verify: 9 x 66 = 594, and 599 - 594 = 5.