About the Modulo Calculator
Modulo describes the remainder under a mathematical floor-based definition.
It is useful for repeating cycles, divisibility and modular arithmetic.
Calculate the mathematical modulo of one number by another using the floor-based definition.
Log in or create a free account to save your inputs and results, so you don't have to enter them again next time.🔒 No spam, ever. We never sell or share your details, and you can delete your history or account at any time. Privacy policy
Fill in the details and click Calculate to see your results.

Modulo describes the remainder under a mathematical floor-based definition.
It is useful for repeating cycles, divisibility and modular arithmetic.
| Number | 123 |
| Modulus | 10 |
| 123 mod 10 | 3 |
| Quotient | 12 |
| Check | 123 = 10 × 12 + 3 |
| Remainder in C, Java, JavaScript (a % m) | 3 |
3.
| Number | 17 |
| Modulus | 5 |
| 17 mod 5 | 2 |
| Quotient | 3 |
| Check | 17 = 5 × 3 + 2 |
| Remainder in C, Java, JavaScript (a % m) | 2 |
2.
| Number | -7 |
| Modulus | 3 |
| -7 mod 3 | 2 |
| Quotient | -3 |
| Check | -7 = 3 × -3 + 2 |
| Remainder in C, Java, JavaScript (a % m) | -1 |
2 (programming % gives -1).
Modulo gives the remainder under a specified mathematical definition of division.
It is 2.
Yes. This calculator uses the floor-based mathematical definition.
3. 123 ÷ 10 = 12 remainder 3, so 123 mod 10 = 3. Any number mod 10 is its last digit.
2 in mathematics (−7 = 3 × −3 + 2). Many programming languages return −1 for −7 % 3.