Free to use, no account
Chinese Remainder Theorem Calculator
Solve a system of modular congruences and see the least nonnegative solution with its combined modulus. Compatible non-coprime moduli work too; conflicting systems are explained.
How do I use the Chinese remainder theorem calculator?
Enter one remainder and modulus on each line, separated by a comma, such as 2, 3 for x ≡ 2 (mod 3). Add 2–20 lines and calculate. The result gives the least nonnegative x and the combined modulus.
Frequently asked questions
How do I use the Chinese remainder theorem calculator?
Enter one remainder and modulus on each line, separated by a comma, such as 2, 3 for x ≡ 2 (mod 3). Add 2–20 lines and calculate. The result gives the least nonnegative x and the combined modulus.
Are my congruences uploaded?
No. The calculation runs in this browser with exact integer arithmetic. Your entered values are not uploaded or saved by this tool.
What does the Chinese remainder theorem find?
It combines congruences into a single repeating solution class. For example, x ≡ 2 (mod 3) and x ≡ 3 (mod 5) combine to x ≡ 8 (mod 15).
Can the moduli share a factor?
Yes, when the congruences agree modulo their greatest common divisor. For example, x ≡ 2 (mod 4) and x ≡ 6 (mod 8) combine to x ≡ 6 (mod 8). Conflicting systems are reported as having no solution.
Does this calculator use exact arithmetic?
Yes. It uses local BigInt integer arithmetic rather than floating-point numbers, within the input limits shown above.