182 mod – Apple iWork '09 User Manual
Page 182
MOD
The MOD function returns the remainder from a division.
MOD(dividend, divisor)
Â
dividend: A number to be divided by another number. dividend is a number value.
Â
divisor: A number to divide into another number. divisor is a number value. If 0, a
division by zero will result and the function will return an error.
Usage 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.
=MOD(7, 3) returns 1.
=MOD(8, 3) returns 2.
=MOD(-8, 3) returns 1.
=MOD(4.5, 2) returns 0.5.
=MOD(7, 0.75) returns 0.25.
Related Topics
For related functions and additional information, see:
“Listing of Numeric Functions” on page 167
“Value Types” on page 36
“The Elements of Formulas” on page 15
“Using the Keyboard and Mouse to Create and Edit Formulas” on page 26
“Pasting from Examples in Help” on page 41
182
Chapter 8
Numeric Functions