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⁡(3,  5,  7)\gcd\left(3,\; 5,\; 7\right)

Pairwise coprime\displaystyle \text{Pairwise coprime}

Greatest common divisor

1\displaystyle 1

Least common multiple

105\displaystyle 105
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⁡(3,  5,  7)=?1\gcd\left(3,\; 5,\; 7\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⁡(3,5)=1gcd⁡(1,7)=1\begin{array}{l} \gcd\left(3, 5\right) = 1 \\ \gcd\left(1, 7\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⁡(3,5)=1gcd⁡(3,7)=1gcd⁡(5,7)=1\begin{array}{l} \gcd\left(3, 5\right) = 1 \\ \gcd\left(3, 7\right) = 1 \\ \gcd\left(5, 7\right) = 1 \end{array}
  4. Result

    Pairwise coprime.

Worked examples