Steply

Calculate 30 mod 7

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

Step by step

The question

Question: work out 30 mod 7.

30 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 30 by 7: 7 goes 4 times, that is 28, and 2 is left over.

30 = 7 × 4 + 2

Careful!

4 is how many times 7 goes in.

Mod asks for what is left over: 2.

Careful: not 30 mod 7 = 4 ✗

2 On the clock

Think of a clock with 7 numbers, 0 to 6.

So 30 mod 7 = 2.

30 mod 7 = 2

3 Check

Multiply back: 7 times 4, plus 2, is 30.

7 × 4 + 2 = 28 + 2 = 30

And 2 is from 0 to 6.

Right!

0 ≤ 2 < 7

Let's look back.

First: divide by 7.

Then: on the clock.

Last: check.

Answer
30 mod 7 = 2

Your turn

Try this one yourself, then check:

34 mod 7
Show the answer
34 mod 7 = 6

More from Remainders

The whole lesson: Remainders →