Steply

Calculate 100 mod 7

Step by step, with the reason for every step · Remainders · Discrete Math

Step by step

The question

Question: work out 100 mod 7.

100 mod 7

Mod 7 means: the remainder after dividing by 7.

It is always a whole number from 0 to 6.

mod 7 = the remainder after ÷ 7
always 0 to 6

1 Divide by 7

Divide 100 by 7: 7 goes 14 times, that is 98, and 2 is left over.

100 = 7 × 14 + 2

Careful!

14 is how many times 7 goes in.

Mod asks for what is left over: 2.

Careful: not 100 mod 7 = 14 ✗

So 100 mod 7 = 2.

100 mod 7 = 2

2 Check

Multiply back: 7 times 14, plus 2, is 100.

7 × 14 + 2 = 98 + 2 = 100

And 2 is from 0 to 6.

Right!

0 ≤ 2 < 7

Let's look back.

First: divide by 7.

Last: check.

Answer
100 mod 7 = 2

Your turn

Try this one yourself, then check:

101 mod 5
Show the answer
101 mod 5 = 1

More from Remainders

The whole lesson: Remainders →