
MathLevel: IntermediateAvailable in: Excel 2007+
In this article
- Syntax
- Examples
- Example 1
- Example 2
- Example 3
- 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 articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong