Chinese Remainder Theorem Calculator

Your details

How many simultaneous modular equations to solve.
The remainder for the first congruence: x ≡ a₁ (mod n₁).
The modulus for the first congruence (must be an integer >= 2).
The remainder for the second congruence: x ≡ a₂ (mod n₂).
The modulus for the second congruence.
The remainder for the third congruence.
The modulus for the third congruence.
Smallest solution x
58

The unique non-negative integer less than the modulus that satisfies every congruence.

Period (modulus N)60
General solutionx = 58 + k * 60 (k = 0, 1, 2, ...)
Next solution118
StatusUnique solution mod 60: x = 58
Smallest solution (x)58
Period (N)60
Next solution (x + N)118

Solution: x ≡ 58 (mod 60)

  • The smallest non-negative solution is x = 58.
  • The solution repeats every 60 integers, so the next solution is 118, then 178, and so on.
  • All moduli are pairwise coprime, so the period equals their product (3 x 4 x 5 = 60), and the solution is unique mod 60.

Next stepVerify by substituting x = 58 into each congruence: the remainder must match what you entered.

= Powered by OnlyCalculators