Modulo Calculator
Calculate the modulo (remainder) of any division operation. Enter a dividend and divisor to find the remainder, quotient, and the complete division equation. Essential for programming, cryptography, and number theory.
The modulo operation finds the remainder when one integer is divided by another. Written as a mod b or a % b (in programming), it returns the amount left over after division.
How Modulo Works:
For any integers a and b (b not zero): a = q x b + r, where q is the quotient and r is the remainder (0 <= r < |b|). The modulo is r.
For example, 17 mod 5 = 2, because 17 = 3 x 5 + 2.
Applications:
- Clock arithmetic: Hours cycle every 12 or 24 (e.g., 15:00 mod 12 = 3 PM).
- Programming: Array indexing, hash functions, circular buffers.
- Cryptography: RSA encryption, Diffie-Hellman key exchange.
- Divisibility testing: A number is divisible by b if a mod b = 0.
- Even/odd checking: A number is even if n mod 2 = 0.