Relatively Prime Calculator

Enter whole numbers to test whether they are coprime.

2 to 10 whole numbers of 1 or more, separated by commas.

Try

Result

You enteredgcd⁡(8,  15)\gcd\left(8,\; 15\right)

Yes, gcd⁡(8,  15)=1\displaystyle \text{Yes, } \gcd\left(8,\; 15\right) = 1

Greatest common divisor

1\displaystyle 1

Least common multiple

120\displaystyle 120
Show the work
  1. Coprime numbers share no prime factor

    Numbers are relatively prime (coprime) when no whole number bigger than 1 divides all of them, which means their greatest common divisor is 1.

    Using gcd⁡(a,b)=1\gcd(a, b) = 1

    gcd⁡(8,  15)=?1\gcd\left(8,\; 15\right) \overset{?}{=} 1
  2. Euclidean algorithm

    Divide the larger number by the smaller and keep the remainder; repeat with the smaller number and the remainder. The last non-zero remainder is the greatest common divisor.

    15=1×8+78=1×7+17=7×1+0\begin{array}{l} 15 = 1 \times 8 + 7 \\ 8 = 1 \times 7 + 1 \\ 7 = 7 \times 1 + 0 \end{array}
  3. Result

    Yes, gcd(8, 15) = 1.

Worked examples