What MOD does
MOD returns the remainder after division. It is useful for repeating patterns, interval checks, odd-even logic, and time extraction tricks.
Practical examples
Return the remainder after division
=MOD(17,5)
This returns 2 because 17 divided by 5 leaves a remainder of 2.
Extract the time portion of a date-time value
=MOD(A2,1)
Because Excel stores date-time values as serial numbers, MOD(A2,1) leaves only the fractional time portion.
Common mistakes and notes
Zero divisors are invalid
If the divisor is zero, Excel returns an error.
MOD is often more useful than it first appears
Many worksheet patterns that repeat on a cycle can be simplified with MOD once you think in terms of remainders.