Remainder Calculator
Divide two numbers and get the quotient and the remainder separately, plus the modulo result for negative dividends.
How to use it
- Enter the number being divided, then the divisor.
- The quotient is the whole-number part; the remainder is what is left over.
- The modulo tile always returns a non-negative value, matching how most programming languages define mod.
Examples
| 17 ÷ 5 | quotient 3, remainder 2 |
| −17 ÷ 5 | remainder −2, modulo 3 |
Integer division splits a ÷ b into a whole quotient and whatever is left over — a = q × b + r. It's the arithmetic behind scheduling repeating events, splitting items into equal groups with a leftover, and the modulo operator every programming language uses for wrapping values (clock arithmetic, array indices, cyclic patterns).
Worked example — packing with leftovers
137 eggs need to go into boxes of 12. 137 ÷ 12 gives quotient 11 and remainder 5: 11 full boxes, with 5 eggs left over needing a smaller box or another dozen. The remainder is exactly the number a naive '137 ÷ 12 = 11.4' calculation hides.
Remainder vs modulo with negative numbers
The two disagree once the dividend is negative. Remainder keeps the sign of the dividend, so −17 ÷ 5 leaves a remainder of −2. Modulo — as used in Python, and most clock-arithmetic contexts — always returns a value in the range 0 to b−1, giving 3 for the same inputs. This matters directly when porting code between languages: JavaScript's % behaves like remainder, Python's % behaves like modulo.
Questions people ask
Why do remainder and modulo differ for negative numbers?
Remainder keeps the sign of the dividend, so −17 ÷ 5 leaves −2. Modulo wraps into the range 0 to b−1, giving 3. Languages differ, so both are shown.
Is anything sent to a server?
No. Every calculation runs in your browser, so nothing you type is uploaded and the page keeps working offline once it has loaded.
Last updated 17 August 2026