Chinese Remainder Theorem

Solve simultaneous congruences

About this calculator

The Chinese Remainder Theorem Calculator solves a system of simultaneous congruences x ≡ aᵢ (mod nᵢ). It returns the smallest non-negative solution and the modulus over which the solution repeats, works even when the moduli are not pairwise coprime (returning the least common multiple), and reports when no solution exists. A number-line and sieve visual show how the per-congruence solution sets line up at the answer.

How to use the Chinese Remainder Theorem calculator

  1. Enter the values for your problem into the input fields.
  2. Read the result — it updates instantly as you type.
  3. Check the formula and the visual explanation to follow how the answer was found.
  4. Copy the page URL to share the exact calculation.

Common examples

  • x ≡ 2 (mod 3), x ≡ 3 (mod 5), x ≡ 2 (mod 7) → x = 23 (mod 105)
  • x ≡ 1 (mod 4), x ≡ 2 (mod 5) → x = 17 (mod 20)
  • x ≡ 2 (mod 6), x ≡ 8 (mod 10) → x = 8 (mod 30), moduli not coprime
  • x ≡ 1 (mod 2), x ≡ 0 (mod 4) → no solution (incompatible)
  • x ≡ 0 (mod 3), x ≡ 0 (mod 4), x ≡ 0 (mod 5) → x = 0 (mod 60)

Frequently asked questions

How does the Chinese Remainder Theorem calculator work?

Enter your values and the calculator applies the exact mathematical method for this problem, showing the result together with the formula it used. Everything is computed with high-precision arithmetic, so the answer you see is not limited by ordinary floating-point rounding.

When would I use the Chinese Remainder Theorem calculator?

It is useful for homework and exam preparation, for checking work done by hand, and whenever a step in a larger problem needs this calculation done quickly and reliably.

How accurate are the results?

Calculations run at 30 significant digits of precision internally. Displayed values are rounded for readability, but the underlying result is far more precise than a typical hand or pocket-calculator computation.

Can I share a specific calculation with someone else?

Yes. Every value you enter updates the URL, so copying the address bar and sharing the link reopens the exact same calculation for whoever clicks it.