Google Sheets
MOD function in Google Sheets
Returns the result of the modulo operator, the remainder after a division operation.
=MOD(dividend, divisor)MOD syntax and parameters
Two arguments, two required.
- dividendnumberRequired
The number to be divided to find the remainder.
- divisornumberRequired
The number to divide by.
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 Excel
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 Google Sheets gets this done.
- ABSReturns the absolute value of a number.MathExcel
- ACOSReturns the inverse cosine of a value, in radians.MathExcel
- ACOSHReturns the inverse hyperbolic cosine of a number.MathExcel
- ACOTReturns the inverse cotangent of a value, in radians. .MathExcel
- ACOTHReturns the inverse hyperbolic cotangent of a value, in radians. Must not be between -1 and 1, inclusive..MathExcel
- ASINReturns the inverse sine of a value, in radians.MathExcel