Your answer
Press Solve with steps to see the answer and every step.
How it works, examples and FAQ
a mod b = a − (b × the whole-number part of a ÷ b).
Example: 17 mod 5. 17 ÷ 5 = 3.4, so the whole part is 3. 17 − (3 × 5) = 2.
What does "mod" mean?
The modulo operation gives the remainder after dividing one number by another, instead of the full quotient.
What's 17 mod 5?
2. 17 ÷ 5 is 3 with 2 left over.
Can you take the modulo of a negative number?
Yes, but conventions differ on the sign of the result between programming languages. This calculator follows the everyday math convention.