ReferenceFunctionsMath Functions
MOD
MOD: Returns the remainder after division, with the sign of the divisor.
Summary
Returns the remainder after division, with the sign of the divisor.
Remarks
- If divisor is
0, returns#DIV/0!. - Result sign follows Excel-style MOD semantics (sign of divisor).
- Errors in either argument are propagated.
Examples
Positive divisor
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
1
Negative dividend
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
1
Related functions
FAQ
Why can MOD return a positive value for a negative dividend?
MOD follows the sign of the divisor, matching Excel's modulo semantics.
Runtime metadata
Category
Math
Signature
MOD(arg1: Number, arg2: Number)Arity
min 2, max 2
Arguments
arg1Number · Scalar · coercion NumberLenientText
arg2Number · Scalar · coercion NumberLenientText
Caps
PURE
Source