Modular Arithmetic

About this exercise

Finding the remainder after division — the arithmetic behind clocks and repeating cycles.

Example problems

A few of the problems this exercise asks. The printable worksheet holds ten fresh ones.

  1. 7 mod 3 = ?
  2. 62 mod 4 = ?
  3. 77 mod 8 = ?
  4. 73 mod 8 = ?

Try it yourself first — open a section below only if you get stuck.

How to solve it

Subtract the largest multiple of the modulus that still fits, and what remains is the answer.

Worked example

For 57 mod 7, seven eights make 56, leaving a remainder of 1.

Common mistake

Giving the quotient instead of the remainder. The answer to 57 mod 7 is 1, not 8.