Chinese Remainder Theorem Calculator
Enter two or three congruences to find the unique solution modulo the product of the moduli.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
The Chinese Remainder Theorem says that if you know the remainder of an unknown number x when divided by several moduli that are pairwise coprime (no two of them share a common factor), then there is exactly one value of x, modulo the product of all those moduli, that satisfies every congruence x ≡ r (mod m) simultaneously. The theorem takes its name from an old Chinese mathematics text that posed the puzzle of counting a group of soldiers using their remainders when lined up in rows of different sizes.
Beyond the classic puzzle, CRT is genuinely load-bearing in modern computing: RSA implementations use it to speed up private-key decryption by working modulo each prime factor separately and recombining the results, and it underlies calendar arithmetic, certain error-detecting codes, and hashing schemes that split a large modulus into smaller coprime pieces.
This calculator takes two or three congruences x ≡ r (mod m), checks that the moduli are pairwise coprime, and returns the unique solution modulo their product — along with the working so you can see how it was combined.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)