If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Lesson 11: Greatest common factor

# Greatest common factor explained

The greatest common divisor (GCD) and greatest common factor (GCF) are the same thing. To find the GCD/GCF of two numbers, list their factors, identify the common factors, and choose the largest one. For example, the GCD/GCF of 12 and 8 is 4. Numbers with a GCD/GCF of 1 are called relatively prime. Created by Sal Khan.

## Want to join the conversation?

• What about bigger numbers like 118 and 204
• For bigger numbers, you definitely want to use the Euclidean algorithm, which is an easier and faster way to find the answer. For example:

gcd( 118, 204 )
= gcd ( 118, 204 - 118 )
= gcd ( 118, 86 )
= gcd ( 118 - 86, 86 )
= gcd ( 32, 86 )
= gcd ( 32, 86 - 32 )
= gcd ( 32, 54 )
= gcd ( 32, 54 - 32 )
= gcd ( 32, 22 )
= gcd ( 10, 22 )
= gcd ( 10, 2 )
= 2

The simplest variant of the Euclidean algorithm is to keep subtracting the smaller number from the bigger number until you find a problem easy enough that you know the answer to it. And the answer to that easier problem is the same as the answer to your harder problem.
• Does 0 have a GCD?
• No, that concept is only used for non-zero integers and polynomials. GCD/GCF is also a property of two numbers not of only one.
• I need to know how to do it with bigger number that's what I do in the exercise.
• If you have to find the GCD of bigger numbers, the fastest way is factoring and comparing the factors: If one or both numbers are prime, then your job is very fast.
Let's say you have 318 and 492
Start dividing by the lowest possible prime numbers like 2 and 3 and 5
318(2
159(3
53 --prime
so the factors of 318 are `2` `3` `53`
492(2
246(2
123(3
41 -- prime
so the factors are `2` `2` `3` `41`
Line up the factors
`2` `3` `53`
`2` `2` `3` `41`
both have `2` `3`
so the greatest common divisor of 492 and 318 will be `2 times 3` or 6
A shortcut is to refer to a table of factors and primes which will often give you the results of big numbers as
928 = 2⁵∙29
1189 = 29∙41
You can quickly see that the common factor is 29
so the GCD(928,1189) = 29
• ls there any numer that has the factors 1 2 3 4 5 6 7 8 and 9
• There can be more, of course, if you multiply 2/3/4/5/6/7/8/9 to 362880.
• Is GCM a concept in math? I don't know if my teacher said that accidentally instead of GCF.
• There shouldn't be "GCM" in math because multiples for values can go on and on forever; all you have to do is keep multiplying the numbers you have by common values.
However, there is certainly the concept and use of GCFs. They are the greatest common factor that divides two numbers, and one use is to simplify fractions. There are also "LCMs" (Least common multiples), and when you add or subtract fractions, you can find an LCM for a smaller value (instead of having to multiply everything together and get very large products for your numerator and denominator).

[R]
• I don't get it. What is the difference between GCD and GCF?
• They are the same
• I'm not really shore what is the difference of (GCD) and (GCF)?
• There isn't much of a difference. GCF, which stands for "Greatest common factor", is the largest value of the values you have, that multiplied by whole number is able to "step onto both".
For example, the GCF of 27 and 30 is 3, since if you add 3 repeatedly, it will equal 27 after it is added 9 times and equal 30 after adding 3 10 times.
On the other hand, 15 is not a common factor because though 15+15=30, 15 "skips over" 27. 9 is not a common factor because while adding 9 three times will equal 27, 9 will "skip over" 30 (jump from 27 to 36).
GCD stands for "Greatest common denominator". This is used when you are working with fractions and want to simplify them and find a common denominator so you can add and/or subtract them.