Modulo calculator

Calculate a mod b — the remainder when a is divided by b. Essential for clock arithmetic, programming, and cryptography.

amod

What is modulo?

a mod b = remainder of a ÷ b. 17 mod 5 = 2 because 17 = 3×5 + 2.

Uses

Even/odd: n mod 2 = 0 means even. Clock: (14 + 5) mod 12 = 7 (2pm + 5 hours = 7pm). Programming: The % operator.

Popular long division problems
Related calculators