Math calculator

Chinese Remainder Theorem Calculator

Combine two compatible congruences into one residue class modulo their least common multiple. Formula and combined congruence remain visible in one place for independent verification.

Chinese Remainder Theorem inputs

Calculation inputs

The mathematical idea behind Chinese Remainder Theorem

Two congruences can be combined when their remainder difference is divisible by the GCF of the moduli. Coprime moduli always satisfy the compatibility requirement.

Check Chinese Remainder Theorem from First remainder, then verify First modulus. Estimate the Chinese Remainder Theorem Combined congruence before computing it again. If Second remainder changes during Chinese Remainder Theorem, keep First modulus fixed. That Chinese Remainder Theorem comparison shows whether Combined congruence moves as expected.

A scratch-paper check for Chinese Remainder Theorem

Write x=r1+n1k, substitute into the second congruence, solve for k, and normalize the resulting x modulo lcm(n1,n2).

When to reach for Chinese Remainder Theorem

CRT reconstruction joins independent cycles, calendar-like schedules, residue representations, and modular data.

Before accepting the Chinese Remainder Theorem result

An impossible combined congruence sign or magnitude should prompt a Chinese Remainder Theorem input review before rounding.

Reproducing Chinese Remainder Theorem later

Saving enough detail for Chinese Remainder Theorem

Link First remainder to its Chinese Remainder Theorem role. Link First modulus to its Chinese Remainder Theorem role. The retained Chinese Remainder Theorem formula identifies the Chinese Remainder Theorem model.

The Chinese Remainder Theorem meaning depends on First remainder. The Chinese Remainder Theorem meaning also depends on First modulus. Carry those Chinese Remainder Theorem roles into any later Chinese Remainder Theorem work.

x≡2 mod3 and x≡3 mod5 combine to x≡8 mod15, since 8 leaves the required two remainders. This Chinese Remainder Theorem example can be compared with linear congruence.

Positive moduli are required. Non-coprime moduli can still work, but incompatible remainders produce no solution. If the Chinese Remainder Theorem assumptions do not fit, consider combined modulus.

An independent Chinese Remainder Theorem check

Substitute the Chinese Remainder Theorem solution into First remainder. This Chinese Remainder Theorem check rejects false Chinese Remainder Theorem branches and forbidden denominators.

Choose an easy First remainder value before running Chinese Remainder Theorem. Predict First modulus, then compare it with the Chinese Remainder Theorem output.

Questions about Chinese Remainder Theorem

Must the moduli be coprime?

No, but non-coprime systems must be compatible.

What is the combined modulus?

The LCM of the two moduli.

Are there infinitely many integer solutions?

Yes, all separated by the combined modulus.

How do I verify the answer?

Take it modulo each original modulus.