Matematicas
Instantáneo, privado y gratis
Chinese Remainder Theorem Calculator.
Solve two congruences with positive coprime moduli.
Introduce tus valores
Los resultados se actualizan al escribir.
Results update automatically as you type.
Use Cases
Solving Number Theory Problems
Use this calculator to quickly find solutions to systems of congruences, common in number theory and discrete math assignments.
Example: Find x such that x ≡ 2 (mod 3) and x ≡ 3 (mod 5).
Cryptography and Modular Arithmetic
In cryptography, the Chinese Remainder Theorem is used to speed up computations with large moduli. This tool helps verify steps in such algorithms.
Example: Solve x ≡ 1 (mod 7) and x ≡ 4 (mod 11) to check a CRT-based calculation.
Frequently Asked Questions
- What does the Chinese Remainder Theorem Calculator do?
- It solves a system of two linear congruences: x ≡ a₁ (mod m₁) and x ≡ a₂ (mod m₂), where m₁ and m₂ are positive and coprime. It returns the unique solution modulo m₁*m₂.
- What if the moduli are not coprime?
- The calculator requires positive coprime moduli. If they are not coprime, the system may have no solution or multiple solutions, which this calculator does not handle. Ensure m₁ and m₂ have no common divisor greater than 1.
- How is the solution expressed?
- The solution is given as x ≡ r (mod m₁*m₂), where r is the smallest non-negative integer satisfying both congruences. This represents all integers congruent to r modulo the product of the moduli.
Tips & Common Mistakes
Tips
- Ensure both moduli are positive integers and coprime (their greatest common divisor is 1).
- Enter remainders as integers; they can be negative, but the solution will be given as a non-negative residue modulo m₁*m₂.
- Double-check that you have entered the correct remainder for each modulus, as swapping them will yield a different solution.
- Use the result to verify your manual calculations or to explore how changing remainders affects the solution.
Common Mistakes to Avoid
- Entering moduli that are not coprime, which leads to an invalid or undefined result.
- Confusing the order of remainders and moduli, e.g., entering a₁ as m₁.
- Assuming the solution is unique without considering the modulus m₁*m₂; the solution is unique only modulo that product.
Last updated: August 13, 2026