Chinese remainder solver
Solve a system of congruences with the Chinese remainder theorem.
Chinese remainder solver
Paste a system of congruences — one per line, as "2 mod 3" or "x ≡ 2 (mod 3)" — and this tool finds the smallest non-negative x that satisfies all of them, using the Chinese remainder theorem. It is the standard way to recover a number from several remainder clues, and shows up in scheduling, checksum design, cryptography (RSA's CRT optimization), and puzzles phrased as "a number that leaves remainder a divided by n, and remainder b divided by m".
Moduli do not need to be pairwise coprime: the solver merges congruences two at a time with the extended Euclidean algorithm, and reports plainly when two of them conflict rather than guessing. "Show calculation steps" reveals every intermediate merge instead of only the final answer, and "Output format" switches between the full x ≡ r (mod n) notation and the bare value. "Support very large numbers" lifts the everyday size cap and uses exact BigInt arithmetic, so moduli with dozens of digits still resolve exactly; once a result is too long to read comfortably it switches to scientific notation, and "Scientific notation digits" sets how many significant digits that keeps.
Batch mode treats every input line as its own independent system: separate the congruences on a line with a semicolon, for example "2 mod 3; 3 mod 5; 2 mod 7", and get one result per line — handy for checking several small systems at once. A line that fails to parse, or has no solution, is reported next to that line without stopping the rest of the batch.
Everything runs locally in your browser — the numbers you paste are never uploaded anywhere. Copy the result, download it as a .txt file, or send the output straight back into the input to chain another step.