MOD function

To use this function, choose Calc > Calculator.

The whole number remainder of a number when the number is divided by a specified divisor (modulus).

Syntax

MOD(number,divisor)

Calculates the remainder after a number is divided by a divisor. The number and divisor must be integers or columns of integers.

Example

Calculator expression Result
MOD(10,6) 4
MOD(23,10) 3

Formula

m – (n * FLOOR (m / n)), where m is the number and n is the divisor

In standard notation, the result is expressed as m = (MOD result) (mod n). For example, the result of MOD(23,10) is expressed as 23 = 3 (mod 10).

Uses

Modular arithmetic, sometimes called "clock arithmetic," is a system that describes how numbers "wrap around" after they reach a certain value — the modulus. A standard clock can be considered modulo 12, where adding any multiple of 12 hours results in the same time position.

Modular arithmetic is important in number theory and can be used to simplify calculations of very large numbers, because many numbers are equivalent in a specified MOD. Modular arithmetic also plays an important role in abstract algebra, cryptography, computer science, and the visual and musical arts.