MOD
Returns the remainder after a number is divided by a divisor
Syntax
MOD(number, divisor)
Arguments
| Argument |
Description |
Required |
number |
The number for which you want to find the remainder |
Required |
divisor |
The number by which you want to divide number |
Required |
Examples
Simple modulo operation
Check if number is even
Modulo with negative numbers
Related Functions
Other Math functions:
- ABS - Returns the absolute value of a number
- ACOS - Returns the arccosine, or inverse cosine, of a number
- ASIN - Returns the arcsine, or inverse sine, of a number
- ATAN - Returns the arctangent, or inverse tangent, of a number
- CEILING - Rounds a number up to the nearest integer or to the nearest multiple of significance
- COS - Returns the cosine of the given angle
- EXP - Returns e raised to the power of a given number
- FACT - Returns the factorial of a number
- FLOOR - Rounds a number down to the nearest multiple of significance
- INT - Rounds a number down to the nearest integer
- LN - Returns the natural logarithm of a number
- LOG - Returns the logarithm of a number to a specified base
- LOG10 - Returns the base-10 logarithm of a number
- PI - Returns the value of pi (π)
- POWER - Returns the result of a number raised to a power
- RAND - Returns a random number greater than or equal to 0 and less than 1.
- ROUND - Returns the number after rounding it to a certain number of decimal places.
- ROUNDDOWN - Returns a number rounded to a certain number of decimal places. ROUNDDOWN rounds all numbers down.
- ROUNDUP - Returns a number rounded up to a certain number of decimal places. ROUNDUP rounds all numbers up.
- SIGN - Determines the sign of a number
- SIN - Returns the sine of the given angle
- SQRT - Returns the square root of a number
- SUM - Returns the sum of all numbers in the provided arguments
- TAN - Returns the tangent of the given angle
- TRUNC - Truncates a number to an integer by removing the fractional part
← Back to Formula Reference