MOD Function
Returns the remainder after division, with the sign of the divisor.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| number | The dividend, the number to be divided. | Required |
| divisor | The number by which to divide. Cannot be 0. | Required |
Basic Example
Remainder of 3 divided by 2
=MOD(3, 2)3 = 1×2 + 1, so the remainder is 1.
Advanced Examples
Example 1: Negative dividend, positive divisor
Signs differ.The result takes the divisor's (positive) sign.
=MOD(-3, 2)Example 2: Positive dividend, negative divisor
The divisor is negative.The result takes the divisor's (negative) sign.
=MOD(7, -3)How MOD Works
MOD computes number - divisor × INT(number / divisor). Because it uses INT, the result always has the same sign as the divisor, unlike a simple remainder that is always non-negative.
Important Notes & Limitations
The divisor cannot be 0; MOD(n, 0) returns #DIV/0!.
The result's sign follows the divisor, which can be counter-intuitive (MOD(-3,2)=1).
Results are floating-point; tiny rounding may appear with non-integer inputs.
Common Errors & Fixes
#DIV/0!The divisor is 0.Fix: Use a non-zero divisor.
Unexpected signForgetting the result follows the divisor's sign.Fix: Apply ABS if you need a non-negative remainder, or adjust signs intentionally.
Download Practice File
MOD
modPractice MOD with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the MOD function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps