WASSCE Mathematics · Modular Arithmetic

Modular arithmetic: remainders and congruence

By the WASSCE Tutor team

Updated 12 November 2026 · 19 min read · Prepared against the WASSCE syllabus.

Imagine you look at your watch and it says 9 o'clock. Someone asks: what time will it be in 5 hours? You don't say "1414 o'clock" — you say "22 o'clock." That's modular arithmetic in action. When you reach 1212, you don't keep counting upwards forever — you wrap around to 11 and start again.

The same idea applies to days of the week. What day is it 10 days from Tuesday? You don't say "Tuesday plus 10 days." You count by sevens — 7 days from Tuesday is Tuesday again — so 10 days from Tuesday is Tuesday plus 3 more days = Friday.

This is the heart of modular arithmetic: a system where numbers wrap around after reaching a fixed value. WAEC tests this in nearly every paper, sometimes openly ("find 25 mod 425 \bmod 4") and sometimes disguised as clock, calendar, or remainder problems. This lesson opens the topic by defining the mod operation, showing how to find remainders quickly, and building the foundation for everything that follows.

Definition

Modular arithmetic (also called clock arithmetic) is arithmetic where numbers wrap around after reaching a fixed value called the modulus.

Written a mod na \bmod n (read: "aa mod nn"), this means: divide aa by nn, and the result is the remainder.

The modulus nn is the number you wrap around at. The result is always between 00 and n−1n - 1, inclusive.

Examples:

  • 17 mod 5=217 \bmod 5 = 2 (because 17=3×5+217 = 3 \times 5 + 2, remainder 22)
  • 25 mod 7=425 \bmod 7 = 4 (because 25=3×7+425 = 3 \times 7 + 4, remainder 44)
  • 30 mod 6=030 \bmod 6 = 0 (because 30=5×6+030 = 5 \times 6 + 0, remainder 00)

Learning objectives

By the end of this lesson you should be able to:

  • explain modular arithmetic as arithmetic of remainders
  • find a mod na \bmod n quickly, including for negative aa
  • use the division algorithm a=qn+ra = qn + r
  • recognise when two numbers are congruent modulo nn
  • connect modular arithmetic with clocks and calendars

The basic idea — remainders

When you divide one whole number by another, you get a quotient and a remainder. Modular arithmetic is about the remainder alone.

Example. Divide 1717 by 55.

17÷5=3 remainder 217 \div 5 = 3 \text{ remainder } 2
17÷5=3 remainder 2\begin{aligned}17 \div 5 &= 3 \text{ remainder } 2\end{aligned}

In modular notation, this says:

17 mod 5=217 \bmod 5 = 2

We ignore the quotient (33) and keep only the remainder (22). The result tells us: if you wrap around every 5 steps, where do you land after 17 steps? Answer: 22 steps past the start of the latest wrap.

The division algorithm

The foundation of modular arithmetic is the division algorithm, which says:

For any whole number aa and any positive whole number nn, there are unique whole numbers qq (quotient) and rr (remainder) such that:

a=q×n+r,where 0≤r<na = q \times n + r, \quad \text{where } 0 \leq r < n

The remainder rr is what we call a mod na \bmod n. The constraint 0≤r<n0 \leq r < n is the key — the remainder is always non-negative and strictly less than the modulus.

Examples:

  • a=23a = 23, n=7n = 7: 23=3×7+223 = 3 \times 7 + 2, so 23 mod 7=223 \bmod 7 = 2.
  • a=100a = 100, n=9n = 9: 100=11×9+1100 = 11 \times 9 + 1, so 100 mod 9=1100 \bmod 9 = 1.
  • a=50a = 50, n=8n = 8: 50=6×8+250 = 6 \times 8 + 2, so 50 mod 8=250 \bmod 8 = 2.
  • a=28a = 28, n=7n = 7: 28=4×7+028 = 4 \times 7 + 0, so 28 mod 7=028 \bmod 7 = 0.

The last case is important: when aa is a multiple of nn, the remainder is exactly 00.

How to compute a mod na \bmod n quickly

