Mathematica 9 is now available


Mod[m, n] gives the remainder on division of m by n.
Mod[m, n, d] uses an offset d.

• For integers m and n Mod[m, n] lies between 0 and  .
Mod[m, n, 1] gives a result in the range 1 to n, suitable for use in functions such as Part.
Mod[m, n, d] gives a result x such that  and  .
• The sign of Mod[m, n] is always the same as the sign of n, at least so long as m and n are both real.
• The arguments of Mod can be any numeric quantities, not necessarily integers.
Mod[x, 1] gives the fractional part of x.


Using InstantCalculators

Here is the InstantCalculator for the Mod function. Enter the parameters for your calculation and click Calculate to see the result.

Entering Commands Directly

You can paste a template for this command via the Text Input button on the Mod Function Controller.

Here are a few examples of division remainders.

Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information