MOD Function in Excel: Remainder After Division

⏱ 1 min readUpdated 28 September 2026

MathLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Example 2
  5. Example 3
  6. Related functions

MOD returns the remainder after dividing. Great for alternating rows, cycles and time differences over midnight.

Syntax

=MOD(number, divisor)
Argument What it means
divisor The number to divide by.

Examples

Example 1

=MOD(ROW(), 2)=0

TRUE on even rows — use it in conditional formatting for banding.

Example 2

=MOD(B2-A2, 1)

Hours worked on a night shift that crosses midnight.

Example 3

=MOD(A2, 7)

Position in a weekly cycle.

QUOTIENT · INT · ROW

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong