Modular Arithmetic Calculator: Clock Math and Cr...
Calculate modular arithmetic operations: mod, modular inverse, Euler's totient, and Chinese Remainder Theorem. Essential for cryptography, computer science, and number theory.
What is Modular Arithmetic?
Modular arithmetic is "clock math" โ numbers wrap around after reaching a modulus (m). 7 mod 3 = 1 (same as 3+3+1). It is the mathematical foundation of cyclic phenomena, cryptographic systems (RSA, AES, Diffie-Hellman), error-detecting codes, and computer hash functions.
๐ Modular Arithmetic Calculator
Free calculator for instant results.
๐ Formula
a โก b (mod m) means m | (aโb)
a mod m = remainder when a is divided by m. Range: 0 to mโ1. For negative numbers: โ1 mod 5 = 4 (not โ1).
๐ Worked Example
RSA key example: p=61, q=53, n=3233
ฯ(n)=(pโ1)(qโ1)=3120
Public key e=17, Private key d: 17d โก 1 (mod 3120)
d = 2753 (modular inverse)
๐ How to Use
โ FAQ
What is the modular inverse and when does it exist?
The inverse of a (mod m) exists if and only if GCD(a,m)=1 (a and m are coprime). Found using the Extended Euclidean Algorithm.
How is modular arithmetic used in RSA encryption?
RSA relies on: (mแต)แต โก m (mod n). The difficulty of factoring large n = pรq makes the private key (d) computationally infeasible to find without knowing p and q.

Veer Kumavat
Founder & AuthorVeer is a 14-year-old student from Nashik, Maharashtra, who built SciFi Calculators to help students worldwide master STEM subjects. He is passionate about making complex science and math problems accessible through intuitive digital tools.
