The MOD function returns the remainder when one number is divided by another, or modulo.
Syntax
MOD(Dividend, Divisor)
Arguments
| Argument | Data type | Description |
| Dividend | Number | The number to divide. |
| Divisor | Number | The number to divide by. If this is 0, the MOD function returns a value of 0. |
The MOD function returns a numeric value.
In Polaris, the MOD value for MOD(0, NaN) returns 0, but in the Classic Engine it returns NaN.
Excel equivalent
Examples
| Formula | Result |
MOD(10, 3) | 1 |
MOD(26.6, 7.1) | 5.3 |
MOD(-50,7) | 6 |
MOD(271.56, -8.8) | -1.24 |
MOD(5, 0) | 0 |
MOD(0, 5) | 0 |