FullCalculator

Modular Arithmetic Calculator

Calculate a mod n

Modular Exponentiation a^b mod n

Formula

a mod n = remainder of a ÷ n; a^b mod n via repeated squaring

Frequently Asked Questions

What is modular arithmetic?
Modular arithmetic is a system of arithmetic for integers where numbers wrap around upon reaching a certain value (the modulus). For example, 17 mod 5 = 2 because 17 = 3×5 + 2. It is widely used in cryptography, computer science, and number theory.

You may also need