In division there are four components…

```
Dividend => D
divisor => d
quotient => q
Remainder => R
```

In equation form,

```
D / d == q + R / d
```

where **d**, **q** and **R** are integers (whole numbers). When there is no Remainder, we say that the modulo of the division is zero.

```
D % d == 0
```

as an expression will be `true`

for the above.

Remainder *is* the *modulo*. We can use the modulo to test for divisibility, but we can also use it in other ways to create periodic functions such as finding all the Thursdays in a given month.

Rewriting the equation from above we get to this…

```
D / d == q + R / d ~ * d
D == d(q + R / d) ~ expand
D == dq + R
```

Let’s see this in action…

```
23 / 5 == 4 + 3 / 5 ~ * 5
23 == 5 * 4 + 3
```

When we subtract 5 * 4 from both sides we get,

```
23 - 20 == 3
```

which tells us that `23 % 5 == 3`

.