Relatively Prime Calculator

Enter two positive integers into Number 1 and Number 2 to check whether they are relatively prime (coprime). The Relatively Prime Calculator computes the GCD, lists all factors of each number, and tells you instantly whether the two numbers share no common factors other than 1.

Enter a positive whole number

Enter a positive whole number

Results

Are They Relatively Prime?

--

Greatest Common Divisor (GCD)

--

Least Common Multiple (LCM)

--

Factors of Number 1

--

Factors of Number 2

--

Number of Factors Comparison

Results Table

Frequently Asked Questions

What does relatively prime (coprime) mean?

Two numbers are relatively prime, or coprime, if their only common factor is 1. This means they share no prime factors. For example, 14 and 15 are coprime because 14 = 2 × 7 and 15 = 3 × 5 — no shared prime factors.

How do you calculate whether two numbers are relatively prime?

Find the Greatest Common Divisor (GCD) of the two numbers using the Euclidean algorithm. If GCD = 1, the numbers are relatively prime. If GCD > 1, they share a common factor and are not coprime.

Are 42 and 75 relatively prime?

No. The GCD of 42 and 75 is 3, since both are divisible by 3 (42 = 2 × 3 × 7 and 75 = 3 × 5²). Because they share the factor 3, they are not coprime.

Can two even numbers be coprime?

No. Two even numbers always share 2 as a common factor, so their GCD is at least 2. This means no pair of even numbers can be relatively prime.

Is 1 relatively prime to any number?

Yes. The number 1 is coprime with every positive integer because its only factor is 1 itself. So GCD(1, n) = 1 for any positive integer n.

Do relatively prime numbers have to be prime numbers themselves?

No. Relatively prime numbers do not need to be prime individually. For example, 8 and 9 are coprime (GCD = 1) even though neither is a prime number.

What is the relationship between GCD and LCM for coprime numbers?

For any two positive integers a and b, the product of their GCD and LCM equals a × b. When two numbers are coprime (GCD = 1), their LCM equals simply their product: LCM(a, b) = a × b.

How is the coprime concept useful in fractions?

A fraction is in its simplest form when its numerator and denominator are coprime. For example, 6/10 simplifies to 3/5 because dividing both by GCD(6,10) = 2 yields a coprime pair.

More Math Tools