In this article:

Google Sheets Modulo Function (How to Use it in 2024)

In this article, we will explore the Google Sheets modulo function. We also cover how to set up the Google Sheets modulo function. Simply follow the process below. 

What is the Google Sheets Modulo Function?

The modulo function in Google Sheets is used to find the remainder of a division between two numbers. In Google Sheets, the modulo function is represented as:

MOD(number, divisor)

Here's how it works:

number: This is the number you want to divide.

divisor: This is the number by which you want to divide the first number.

The MOD function returns the remainder after dividing the first number by the second number. For example, MOD(10, 3) will return 1, because 10 divided by 3 is 3 with a remainder of 1.

How to Set Up the Google Sheets Modulo Function

The modulo function in Google Sheets is useful for categorizing numbers, determining even or odd values, and simplifying complex calculations in datasets. Simply follow the steps below to apply the modulo function in your dataset. 

1. Determine Even or Odd Numbers in a Dataset 

We will use the modulo function to determine if each number in a given dataset is even or odd. In our example, we have a list of numbers: 5, 12, 19, 26, 33, 40, 47, 54, 61, and 78. By applying the modulo function with the divisor 2, we can find out which numbers are even (remainder = 0) and which are odd (remainder ≠ 0).

google sheets modulo

2. Select the Cell Next to Your First Data Point

Click on the cell next to the first number in your dataset. This cell will display the result of the modulo function for the first number.

modulo google sheets

3. Enter the Modulo Formula to Check for Even or Odd Numbers

Type =MOD(, followed by the reference to the first number in your dataset and the number 2, separated by a comma. For the first number 5, the formula will be =MOD(A2, 2).

google sheets modulo function

4. Press Enter to Calculate

After entering the formula, press Enter. The cell will show 1, indicating that 5 is an odd number (since 5 divided by 2 leaves a remainder of 1).

modulo in google sheets

5. Drag the Formula Down to Other Cells

Click on the cell containing your formula. Drag the fill handle (a small square at the bottom-right corner of the cell) downwards to apply the formula to the remaining numbers in your dataset.

6. Analyze the Modulo Results for Even and Odd Numbers

Review the results in the column where you applied the modulo function. Cells showing 0 indicate even numbers, and cells with 1 indicate odd numbers.

7. Experiment with Different Divisors for Various Insights

Experiment with different divisors in the modulo function to see how the results change. This helps in understanding the versatility of the modulo function in various contexts.

We hope that you now have a better understanding of how to set up the Google Sheets modulo function. If you enjoyed this article, you might also like our article on how to adjust cell padding in Google Sheets or our article on how to use Google Sheets for budgeting.

Automate everything you track in spreadsheets with Lido
Learn more

Automate manual tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
Creates a one- or multiple-day calendar event with optional attendees
Adds an object to Hubspot
Create a Slack channel, and optionally add a topic or members
Makes any HTTP request
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
Makes any HTTP request and returns the response
Inserts given array below defined values in given worksheet
Sends an email using your Google account
Sends an email using your Microsoft Outlook account
Sends a Slack message
Sends an SMS message using your Twilio account
Updates cells with given values
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started