Modulo operation

Computational operation

In mathematics the result of the modulo operation is the remainder of an arithmetic division.[1] As is well known, an arithmetic division of two integers produces a quotient and a remainder.

However, other conventions are possible. Computers and calculators have various ways of storing and representing numbers. Their definition of the modulo operation depends on the programming language and/or the underlying hardware.


  1. Technically, an arithmetic division is known as a Euclidean division.