01 / Quotient
How many times it fits
The whole number of times the divisor fits into the dividend.
Free tool
Type a dividend and a divisor to get the quotient and the remainder (the modulo). For negative numbers the page shows the two common rules side by side, the truncated one used by JavaScript and the floored one used by Python, plus the Euclidean one, so you can see which answer your code or class expects. It also gives the decimal answer, works with decimals, and writes out the long division. Extras for big whole numbers: a power mod n, and the inverse of a number mod n.
Whole numbers or decimals for a division, up to 60 digits. Power and inverse use whole numbers.
Worked out in your browser. Nothing is sent anywhere.
The maths
01 / Quotient
The whole number of times the divisor fits into the dividend.
02 / Remainder
The dividend minus divisor times quotient. It is the modulo of the two numbers.
03 / Check
Divisor × quotient + remainder always gives the dividend back.
Guide
A remainder calculator divides one whole number by another and tells you the quotient, which is how many times the divisor fits, and the remainder, which is what is left over. The remainder is also called the modulo, and the operation is written a mod b. This page shows the answer under each common rule for negative numbers, writes out the long division, and has extras for modular arithmetic with big numbers.
Divide 17 by 5. The number 5 fits into 17 three times, since 3 × 5 = 15, and 17 − 15 = 2 is left. So the quotient is 3 and the remainder is 2, and you can check it: 5 × 3 + 2 = 17. As a decimal, 17 ÷ 5 = 3.4, and as a mixed number it is 3 2/5, because the remainder 2 sits over the divisor 5. The remainder is always smaller than the divisor.
When one number is negative, there is more than one sensible answer, and programming languages differ. The truncated rule cuts the quotient towards zero, and the remainder takes the sign of the dividend. The floored rule rounds the quotient down, and the remainder takes the sign of the divisor. The Euclidean rule keeps the remainder at 0 or more.
| Division | Truncated | Floored | Euclidean |
|---|---|---|---|
| −17 ÷ 5 | q −3, r −2 | q −4, r 3 | q −4, r 3 |
| 17 ÷ −5 | q −3, r 2 | q −4, r −3 | q −3, r 2 |
| −17 ÷ −5 | q 3, r −2 | q 3, r −2 | q 4, r 3 |
Each row still obeys the check. Take −17 ÷ 5 under the truncated rule: 5 × (−3) + (−2) = −17. Under the floored rule: 5 × (−4) + 3 = −17.
Which one do you need? JavaScript's % follows the truncated rule: MDN says the result takes the sign of the dividend, so -13 % 5 is −3 there. Python's % follows the floored rule: its reference says the result has the same sign as the second operand. Excel's MOD also takes the sign of the divisor, as Microsoft's MOD page shows. All three pages were checked on 18 Oct 2026. For a clock or an array index that wraps round, you usually want a result of 0 or more, which the floored and Euclidean rules give when the divisor is positive.
The calculator also works with decimals. 7.5 mod 2 is 1.5, because 2 fits into 7.5 three times (6) and 1.5 is left. The quotient stays a whole number and the remainder can have decimals. Internally the page scales both numbers to whole numbers, so there is no floating point rounding.
For whole numbers, open the long division box. It shows the school layout and a sentence for each step: bring down a digit, see how many times the divisor fits, multiply, subtract. It is shown for the sizes of the numbers, and the signs are applied by the rule you picked.
These are the building blocks of modular arithmetic, used in clocks, checksums and cryptography. The power ab mod n would be a huge number if you worked out the power first, so the page uses square and multiply and reduces mod n at each step. For example 413 mod 497 is 445. The inverse of a mod n is the number x with a × x mod n = 1. It exists only when a and n share no factor but 1. The inverse of 3 mod 11 is 4, since 3 × 4 = 12 and 12 mod 11 = 1. The page finds it with the extended Euclidean algorithm and shows the table. For 6 mod 9 there is no inverse, because 6 and 9 share the factor 3.
To split a number into primes first, try the factor calculator. For the greatest common factor and least common multiple, use the GCF and LCM calculator, and for fractions the fraction calculator.
Questions
Divide, keep the whole number part as the quotient, then subtract divisor × quotient from the dividend. 17 ÷ 5 has quotient 3, and 17 − 15 = 2 is the remainder.
Modulo, written mod, is the remainder after division. 17 mod 5 = 2. It is often used for things that repeat, such as hours on a clock.
For positive numbers they are the same. For negative numbers, some languages return a remainder that follows the dividend and others a modulo that follows the divisor. The page shows both.
JavaScript's % takes the sign of the dividend, so -17 % 5 is -2. To get 3, use ((n % d) + d) % d.
Look at the floored card. Python's % takes the sign of the divisor, so -17 % 5 is 3.
The quotient is 0 and the remainder is the dividend. 3 mod 5 = 3.
If you type decimals, yes: 7.5 mod 2 = 1.5. With whole numbers, the remainder is a whole number, and the decimal answer to the division is shown separately.
It means working with remainders after dividing by n, so numbers wrap round. Power mod n and the inverse mod n are the main operations, and the extras here do both for big numbers.
No. Everything is worked out in your browser.