Math

How to Find the Greatest Common Factor (With Examples)

Three ways to find the greatest common factor, worked examples for two and three numbers, when to use each method, and the slips that lead to wrong answers.

GCF Calculator topic photo

What the greatest common factor is

A factor of a number divides it with no remainder. The factors of 12 are 1, 2, 3, 4, 6 and 12. The greatest common factor of a set of numbers is the biggest number that's a factor of all of them.

Two things have to be true of your answer. It has to divide every number, and nothing larger can do the same. Plenty of numbers pass the first test. For 12 and 18, both 2 and 3 divide both numbers, but neither is the GCF, because 6 does too.

Method 1: list the factors

Write every factor of each number and circle the biggest one they share. For 16 and 40, the factors of 16 are 1, 2, 4, 8, 16 and the factors of 40 are 1, 2, 4, 5, 8, 10, 20, 40. The largest shared factor is 8.

Find factors in pairs so you don't miss any: 1 x 40, 2 x 20, 4 x 10, 5 x 8. Once the pairs meet in the middle you're done. This works well up to about 50. Past that, the lists get long and it's easy to skip one.

Method 2: prime factorization

Break each number into primes. Keep only the primes that appear in every number, and use the lowest power each one reaches. Multiply what's left.

Try 36 and 60. That's 2^2 x 3^2 and 2^2 x 3 x 5. Both have 2^2. Both have 3, and the lower power is 3^1. The 5 only appears in 60, so it's out. The GCF is 4 x 3 = 12. This method also shows you why the answer is right, which teachers usually want to see.

Formula notes

  • GCF = product of the shared primes, each at its lowest power

Method 3: the Euclidean algorithm

This is the fastest by hand once numbers get big, and it's what computers use. Divide the bigger number by the smaller one and note the remainder. Then divide the smaller number by that remainder. Keep going until the remainder is zero. The last number you divided by is the GCF.

For 56 and 98: 98 = 1 x 56 + 42, then 56 = 1 x 42 + 14, then 42 = 3 x 14 + 0. The GCF is 14. No factor lists and no prime trees, just three divisions. It works because any number that divides both 98 and 56 also divides their difference, and so it divides the remainder too.

Formula notes

  • GCF(a, b) = GCF(b, a mod b)

Picking a method

For two small numbers, listing factors is quick and hard to get wrong. For three or more numbers, prime factorization handles them all at once. For two big numbers, use the Euclidean algorithm. You can also mix them: find the GCF of the first pair any way you like, then carry it into the next number.

When you want to check homework, our GCF calculator shows the shared prime powers and the Euclidean steps side by side, so you can see where your work splits from the right answer.

Common mistakes

The classic slip is using the highest power of each prime. That's the rule for the least common multiple. For the GCF it's always the lowest power, and only for primes that every number has.

A good habit: divide each number by your answer. If the results still share a factor bigger than 1, your GCF is too small. If any result isn't a whole number, it's too big or just wrong.

  • Taking the highest power of a prime instead of the lowest
  • Including a prime that only some of the numbers have
  • Stopping at a common factor like 2 without checking for a bigger one
  • Mixing up the GCF with the LCM in word problems

Frequently asked questions

What is the GCF of 36 and 60?

It's 12. In primes, 36 is 2^2 x 3^2 and 60 is 2^2 x 3 x 5. The shared part at the lowest powers is 2^2 x 3 = 12.

Why do you use the lowest power for the GCF?

Because the GCF has to divide every number. If one number only has 3^1, a higher power of 3 wouldn't divide it.

How do I know if a word problem wants the GCF or the LCM?

If you're splitting things into the biggest equal groups, it's the GCF. If you're waiting for repeating events to line up, it's the LCM.

Which GCF method is fastest for large numbers?

The Euclidean algorithm. It needs only repeated division, so you never have to factor the numbers.

How can I check a GCF answer?

Divide each number by it. Every result should be a whole number, and those results should share no factor other than 1.

References

These sources support the method or guidance used for GCF Calculator. Verify time-sensitive rules at the source.

Try the calculator

Open GCF Calculator, enter your scenario, and compare its supporting rows with this guide's method and checks.

Open GCF Calculator