Chinese Remainder Theorem Calculator
Solve x ≡ a (mod m) and x ≡ b (mod n) for coprime moduli.
The Chinese Remainder Theorem combines two modular conditions into a single one when the moduli are coprime.
The math behind it
If gcd(m, n) = 1, there is exactly one solution modulo m·n. This tool searches that range for the smallest non-negative x.
Worked example
x ≡ 2 (mod 3) and x ≡ 3 (mod 5) → x = 8 (mod 15).
FAQ
What if the moduli share a factor?
The theorem's uniqueness no longer applies; a solution exists only if the remainders are consistent.