For most WAEC questions, the modulus is small (33, 44, 55, 66, 77, 88, 99, 1010, 1212, 2424). For these, you can find the remainder in your head — or with one line of long division.

Method 1 — Long division

For 47 mod 647 \bmod 6:

  • 47÷647 \div 6: 66 goes into 4747 seven times (7×6=427 \times 6 = 42), with 55 left over.
  • So 47=7×6+547 = 7 \times 6 + 5, and 47 mod 6=547 \bmod 6 = 5.

Method 2 — Subtract multiples of nn

Keep subtracting nn from aa until what remains is between 00 and n−1n - 1.

For 47 mod 647 \bmod 6:

  • 47−6=4147 - 6 = 41
  • 41−6=3541 - 6 = 35
  • 35−6=2935 - 6 = 29
  • 29−6=2329 - 6 = 23
  • 23−6=1723 - 6 = 17
  • 17−6=1117 - 6 = 11
  • 11−6=511 - 6 = 5

Result: 55. (Same answer as long division, but slower for big numbers.)

Method 3 — Jump by multiples

Find the largest multiple of nn that is ≤a\leq a. Subtract.

For 47 mod 647 \bmod 6:

  • Multiples of 66: 6,12,18,24,30,36,42,48,…6, 12, 18, 24, 30, 36, 42, 48, \ldots
  • The largest ≤47\leq 47 is 4242.
  • 47−42=547 - 42 = 5.

Result: 55. This is the fastest method once you know your multiplication tables well.

Worked example

Find each of the following.

(a) 35 mod 835 \bmod 8

The largest multiple of 88 less than or equal to 3535 is 3232 (=4×8= 4 \times 8). So 35−32=335 - 32 = 3.

Answer: 35 mod 8=335 \bmod 8 = 3.

(b) 100 mod 7100 \bmod 7

Largest multiple of 77 up to 100100: 9898 (=14×7= 14 \times 7). So 100−98=2100 - 98 = 2.

Answer: 100 mod 7=2100 \bmod 7 = 2.

(c) 45 mod 945 \bmod 9

45=5×9+045 = 5 \times 9 + 0. So 45 mod 9=045 \bmod 9 = 0.

Answer: 00 (4545 is a multiple of 99).

(d) 124 mod 12124 \bmod 12

Largest multiple of 1212 up to 124124: 120120 (=10×12= 10 \times 12). So 124−120=4124 - 120 = 4.

Answer: 124 mod 12=4124 \bmod 12 = 4.

(e) 7 mod 127 \bmod 12

Here a<na < n. So no multiple of 1212 fits inside 77. The remainder is just 77 itself.

Answer: 7 mod 12=77 \bmod 12 = 7.

(f) 0 mod 50 \bmod 5

0=0×5+00 = 0 \times 5 + 0. So 0 mod 5=00 \bmod 5 = 0.

When aa is smaller than nn

If a<na < n, then a mod n=aa \bmod n = a. There's no multiple of nn to subtract, so the remainder is aa itself.

  • 3 mod 7=33 \bmod 7 = 3
  • 5 mod 12=55 \bmod 12 = 5
  • 0 mod 9=00 \bmod 9 = 0

When aa is negative — a special case

Negative numbers in modular arithmetic are uncommon at WAEC Core level, but worth understanding. The rule is: the remainder must still be in the range [0,n−1][0, n-1].

For −3 mod 7-3 \bmod 7:

  • You want rr such that −3=q×7+r-3 = q \times 7 + r with 0≤r<70 \leq r < 7.
  • Try q=−1q = -1: −3=−1×7+4-3 = -1 \times 7 + 4. So r=4r = 4.
  • So −3 mod 7=4-3 \bmod 7 = 4.

Way to think about it: what number between 0 and 6 has the same wrap position as −3-3 in a 7-step cycle? Going −3-3 steps backwards is the same as going 44 steps forwards (in a 7-cycle), so −3 mod 7=4-3 \bmod 7 = 4.

This comes up occasionally in WAEC, particularly in clock problems ("33 hours before 11 o'clock").

Equivalence — when two numbers have the same remainder

