Find the remainder and quotient when dividing one number by another.
The modulo operation finds the remainder after dividing one number by another. This calculator uses the mathematical (floored) definition, which always returns a remainder with the same sign as the divisor — the convention used in most math and computer science contexts.
a mod n = a − n × ⌊a ÷ n⌋, where ⌊⌋ denotes rounding down to the nearest integer (floor).
17 mod 5 = 2, since 5 × 3 = 15 and 17 − 15 = 2. For negative numbers, −7 mod 3 = 2 (not −1), because this calculator uses the floored definition.
Programming languages don't always agree on how modulo handles negative numbers — some (like JavaScript's % operator) return a different sign than the floored definition used here.
The remainder after dividing one number by another — 17 mod 5 = 2.
Programming, cryptography, and scheduling patterns like clock arithmetic.
Conventions vary by system, so check which convention this calculator follows.