GCF Calculator
The greatest common factor (GCF) of two or more whole numbers is the largest number that divides each of them evenly. It is also called the greatest common divisor (GCD) or highest common factor (HCF). For 12 and 18, the common factors are 1, 2, 3 and 6, so the GCF is 6.
Worked example
180 = 3 × 48 + 36. 48 = 1 × 36 + 12. 36 = 3 × 12 + 0. The last non-zero remainder is 12.
GCF(48, 180) = 12. The common factors are 1, 2, 3, 4, 6 and 12. Check: 48 ÷ 12 = 4 and 180 ÷ 12 = 15.
Smaller case: the common factors of 12, 18 and 24 are 1, 2, 3 and 6, so GCF(12, 18, 24) = 6.
How the Euclidean algorithm works
Divide the larger number by the smaller one and keep the remainder. Then divide the previous divisor by that remainder, and keep going until the remainder is 0. The last non-zero remainder is the GCF. It works because any common factor of the two numbers also divides every remainder along the way, so nothing is lost in the chain.
For the example above, the chain is 180 = 3 × 48 + 36, then 48 = 1 × 36 + 12, then 36 = 3 × 12 + 0. The remainder hits 0 after 12, so 12 is the GCF.
Where the GCF shows up
Simplifying fractions: 48/180 simplifies by its GCF, 12, to 4/15, and 4/15 cannot be reduced further. Splitting things into equal groups: 48 pencils and 180 erasers split into the largest equal groups with nothing left over make 12 groups of 4 pencils and 15 erasers.
Frequently asked questions
What is the GCF of 12 and 18?
6. The common factors are 1, 2, 3 and 6.
What is the GCF of 48 and 180?
12. The Euclidean steps are 180 = 3 × 48 + 36, 48 = 1 × 36 + 12, 36 = 3 × 12 + 0.
Can the GCF be 1?
Yes. When numbers share no factor besides 1, the GCF is 1. That is the case for 17 and 23, which are both prime.
What is the difference between GCF and LCM?
The GCF is the largest number that divides both; the LCM is the smallest number both divide into. For 12 and 18, the GCF is 6 and the LCM is 36.
Is the GCF ever bigger than the smallest number?
No. The GCF cannot be larger than the smallest number in your list, because it has to divide that number. It equals the smallest number when that number divides all the others: the GCF of 6 and 12 is 6.
Sources
Math is Fun: Greatest Common Factor covers the factor-listing method, the Euclidean approach and fraction simplification.