WeUtils.com

Modulo calculator

Enter a and b to get a mod b (remainder) and the quotient.

Modulo calculator

Calculate a mod b — the remainder left after dividing a by b — along with the integer quotient. The modulo operation is everywhere in programming, cryptography, clocks and cycles.

How it works

For 17 mod 5: 17 ÷ 5 = 3 remainder 2, so 17 mod 5 = 2 (quotient 3). The remainder is what’s left over when b no longer fits a whole number of times. This tool uses the standard programming remainder (the sign follows the dividend a).

Frequently asked questions

What is 10 mod 3? 1, because 10 = 3 × 3 + 1.

What is modulo used for? Wrapping values (clock hours, array indices), checking divisibility and parity (even/odd).