Relatively Prime Calculator
Check whether two integers are coprime by calculating their greatest common divisor with the Euclidean algorithm.
About relatively prime numbers
Relatively prime examples
The greatest common divisor determines every answer.
| Integer pair | Result | Reason |
|---|---|---|
| 14 and 25 | Relatively prime | Their greatest common divisor is 1. |
| 18 and 24 | Not relatively prime | Both numbers are divisible by 6. |
| 35 and 64 | Relatively prime | They have no common prime factor. |
| 0 and 1 | Relatively prime | The greatest common divisor of 0 and 1 is 1. |
How to check if numbers are relatively prime
- Enter the first integer, including a negative sign if applicable.
- Enter the second integer.
- Select Check relative primality.
- Confirm whether the displayed greatest common divisor equals one.
Relatively prime calculator FAQ
Do both numbers have to be prime?
No, relative primality only means the two numbers share no factor greater than one. Two composite numbers such as 8 and 15 can therefore be relatively prime.
Are consecutive integers always relatively prime?
Yes, any common divisor would have to divide their difference of one. Therefore every pair of consecutive integers has a greatest common divisor of one.
Is 1 relatively prime to every integer?
Yes, the only positive factor of 1 is 1 itself. Consequently its greatest common divisor with every integer is 1.
Can zero be relatively prime to another number?
Zero is relatively prime to 1 and negative 1 because those pairs have greatest common divisor 1. With any other integer, the greatest common divisor has a magnitude greater than one.
Why are coprime numbers useful?
They identify fully reduced fractions and guarantee modular inverses in many settings. This relationship is also fundamental to number theory and cryptographic algorithms.