MOD

Syntax: MOD(integer1, integer2)

Arguments:

  • integer1 is an integer.
  • integer2 is an integer.

Return Type: Integer

Description: It calculates and returns the remainder from an integer division when it divides integer1 by integer2. If integer2 is not 0, returns the remainder portion of the quotient. If integer2 is 0, a runtime error occurs.

The MOD function is distinct from the division operator (/). MOD does not return the integer portion of a quotient, while the division operator returns the precise quotient.

Example:

MOD(8,5) = 3

The solution to 8 divided by 5 is 1 with a remainder of 3, or 1.6. The division operator would return the value 1.6, but the MOD function returns the value 3.

  • www.fico.com