Tested tool guide
Tested browser tools
Checked August 16, 2026
What Modular Arithmetic Calculator does, with a checked example
Four number-theory questions share this calculator: compute a^b modulo m, find gcd(a, b), solve a*x congruent to 1 modulo m, or combine simultaneous congruences with the Chinese Remainder Theorem. Each operation takes the corresponding integers, including residue-modulus pairs for CRT. These are exact calculations used in cryptographic arithmetic, not floating-point estimates. The common surprise is that a nonzero value does not automatically have an inverse: the value and modulus must have greatest common divisor 1.
Worked example
A concrete input and expected output from the current implementation.
Input
Operation: modular exponentiation; base = 7; exponent = 4; modulus = 13
->
7^2 = 49, which leaves remainder 10 modulo 13. Therefore 7^4 is congruent to 10^2 = 100, and 100 = 7*13 + 9, so the requested residue is 9.