The remainder after the number value is divided by the divisor value. Different applications and programming languages define the modulo operation differently when either the dividend or the divisor are negative. For example, in EasyScript and Excel, MOD(-5, 3) returns 1. However, in JavaScript and most databases, the modulo operation returns -2.

The following example uses MOD( ) to check if numbers in the Grade field are odd or even. When the divisor is 2, MOD( ) returns 0 for even numbers, and 1 for odd numbers.

The following example uses MOD( ) and YEAR( ) to get the last digit of a year. YEAR( ) returns the year number of a date. Dividing a number by 10 returns the last digit of the number.