MOD returns the remainder after division. The result takes the sign of the divisor — the gotcha that trips up almost everyone. This page measures all four sign combinations plus the everyday odd/even and every-nth-row uses.
Returns the remainder, carrying the sign of the divisor. MOD(5,0) is #DIV/0!.
The #1 MOD gotcha is the sign: Excel's result follows the divisor, not the dividend. All four sign combinations, measured live. Click any row to load it.
| Expression | Result | Why |
|---|---|---|
| =MOD(10,3) | 1 | 10 = 3*3 + 1 |
| =MOD(-10,3) | 2 | Result takes the divisor sign (+) |
| =MOD(10,-3) | -2 | Result takes the divisor sign (-) |
| =MOD(-10,-3) | -1 | Result takes the divisor sign (-) |
| =MOD(7,2) | 1 | 1 = odd, 0 = even |
| =MOD(10,10) | 0 | Exact multiple, no remainder |
| =MOD(0,5) | 0 | Zero mod anything is 0 |
| =MOD(5,0) | #DIV/0! | Cannot divide by zero |
| Expression | Result | Why |
|---|---|---|
| =MOD(7,2) | 1 | odd/even test: 1 odd, 0 even |
| =MOD(ROW(),2) | 0 | band every other row (conditional formatting) |
Edit the table or type any formula — the engine evaluates instantly. Load a preset to see MOD take the divisor's sign, test odd/even, and hit the zero-divisor trap.
8 failure patterns mined from actual user reports on Reddit, Stack Overflow and Super User — each with the authentic symptom, root cause, a fix, and a runnable formula. Not textbook theory.
MOD is available in Excel 2003+, Microsoft 365, Excel for the web and Google Sheets. The sign-of-divisor rule is consistent across them; the % operator in some languages differs.
| Platform | Support | Notes | Gotcha |
|---|
MOD is one piece. The full course walks the toolkit end to end with live, measured examples.