MOD()

Syntax. MOD(number,divisor)

Definition. This function returns the remainder of a division operation. The result has the same sign as the divisor.

Arguments

  • number (required) The number for which you want to find the remainder

  • divisor (required) The number by which you want to divide number

Background. For certain calculations, you need the remainder of a division operation. This is also called modulo (mod). For this type of calculation, you can use the MOD() function.

If the divisor is 0, the MOD() function returns the #DIV/0! error.

The MOD() function can be expressed in terms of the INT() function:

=numerator-divisor • INT(numerator/divisor)

This formula is used for the modulo method in software systems. There are two types of modulo calculations, ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.