Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
Two numbers are relatively prime (or coprime) if they share no common factor other than 1 — that is, their greatest common divisor (GCD) is 1. This tool checks this using the Euclidean algorithm and shows every division step.
How it works
The Euclidean algorithm repeatedly replaces the larger of the two numbers with the remainder of dividing it by the smaller, until the remainder reaches 0. The last non-zero remainder is the GCD — if that GCD equals 1, the numbers are relatively prime.
- Enter number A.
- Enter number B.
- Click Calculate to see your results.
Examples
Two coprime numbers
14 and 15 are relatively prime, since gcd(14, 15) = 1, even though neither number is itself prime.
Who should use it
- Number theory and cryptography coursework requiring coprime checks.
- Simplifying fractions (a fraction is fully reduced exactly when its numerator and denominator are relatively prime).
Industry applications
- Cryptography (e.g. RSA key generation requires coprime checks)
- Mathematics education (number theory)
Advantages
- Shows the complete Euclidean algorithm working, not just a yes/no answer.
- Clearly reports the GCD alongside the coprime determination.
Limitations
- Only checks pairs of numbers — not larger sets for pairwise coprimality all at once (see the Chinese Remainder Theorem Calculator for that context).
Common mistakes to avoid
- Assuming two numbers must individually be prime numbers to be relatively prime to each other — that's not the requirement.
Best practices
- To determine if two numbers are coprime, always run the actual Euclidean algorithm (or check the GCD) rather than trying to eyeball shared factors, especially for larger numbers.
Tips
- A fraction is in lowest terms exactly when its numerator and denominator are relatively prime — this tool doubles as a way to verify that.