Math · Every step shown

Modulo Calculator

The remainder left over when one number is divided by another.

Enter your numbers

Press Solve with steps to see the answer and how to get it.

Job: Arithmetic
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.

More math calculators

Snap a photo of a problem →   All math tools →   All calculators →

These calculators show the method as well as the answer, so you can learn the steps and check your own work. If a result ever looks wrong, tell us on the Contact page with the numbers you entered.

Save or print your results

On a phone, choose Save as PDF on the next screen to keep a copy.