Skip to content
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.

  1. Units left over after filling boxes of 12:

    =MOD(B2, 12)

    Result7

  2. Every 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.