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⁡(6,  10,  15)\gcd\left(6,\; 10,\; 15\right)

Mutually coprime (gcd⁡1), but not pairwise coprime\displaystyle \text{Mutually coprime } (\gcd 1)\text{, but not pairwise coprime}

Greatest common divisor

1\displaystyle 1

Least common multiple

30\displaystyle 30
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⁡(6,  10,  15)=?1\gcd\left(6,\; 10,\; 15\right) \overset{?}{=} 1
  2. Greatest common divisor of the whole list

    Find the gcd of the first two numbers, then the gcd of that result with the next number, and so on down the list.

    gcd⁡(6,10)=2gcd⁡(2,15)=1\begin{array}{l} \gcd\left(6, 10\right) = 2 \\ \gcd\left(2, 15\right) = 1 \end{array}
  3. Pairwise coprime means every pair is coprime

    The list can have gcd 1 as a whole and still have a pair of numbers that share a factor. Numbers are pairwise coprime when every pair has gcd 1.

    gcd⁡(6,10)=2gcd⁡(6,15)=3gcd⁡(10,15)=5\begin{array}{l} \gcd\left(6, 10\right) = 2 \\ \gcd\left(6, 15\right) = 3 \\ \gcd\left(10, 15\right) = 5 \end{array}
  4. Result

    Mutually coprime (gcd 1), but not pairwise coprime.

Worked examples