Relatively Prime Calculator

Relatively Prime Calculator

Check whether two whole numbers are relatively prime by finding their greatest common divisor.

Last updated: June 2026 | By Patchworkr Team

Calculation steps
Compute gcd(8, 15) = 1.
A gcd of 1 means the numbers are relatively prime.
GCD result
These numbers are relatively prime.
Greatest common divisor
1

What Does Relatively Prime Mean?

Two numbers are relatively prime when their greatest common divisor is 1. That means they share no positive factor other than 1.

How To Check Coprime Numbers

  1. Take the absolute value of both numbers.
  2. Find their greatest common divisor.
  3. If the gcd is 1, the numbers are relatively prime.
  4. If the gcd is greater than 1, they are not relatively prime.
gcd(a, b) = 1

Worked Example

The numbers 8 and 15 are relatively prime because gcd(8, 15) = 1.

gcd(8, 15) = 1
Therefore, 8 and 15 are relatively prime.

Frequently Asked Questions

Can negative numbers be relatively prime?

Yes. Only the absolute values matter when checking the gcd.

Is 1 relatively prime to every number?

Yes, because gcd(1, n) = 1 for any integer n.

Does the order of the numbers matter?

No. The gcd is the same either way.

Does this tool support decimals?

No. It is designed for whole-number inputs only.

Related Tools