Two numbers aa and bb are said to be congruent modulo nn if they have the same remainder when divided by nn. Written:

a≡b(modn)a \equiv b \pmod{n}

This is read: "aa is congruent to bb modulo nn."

Examples:

  • 17≡2(mod5)17 \equiv 2 \pmod{5} (both leave remainder 22 when divided by 55).
  • 24≡3(mod7)24 \equiv 3 \pmod{7} (because 24=3×7+324 = 3 \times 7 + 3).
  • 20≡8(mod6)20 \equiv 8 \pmod{6} (because 20=3×6+220 = 3 \times 6 + 2 and 8=1×6+28 = 1 \times 6 + 2).
  • 50≡0(mod10)50 \equiv 0 \pmod{10} (because 5050 is a multiple of 1010).

This congruence relation is the heart of modular arithmetic. We don't always reduce to the remainder; sometimes we say "these two numbers are equivalent in this modular system," which means we can use either one in calculations.

A visual picture — the modular clock

Think of modular arithmetic as a clock with nn positions, numbered 00 to n−1n - 1.

For mod 5, the clock has positions 0,1,2,3,40, 1, 2, 3, 4 arranged in a circle.

A 12-hour clock showing 9 + 5 = 14 ≡ 2 (mod 12), and the seven days of the week showing that 10 days after Monday is Thursday

Figure 1. Clocks and calendars are everyday modular arithmetic: mod 12 for hours, mod 7 for days. WASSCE Tutor diagram.

To find a mod 5a \bmod 5, start at position 00 and walk aa steps clockwise. Where you end up is the answer.

  • 7 mod 57 \bmod 5: walk 7 steps. Pass 0, 1, 2, 3, 4, return to 0, walk to 1, then 2. End at position 22. So 7 mod 5=27 \bmod 5 = 2.
  • 11 mod 511 \bmod 5: walk 11 steps. After 5 steps you're back at 0, after 10 you're back at 0 again, then 1 step to position 11. So 11 mod 5=111 \bmod 5 = 1.

The key insight: every time you complete a full circle, you can ignore those steps. So 11=2×5+111 = 2 \times 5 + 1 means you go around twice and end one step further. The 2 full circles don't change your position — only the remainder (11) matters.

Worked example

Use the modular clock idea to find each.

(a) 25 mod 725 \bmod 7

A mod 7 clock has 7 positions. 25=3×7+425 = 3 \times 7 + 4, so you complete 3 full circles and step 4 more. Answer: 44.

(b) 80 mod 980 \bmod 9

80=8×9+880 = 8 \times 9 + 8. So 8 full circles, then 8 more steps. Answer: 88.

(c) 84 mod 1284 \bmod 12

84=7×12+084 = 7 \times 12 + 0. Seven full circles, no extra steps. Answer: 00.

(d) 1000 mod 71000 \bmod 7

Largest multiple of 7 less than or equal to 1000: 7×142=9947 \times 142 = 994. So 1000−994=61000 - 994 = 6. Answer: 66.

Real-life appearances of modular arithmetic

The 12-hour clock

A 12-hour clock is mod 12 arithmetic. Hours add modulo 12.

  • If it's 1010 o'clock now, what time will it be in 55 hours?
  • 10+5=1510 + 5 = 15. But 15 mod 12=315 \bmod 12 = 3. Answer: 33 o'clock.

The 24-hour clock

A military or international clock is mod 24.

  • It's 22:0022{:}00. What time will it be in 77 hours?
  • 22+7=2922 + 7 = 29. 29 mod 24=529 \bmod 24 = 5. Answer: 05:0005{:}00 (5 a.m.).

Days of the week

Days cycle every 7 days, so mod 7 arithmetic applies.

  • Today is Wednesday. What day will it be in 3030 days?
  • Counting Wednesday as day 0, we want 30 mod 730 \bmod 7. 30=4×7+230 = 4 \times 7 + 2, so 30 mod 7=230 \bmod 7 = 2. Two days after Wednesday is Friday.

Days of the month / week

Less obvious examples include: days of the year (mod 365 or 366), months of the year (mod 12), positions on a circular track (mod number of seats), and even something like the position of a player rotating around a snooker table.

