Check whether two integers are relatively prime using gcd
First integer
Second integer
Result
Answer
Step-by-Step Derivation
Coprime Number Formula
a and b are coprime if gcd(a, b) = 1
Euclidean algorithm: gcd(a, b) = gcd(b, a mod b)
Two numbers are coprime when they share no common factor greater than 1. The Euclidean algorithm repeatedly replaces a pair by the smaller number and the remainder until the remainder becomes zero.
⚠Use nonzero integers. Negative signs do not affect coprime status because gcd uses absolute values.
What Are Coprime Numbers?
Coprime numbers, also called relatively prime numbers, are pairs of integers whose greatest common divisor is 1. They do not need to be prime individually; only their shared factors matter.
GCD Test
The entire decision is based on whether the greatest common divisor equals 1.
Not Both Prime
Composite numbers can still be coprime if they share no factor.
Euclidean Steps
Repeated remainders give a fast and exact gcd calculation.
Why It Matters
Coprime pairs allow modular inverses and reduced fractions.
Example: For 35 and 64, the Euclidean algorithm gives gcd(64,35)=gcd(35,29)=gcd(29,6)=gcd(6,5)=gcd(5,1)=1, so they are coprime.
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.