Excel
MOD function in Excel
Returns the remainder from division
=MOD(number, divisor)MOD syntax and parameters
Two arguments, two required.
- numbernumberRequired
The number for which you want to find the remainder.
- divisornumberRequired
The number by which you want to divide number.
MOD examples
Formulas you'll actually reuse.
Units left over after filling boxes of 12:
=MOD(B2, 12)Result
7Every other row for banding — pair with conditional formatting:
=IF(MOD(ROW(), 2) = 0, "shade", "")Result
"shade"
MOD in Google Sheets
Same name — your formula ports as-is.
Try MOD in the playground
Edit the example — nothing to install.
Preloaded with the MOD formula from Example 1 — change anything and watch it respond.
Loading the editor…
MOD errors
What they mean — and the fixes.
#DIV/0!The divisor is 0 or an empty cell.
Related functions
More ways Excel gets this done.
- ABSReturns the absolute value of a numberMathGoogle Sheets
- ACOSReturns the arccosine of a numberMathGoogle Sheets
- ACOSHReturns the inverse hyperbolic cosine of a numberMathGoogle Sheets
- ACOTReturns the arccotangent of a numberMathGoogle Sheets
- ACOTHReturns the hyperbolic arccotangent of a numberMathGoogle Sheets
- AGGREGATEReturns an aggregate in a list or databaseMathNo Google Sheets equivalent