The remainder of a divided by n, also for negative and huge numbers, with every convention.
Procedure
How it works
Dividing a whole number $a$ by $n$ gives a quotient $q$ and a remainder $r$ with $a = q \cdot n + r$. The remainder is $a \bmod n$. For positive numbers everyone agrees: $123 = 30 \cdot 4 + 3$, so $123 \bmod 4 = 3$.
With negative numbers the quotient can be rounded in different ways, and so the remainder differs. Mathematics (and cryptography) keeps the remainder between $0$ and $n - 1$: $-17 \bmod 5 = 3$, because $-17 = -4 \cdot 5 + 3$. Many programming languages round toward zero instead and give $-2$; Python rounds down and gives the sign of $n$.
Two numbers with the same remainder are congruent modulo $n$, written $a \equiv b \pmod n$: their difference is a multiple of $n$. Clock arithmetic is arithmetic modulo 12.
Everything is calculated in your browser. Nothing you type leaves your device.