Solve systems of congruences and see the combined solution modulo the product of the moduli.
Enter integer remainders and positive integer moduli. Moduli must be pairwise coprime.
The Chinese Remainder Theorem says that a system of congruences has a unique solution modulo the product of the moduli when the moduli are pairwise coprime.
This calculator builds that solution using modular inverses and the extended Euclidean algorithm.
Type a remainder and a positive modulus for each line.
If any pair of moduli shares a factor greater than 1, the standard CRT formula does not apply.
The result panel shows the smallest non-negative solution and the repeating solution family.
x ≡ 2 (mod 3), x ≡ 3 (mod 5), x ≡ 2 (mod 7)
M = 3 × 5 × 7 = 105
The smallest solution is x = 23
All solutions are x = 23 + 105k
Every pair of moduli has greatest common divisor 1.
The standard CRT formula may fail, and the system may have no solution.
No. Reordering the congruences does not change the final solution modulo M.
They let us isolate each congruence and combine the pieces into one solution.
Related Tools