Chinese Remainder Theorem Calculator

The only Chinese remainder theorem calculators I have found online require that the values be pairwise coprime. This calculator will solve all possible instances, including those where the values are not pairwise coprime. Technically, this is actually a method of successive substitution calculator.

Please enter your set of congruences in the form: x = A mod B with one congruence per line.


Answer:

Check the work, if the answers are not integers, there is a problem:

Generally these problems will have more than one solution. The above gives the lowest positive solution. To find other solutions take the least common multiple of the mods and then start adding that number to the answer. In this case the LCM is