The next lesson goes deeper into clock and day-of-the-week problems. For now, focus on the basic remainder operation.

Worked example

Find each.

(a) Today is Friday. What day will it be in 5050 days?

50 mod 750 \bmod 7: largest multiple of 7 is 49 (=7×7= 7 \times 7). So 50−49=150 - 49 = 1. One day after Friday is Saturday.

(b) It's 99 a.m. What time will it be in 3030 hours?

On a 12-hour clock: 9+30=399 + 30 = 39. 39 mod 12=339 \bmod 12 = 3. So 33 — but we need to know if it's a.m. or p.m. 3030 hours is one full day plus 66 hours, so the time is 33 p.m.

On a 24-hour clock: 9+30=399 + 30 = 39. 39 mod 24=1539 \bmod 24 = 15. So 15:0015{:}00 (i.e., 3 p.m.). Same answer.

(c) In a year of 365365 days, January 1 is a Monday. What day of the week is December 31?

December 31 is day 365 of the year. We want the day 364 days after January 1 (because January 1 is day 1, December 31 is day 365, so we add 364 days).

364 mod 7364 \bmod 7: 364=52×7+0364 = 52 \times 7 + 0. So 0 days past Monday — same day, Monday.

Answer: Monday. (Yes — exactly 52 weeks in 365 days plus 1 day. The 1-day shift means the next year's January 1 is a Tuesday.)

Key properties — preview

We develop these in the next lesson, but here is a quick preview of why modular arithmetic is useful:

  1. Reduce before computing. Instead of computing 147+198147 + 198 and then taking mod, you can take each mod first, add, then mod the result. This keeps the numbers small.

  2. Multiples cancel. If a≡0(modn)a \equiv 0 \pmod{n}, then aa contributes nothing to a mod calculation involving multiples of nn.

  3. Speed. For large numbers, modular reduction can replace heavy arithmetic. WAEC questions like "Find the remainder when 2502^{50} is divided by 77" are solved this way.

In Sierra Leone

A cassava trader in Bo Market keeps a tally of bags sold. Every 77 bags, she ties them in a bundle and stacks them. At the end of the day, she has stacked 99 bundles plus 33 loose bags. Her records say she sold 6666 bags. Did she count correctly?

Let's check: 66 mod 7=?66 \bmod 7 = ? Largest multiple of 77 up to 6666 is 6363 (=9×7= 9 \times 7). So 66−63=366 - 63 = 3. ✓

Her records of 9 bundles + 3 loose correspond to 66 mod 7=366 \bmod 7 = 3 — exactly what we got. The check works because of how modular arithmetic captures the structure of repeated grouping.

Common mistake

Common errors when first learning modular arithmetic:

1. Forgetting that the remainder must be less than the modulus.

  • ❌ Writing 14 mod 5=514 \bmod 5 = 5 or  mod 5=−1\bmod 5 = -1.
  • ✓ 14 mod 5=414 \bmod 5 = 4 (because 14=2×5+414 = 2 \times 5 + 4, and 44 is in the range [0,4][0, 4]).

2. Confusing a mod na \bmod n with the quotient.

  • The result is the remainder, not how many times nn divides aa.
  • 17 mod 5=217 \bmod 5 = 2, not 33 (which would be the quotient).

3. Treating mod like division.

  • a mod na \bmod n is not the same as an\frac{a}{n}. It's the remainder after division.

4. Forgetting to wrap a negative number into the positive range.

  • −2 mod 5-2 \bmod 5 is not −2-2. It's 33 (because −2+5=3-2 + 5 = 3).

5. Treating a mod n=0a \bmod n = 0 as a special error.

  • 00 is a perfectly valid remainder. 20 mod 5=020 \bmod 5 = 0 means 2020 is a multiple of 55.

WASSCE examination focus

WAEC tests this

The basic mod operation is the foundation of every WAEC question on this topic. Typical question formats:

  • Find a mod na \bmod n. Direct computation — examples above.
  • Find the remainder when aa is divided by nn. Same as a mod na \bmod n, asked in different words.
  • Which of the following is the value of 25 mod 425 \bmod 4? Multiple choice, single integer.
  • On a 12-hour clock, what time will it be 77 hours after 88 o'clock? Disguised mod 12 question.
  • If today is Monday, what day will it be in 100100 days? Mod 7 question.

Master the remainder operation before moving on to modular addition and multiplication. Always check that your answer is in the range [0,n−1][0, n-1].

Practice problems

1. Find 43 mod 643 \bmod 6.

2. Find 100 mod 8100 \bmod 8.

3. Find 77 mod 1177 \bmod 11.

4. Find 5 mod 125 \bmod 12.

5. Find 84 mod 1284 \bmod 12.

6. Today is Sunday. What day will it be 2525 days from now?

7. It is 44 p.m. on a 12-hour clock. What time will it be in 2020 hours?

8. Find 250 mod 9250 \bmod 9.

9. Find −5 mod 7-5 \bmod 7.

10. Find the smallest positive value of xx such that x≡23(mod6)x \equiv 23 \pmod{6}.

Worked solutions

1. 43÷6=743 \div 6 = 7 remainder 11 (because 7×6=427 \times 6 = 42, and 43−42=143 - 42 = 1). So 43 mod 6=143 \bmod 6 = 1.

2. 100÷8=12100 \div 8 = 12 remainder 44 (because 12×8=9612 \times 8 = 96, and 100−96=4100 - 96 = 4). So 100 mod 8=4100 \bmod 8 = 4.

3. 77÷11=777 \div 11 = 7 remainder 00 (because 7×11=777 \times 11 = 77). So 77 mod 11=077 \bmod 11 = 0.

4. 5<125 < 12, so 5 mod 12=55 \bmod 12 = 5.

5. 84÷12=784 \div 12 = 7 remainder 00 (because 7×12=847 \times 12 = 84). So 84 mod 12=084 \bmod 12 = 0.

6. 25 mod 725 \bmod 7: largest multiple of 77 up to 2525 is 2121. So 25−21=425 - 21 = 4. Four days after Sunday: Monday, Tuesday, Wednesday, Thursday.

7. 4+20=244 + 20 = 24 on a 12-hour clock. 24 mod 12=024 \bmod 12 = 0, which on a clock face is 12 o'clock. (a.m. or p.m.? 2020 hours from 44 p.m. is 1212 p.m. — i.e., noon the next day.)

8. 250÷9250 \div 9: 9×27=2439 \times 27 = 243, so 250−243=7250 - 243 = 7. Answer: 250 mod 9=7250 \bmod 9 = 7.

9. −5+7=2-5 + 7 = 2 (adding the modulus brings us into the positive range). So −5 mod 7=2-5 \bmod 7 = 2. Check: −5=−1×7+2-5 = -1 \times 7 + 2. ✓

10. 23 mod 6=?23 \bmod 6 = ? Largest multiple of 66 up to 2323 is 1818. So 23−18=523 - 18 = 5. Therefore 23≡5(mod6)23 \equiv 5 \pmod 6, and the smallest positive xx is x=5x = 5.

What's next

In the next lesson we cover addition, subtraction and multiplication in modular arithmetic, clock and calendar problems, and solving simple congruences. The key principle: you can reduce before you compute. We will see how this turns long calculations into short ones, why 99+97 mod 799 + 97 \bmod 7 is easy without big multiplication, and how WAEC tests this directly.

Keep going with modular arithmetic

This is one of 7 lessons in Modular Arithmetic. Start free with the first lesson of every topic, then unlock them all, plus exam-style practice marked instantly and guided learning tools, from 25 NLe.

  • Free account, no card needed
  • Everything from 25 NLe
  • No automatic renewal
Start free

More lessons in Modular Arithmetic

  1. Operations in modular arithmetic, clock and calendar problems🔒
  2. Addition and Subtraction in Modular Arithmetic🔒
  3. Multiplication and Powers in Modular Arithmetic🔒
  4. Solving Modular Equations🔒
  5. Days of the Week and Clock Problems🔒
  6. Modular Arithmetic: The WAEC Trap🔒

All of Modular Arithmetic →