How to Use the MOD Function in Google Sheets

By Tomosuke Hasegawa · Updated Oct 29, 2026 · Beginner · 5 min read · includes 2 free exercises

In short: MOD returns the remainder left after dividing one number by another. The formula is =MOD(dividend, divisor). =MOD(10, 4) returns 2.

What MOD does

When you divide 10 by 4, you get 2 with 2 left over. MOD returns that leftover part. It is the tool for questions such as "is this number divisible by 3?", "which rows are every fifth row?" and "what is the minute part of a total number of minutes?"

MOD syntax

=MOD(dividend, divisor)

Per Google's help page, MOD also works with non-integers, but floating-point arithmetic can make the result approximate. The page suggests wrapping the result in ROUND if you want the value you expect.

A step-by-step example

Cells A2:B3 hold two numbers and a divisor.

AB
1NumberDivisor
2175
393
=MOD(A2, B2)

This returns 2. Here is why: 5 goes into 17 three times (15), and 2 is left over.

Check divisibility

A remainder of 0 means the number divides evenly. Combine MOD with IF:

=IF(MOD(A3, 3) = 0, "Yes", "No")

This returns Yes, because 9 divided by 3 leaves no remainder. The same idea can mark every second row, using ISEVEN and ISODD as a shortcut.

Common mistakes

Try it yourself

Use the table above (A1:B3). Type your formula into the box, starting with =, then press Check.

Exercise 1: The remainder

Write a formula that returns the remainder when A2 is divided by B2.

Hint: dividend first, then divisor.

Exercise 2: Divisible by 3?

Write a formula that shows Yes if A3 is divisible by 3 and No if it is not.

Hint: a remainder of 0 means divisible.

What to learn next

Syntax and rules in this guide were checked against Google's MOD help page. See all guides.