Understanding modulo results
Locate the enclosing multiples of the modulus
Multiples of 5 include −20, −15, −10, −5, 0 and 5. The integer −17 sits three units above −20. That offset of three is its modulo-five position. Positive 17 sits two above 15, so 17 modulo 5 is 2. The same positive modulus can produce different quotients while restricting each remainder to the same range. The quotient absorbs complete cycles; the result identifies the remaining position.
Apply the nonnegative-result convention consistently
A modulus of 5 permits results 0, 1, 2, 3 and 4. A result of 5 already completes another cycle and reduces to 0. Enter a positive, nonzero whole-number modulus in this tool. A negative dividend is permitted, but a negative modulus is outside this interface’s chosen convention. If you are reproducing software output, check that language’s documented operation before interpreting a different signed result as a calculation error.
Related calculations
- Remainder CalculatorCalculate remainder with worked steps, clear input conventions and a result table.
- Long Division CalculatorCalculate long division with worked steps, clear input conventions and a result table.
- Greatest Common Factor CalculatorFind the largest factor shared by two positive integers.