MOD

The MOD function returns the remainder from a division. Both arguments are number values.

MOD(dividend, divisor)

dividend: A number to be divided by another number.

divisor: A number to divide into another number. If divisor is 0, a division by 0 results and the function returns an error.

Notes

  • The sign of the result matches that of the divisor.

  • When computing MOD(a, b), MOD gives a number r such that a = bk + r, where r is between 0 and b, and k is an integer.

  • MOD(a, b) is equivalent to a–b*INT(a/b).

Examples

=MOD(6, 3) returns 0, because 6 divided by 3 is exactly 2.

=MOD(7, 3) returns 1, the remainder when 7 is divided by 3.

=MOD(8, 3) returns 2, the remainder when 8 is divided by 3.

=MOD(-8, 3) returns 1, because -8 divided by 3 is -3 with a remainder of 1. (The number nearest to, but less than -8 that is evenly divided by 3 is -9).

=MOD(4.5, 2) returns 0.5, the remainder when 4.5 is divided by 2.

=MOD(7, 0.75) returns 0.25. MOD(7, 0.75) is equivalent to 7 - 0.75*INT(7/0.75), which equals 7 - 0.75*9.

See alsoQUOTIENT
Morty Proxy This is a proxified and sanitized view of the page, visit original site.
Helpful?
Character limit: 250
Maximum character limit is 250.
Thanks for your feedback.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.