Modular Arithmetic Worksheets
Free PDF · Problems + answer key · Instant download
Easy
10 problemsMedium
20 problemsHard
20 problemsMixed
30 problemsFree printable modular arithmetic worksheets with step-by-step answer keys. Every worksheet is uniquely generated so students never see the same problems twice. Topics covered range from simple a mod n at the easy level through to linear congruence ax ≡ b (mod n), gcd(a, n) = 1 at the advanced level.
What is modular arithmetic?
Modular arithmetic deals with remainders after division, focusing on what's left over when one integer is divided by another. The notation a mod n represents the remainder when a is divided by n, always yielding a value between 0 and n-1. Two numbers are congruent modulo n if they leave the same remainder when divided by n, written as a ≡ b (mod n).
Why it matters
Modular arithmetic powers modern cryptography, with RSA encryption relying on calculations modulo large prime numbers exceeding 1024 bits. Computer hash functions use modular operations to distribute data evenly across memory locations, while error-correcting codes in CDs and digital communications depend on arithmetic modulo specific numbers. Clock calculations naturally use modular arithmetic — adding 8 hours to 7 PM gives 3 AM because (7 + 8) mod 12 = 3. Credit card validation employs the Luhn algorithm, which uses modular arithmetic to detect typing errors in 16-digit card numbers. In advanced mathematics, modular arithmetic appears in number theory, abstract algebra, and discrete mathematics courses, providing the foundation for understanding cyclic groups and finite fields used in coding theory.
Common mistakes to watch for
- ✗Confusing 23 mod 5 with 23 ÷ 5, writing 4.6 instead of the correct remainder 3
- ✗Computing (7 × 8) mod 6 as 56 mod 6 = 2, but forgetting that 7 mod 6 = 1 and 8 mod 6 = 2, so the answer is (1 × 2) mod 6 = 2
- ✗Writing 15 ≡ 7 (mod 4) as false because 15 - 7 = 8, but failing to recognize that 8 is divisible by 4, making the congruence true
Questions teachers ask
What is the difference between mod and remainder?+
How do you check if two numbers are congruent?+
Why does modular arithmetic work with addition and multiplication?+
What does it mean when gcd(a, n) = 1 in modular arithmetic?+
How is modular arithmetic used in everyday technology?+
Pick a difficulty
Click any level to open the generator with that difficulty pre-selected.
Beginner
Generate →- Concepts
- Simple a mod n
- Range
- a < 50, n < 10
- Steps
- 3 steps
- Example
- 47 mod 6
Easy
Generate →- Concepts
- Congruence check a ≡ b (mod n)
- Range
- a, b < 60, n ≤ 12
- Steps
- 3 steps
- Example
- Is 17 ≡ 5 (mod 6)?
Medium
Generate →- Concepts
- Modular addition / multiplication: (a + b) mod n, (a × b) mod n
- Range
- a, b ≤ 30, n ≤ 15
- Steps
- 3 steps
- Example
- (5 × 7) mod 9
Hard
Generate →- Concepts
- Linear congruence ax ≡ b (mod n), gcd(a, n) = 1
- Range
- a ≤ 9, n ≤ 13
- Steps
- 3 steps
- Example
- Solve 3x ≡ 5 (mod 7)
Try a sample problem
Try it right now
Click “Generate a problem” to see a fresh example of this technique.
Learn the theory → Read our modular arithmetic guide with worked examples.
Practice online → Interactive modular arithmetic problems with instant feedback.