MOD(number, divisor_number)
Numeric. The number to divide.
Numeric. The number to divide number by.
Numeric.
You can use this function to test whether two numbers divide evenly, or to isolate the remainder of a division calculation. This function divides one number by another and returns the remainder.
If either, or both, parameters include decimals, the output has the same decimal precision as the input parameter with the higher number of decimal places. For example, the output for MOD(45.35, 5.3) is “2.95”.
Example | Return value |
---|---|
MOD(93, 10) |
3 |
MOD(66, 16.00) |
2.00 |
MOD(53.45, 10) |
3.45 |
In a payroll table, to define a field that shows the number of months since the last anniversary, specify:
MOD(Months_of_service, 12)