Modulo Calculator
Calculate the remainder of a division (modulo).
Recommended next steps
Related tools
Compute the least common multiple and greatest common factor of a list of positive integers.
Compute powers of numbers.
Browser scientific calculator with trig, log, powers, and memory.
Frequently asked questions
The modulo is the remainder left after dividing one number by another. For example, 17 mod 5 is 2, because 17 = 5 x 3 + 2. This calculator works entirely in your browser.
Programming languages disagree on the sign of the remainder. The truncated result (JavaScript's % operator) takes the sign of the dividend, the floored result (Python's % operator) takes the sign of the divisor, and the Euclidean result is always zero or positive. We show all three so you can match whichever language or convention you need.
Division by zero, and therefore modulo by zero, is undefined in mathematics. The calculator does not return a number for a zero divisor; it asks you to enter a non-zero value instead.
Yes. Modulo is most common with integers, but it is also defined for decimal values: the remainder is the fractional amount left over. For example, 5.5 mod 2 is 1.5.
Last updated 2026-06-23.