Modulo Calculator
Calculate a modulo remainder and integer quotient for positive or negative numbers.
About the modulo calculator
Modulo calculation examples
These examples show common remainder, divisibility, and cycle calculations.
| Operation | Result | Explanation |
|---|---|---|
| 17 mod 5 | 2 | Five fits into 17 three times, leaving a remainder of 2. |
| 48 mod 6 | 0 | A zero remainder confirms that 48 is divisible by 6. |
| 29 mod 12 | 5 | This is the same wraparound used for a 12-hour clock. |
| -13 mod 5 | 2 | The Euclidean convention returns the nonnegative remainder 2. |
How to calculate a modulo
- Enter the number being divided in the Dividend field.
- Enter a nonzero modulus in the Divisor field.
- Select Calculate modulo to compute the remainder and quotient.
- Check the displayed division identity or select Reset to start again.
Modulo calculator FAQ
What is the difference between modulo and remainder?
They describe closely related division results, but sign conventions can differ for negative values. This calculator uses the Euclidean convention and always returns a remainder from zero up to the absolute divisor.
Can the divisor in a modulo operation be zero?
No, modulo zero is undefined because division by zero has no meaningful quotient. Enter any positive or negative nonzero divisor instead.
How does modulo work with a negative dividend?
The calculator adjusts the raw remainder into a nonnegative Euclidean remainder. For example, negative 13 mod 5 is 2 because negative 13 equals 5 times negative 3 plus 2.
How can modulo test whether one number divides another?
Calculate the first number modulo the proposed divisor. A result of zero means the divisor divides the number evenly, while any other result is the amount left over.
Where is modular arithmetic used?
It is used for clocks, calendars, cyclic indexes, hashing, checksums, and cryptographic algorithms. The operation converts an unrestricted value into a predictable repeating range.