Category: FUNCTION | Updated: 2026-11-22

How to Use the MOD Function in Google Sheets

Syntax

=MOD(dividend, divisor)
  • dividend: The number to be divided (the original value).
  • divisor: The number to divide by. Must be a non-zero number.

Example

Examples of calculating leftover items after dividing by box size, checking even/odd, and extracting time from a date-time value:

Original Value Formula Result Explanation
25 =MOD(A2, 12) 1 Remainder when dividing 25 items into groups of 12
10 =MOD(A3, 2) 0 Divisible by 2, so it is even
15 =MOD(A4, 2) 1 Remainder of 1 when divided by 2, so it is odd
2026/11/22 14:30 =MOD(A5, 1) 14:30 Extracts the remainder after dividing by 1 (decimal part = time)

Common Errors and Notes

  • #DIV/0! Error: Specifying 0 or a blank cell for the second argument (divisor) causes a division-by-zero error.
  • Sign of Negative Results: The sign of the MOD result always matches the sign of the divisor (e.g., =MOD(-10, 3) returns 2, while =MOD(10, -3) returns -2).

Frequently Asked Questions

Q. How do I use MOD to check whether a number is even or odd?

A. Check the remainder when dividing by 2—like "=IF(MOD(A1, 2)=0, "Even", "Odd")"—so a remainder of 0 indicates even and 1 indicates odd.

Q. Can I use MOD to extract only the time from a date-time value?

A. Yes. Using "=MOD(A1, 1)" to find the remainder after dividing by 1 extracts only the time (the decimal part) while removing the date (the integer part).