All Functions

modulo - modulo calculation

The modulo (sometimes called modulus) function finds the remainder of division of one number by another.

modulo = a % n
Given two positive numbers, a (the dividend) and n (the divisor), a modulo is the remainder of the Euclidean division of a by n.


This modulo calculation is often used as verification for official numbers (banks, persons, companies, etc) in the form of a Modulo 97 verification or calculation.

Alias: Both modulo(a,n) and the shorter variant mod(a,n) are allowed.


modulo ( $dividend , $divisor ) Returns the remainder of the division of the dividend by the divisor


$dividend the number the will be divided by the divisor
$divisor the number that divides the dividend


Modulo calculation as verification number

Pattern "mod(123456789,97)"
returns 39 as its modulo 97 verification calculation

See also

int - number