GCF calculator

Enter two or more whole numbers. You get the largest number that divides them all, and every factor they have in common.

Your answer

Greatest common factor42
Common factors1, 2, 3, 6, 7, 14, 21, 42

Worked out in your browser. Nothing you type is sent to a server.

How we worked it out

Updated as you change the numbers.

  1. 84 = 0 × 126 + 84
  2. 126 = 1 × 84 + 42
  3. 84 = 2 × 42 + 0
  4. GCF(84, 126) = 42. Repeat with each further number.

Method and assumptions

Euclid’s algorithm replaces the larger number by the remainder of dividing it by the smaller until the remainder is zero; the last non-zero remainder is the GCF. For more numbers, GCF(a, b, c) = GCF(GCF(a, b), c). The common factors are the factors of the GCF.

Questions

What is the GCF of 84, 126 and 210?

42.

Sources

Method and figures checked on . Every worked answer on this page is covered by an automated test. Found a mistake? Tell us.

Embed this calculator on your site

Free to use. Paste this where you want the calculator; it runs in your visitors’ browsers, sets no cookies and sends nothing to us.

Related calculators