GCF Calculator

Find the greatest common factor of a list of whole numbers.

Two or more, separated by commas or spaces

Try

Result

You enteredgcd⁡(1071,462)\gcd(1071, 462)

21\displaystyle 21

Using prime factors

1071=32×7×17,462=2×3×7×11\displaystyle 1071 = 3^{2} \times 7 \times 17, \quad 462 = 2 \times 3 \times 7 \times 11

LCM

23562\displaystyle 23562
Show the work
  1. Euclid's algorithm

    Here aa is the larger number, bb the smaller and rr the remainder when aa is divided by bb. Each line replaces the pair by bb and rr without changing the HCF, until the remainder is 00.

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

    1071=2×462+147462=3×147+21147=7×21+0\begin{gathered} 1071 = 2 \times 462 + 147 \\ 462 = 3 \times 147 + 21 \\ 147 = 7 \times 21 + 0 \end{gathered}
  2. Result

    So the highest common factor of 1071, 462 is 2121, the largest number that divides every one of them.

Worked examples