Chinese Remainder Theorem Calculator
Enter the remainders and the moduli, each separated by commas.
The remainders a, separated by commas.
The moduli m, separated by commas, each 2 or more.
Result
You entered
Smallest non-negative solution
General solution
Combined modulus
Show the work
The system of congruences
Find the numbers that satisfy all congruences at once. When the moduli share factors, the congruences are combined two at a time and checked for compatibility.
Combining two congruences
Write so that the first congruence holds, then choose the whole number that makes the second hold too. The new modulus is .
Combining with the congruence mod 7
Write so that the first congruence holds, then choose the whole number that makes the second hold too. The new modulus is .
Checking every congruence
Dividing the answer by each modulus should leave the stated remainder.
Result
So : every works.