fxExcelReps
← All functions Σ Math & statistics · Intermediate

MOD The remainder after division.

How to use MOD in Excel

MOD returns the remainder after division: MOD(7, 3) is 1. Typical uses: even/odd checks, every n-th row, converting minutes to hours and minutes.

Syntax

=MOD(number, divisor)

numberThe number to divide.
divisorThe number to divide by.

Examples

=MOD(A2, 2)=0TRUE if A2 is even.
=MOD(ROW(), 2)1 / 0 alternating — used for striped rows in conditional formatting.
=INT(B2/60)&"h "&MOD(B2, 60)&"m"135 minutes → "2h 15m".

Common mistakes

#DIV/0! error
The divisor is 0.
Negative numbers
The result takes the sign of the divisor: MOD(-7, 3) is 2, not −1.

Available in: All versions of Excel, Excel for the web, Google Sheets

Related functions

ROUNDROUNDDOWNIF

↑ Practise MOD in the sheet above