MOD Function – Google Sheets

The MOD function in Google Sheets returns the remainder after dividing one number by another.

Syntax

The syntax for this function is:

=MOD(dividend,divisor)

  • dividend – The number to be divided
  • divisor – The number to divide by

Related Functions

There are a few other functions that are related to the MOD function.

DIVIDE – Divides two numbers

QUOTIENT – Returns the quotient of a division operation

Insert Math Symbols (Add-On)

Web banner showing math symbols from the Insert Special Characters Add-On
Explain Your Formulas with Symbols

MOD Function Examples

Here are some examples of how to use the MOD function:

Example 1 – Find the Remainder of 10 Divided by 3

First, let’s find the remainder of 10 divided by 3:

Using MOD to find the remainder of 10 divided by 3
Remainder of Division

=MOD(10,3)

You can use the MOD function to find the remainder of a division operation or to check if a number is divisible by another number. For example, the preceding formula returns 1, because 10 divided by 3 has a remainder of 1.

Example 2 – Check if a Number is Divisible by Another Number

Next, we’ll use this function to evaluate two numbers and return a text string telling us if they are divisible.

Using MOD to determine if one number is divisible by another
If a Number is Evenly Divisible

The formula in C2 is: =IF(MOD(A2,B2)=0,"Divisible","Not divisible")

This formula will return “Divisible” if the number in column A is divisible by the divisor in column B and “Not divisible” if it is not.

Example 3 – Determining Odd or Even with the MOD Function

Let’s get creative now and determine if numbers are even or odd by dividing them by two.

Using MOD to determine if a number is even or odd
Even or Odd

The formula is B2 is =IF(MOD(A2,2)=0,"Even","Odd")

This formula returns “Even” if the number in cell A2 is even and “Odd” if it’s odd.

Example 4 – Performing a Calculation in Only Odd Rows

Lastly, let’s perform calculations only when the row number is odd.

Performing a calculation on every other row
Performing a Calculation Only in Odd Rows

The formula in C2 is: =IF(MOD(ROW(),2)=0,"",(A2*B2))

This formula multiplies column A’s number by column B’s number only for odd-numbered rows.

Live Examples in Google Sheets

You can also make a copy of the spreadsheet with these examples to use the function in your work.

Conclusion

In conclusion, the MOD function is a versatile tool you can use to perform various calculations. By understanding the usage of the MOD function, you can use it to your advantage in your spreadsheets.

Leave a Comment