Back to functions
Math & Trig2026-03-145 related articles

MOD Function in Excel

Return the remainder after a number is divided by a divisor.

Syntax

MOD(number, divisor)

Arguments

number

Required

The number you want to divide.

divisor

Required

The number used to divide the first value.

What it returns

Returns the remainder from the division.

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.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use MOD.

Official documentation