MODP (remainder of a division, Calculate method)

Navigation:  Formulas and functions > Functions from A to Z >

MODP (remainder of a division, Calculate method)

Previous pageReturn to chapter overviewNext page

Syntax:

MODP(x, y)

Description:

This returns the remainder of the division of x by y according to the "Calculate method" (see note below).

Example:

MODP(5, 3) returns 2

MODP(5, 0) returns a #DIV/0! error value

MODP(5, -3) returns 2 (see note below)

Note:

Microsoft Excel returns incorrect results when you use the MOD function with a negative numerator or denominator.

If you want to obtain correct results, you should use the RESTP function described here instead of REST.

The following table shows the differences between MOD and MODP (the results highlighted in green color are incorrect):

modulo_sample

Compatibility notes:

Note: The MODP function is not supported by Microsoft Excel. If you save a document in Excel format, all calculations that use this function will be replaced by their last result as a fixed value.

See also:

MOD, QUOTIENT