Greatest Common Factor
The greatest common factor (GCF) of two numbers is the largest number that divides both of them with no remainder. To find it, list the factors of each number, or use prime factorization. Then pick the biggest factor they share. For example, the GCF of 12 and 18 is 6.
Before this lesson: You should know how to find factors and how to write a prime factorization.
What Is the Greatest Common Factor?
A common factor is a factor that two or more numbers share. Here are the factors of 12 and 18:
- Factors of 12: 1, 2, 3, 4, 6, 12
- Factors of 18: 1, 2, 3, 6, 9, 18
The numbers in both lists are 1, 2, 3 and 6. These are the common factors. The greatest one is 6, so the GCF of 12 and 18 is 6.
The GCF is also called the greatest common divisor (GCD) or the highest common factor (HCF). All three names mean the same thing.
How to Find the Greatest Common Factor
Method 1: List the factors
- List every factor of each number.
- Circle the factors that appear in every list.
- The largest circled number is the GCF.
This works well for small numbers.
Method 2: Use prime factorization
- Write the prime factorization of each number.
- Find the primes that every number shares.
- For each shared prime, use the smaller exponent.
- Multiply those primes. The product is the GCF.
This method is faster for big numbers, because you don’t have to list every factor.
Worked Examples
Example 1: List the factors
Find the GCF of 16 and 24.
Step 1. List the factors. Factors of 16: 1, 2, 4, 8, 16. Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24.
Step 2. The common factors are 1, 2, 4 and 8.
Answer: The GCF of 16 and 24 is 8.
Example 2: Use prime factorization
Find the GCF of 48 and 180.
Step 1. Write each prime factorization.
\begin{aligned}
48 &= 2^4 \times 3 \\
180 &= 2^2 \times 3^2 \times 5
\end{aligned}Step 2. Both numbers share the primes 2 and 3. The number 5 is only in 180, so leave it out.
Step 3. Use the smaller exponent for each shared prime. For 2, that is 2^2. For 3, that is 3^1.
2^2 \times 3 = 4 \times 3 = 12
Answer: The GCF of 48 and 180 is 12.
Example 3: Three numbers
Find the GCF of 18, 30 and 42.
Step 1. Write each prime factorization: 18 = 2 \times 3^2, 30 = 2 \times 3 \times 5 and 42 = 2 \times 3 \times 7.
Step 2. All three share one 2 and one 3.
Answer: The GCF is 2 \times 3 = 6.
Example 4: No common prime factors
Find the GCF of 14 and 15.
Step 1. 14 = 2 \times 7 and 15 = 3 \times 5.
Step 2. They share no prime factors. The only factor they share is 1.
Answer: The GCF is 1. When the GCF of two numbers is 1, we say the numbers are relatively prime.
Example 5: Word problem
A florist has 24 red roses and 36 white roses. She wants to make identical bouquets with no roses left over. What is the greatest number of bouquets she can make? How many of each color go in each one?
Step 1. Each bouquet must get the same share of each color, so the number of bouquets must divide 24 and 36. The greatest such number is the GCF.
Step 2. The factors of 24 are 1, 2, 3, 4, 6, 8, 12, 24. The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36. The GCF is 12.
Step 3. Divide: 24 ÷ 12 = 2 red roses and 36 ÷ 12 = 3 white roses.
Answer: She can make 12 bouquets, each with 2 red roses and 3 white roses.
Common Mistakes
| Mistake | What it looks like | How to fix it |
|---|---|---|
| Stopping at a common factor that isn’t the greatest | GCF of 16 and 24 is 4 | Check every common factor. 8 also divides both, so the GCF is 8. |
| Finding a multiple instead of a factor | GCF of 4 and 6 is 12 | The GCF can’t be bigger than the smaller number. The GCF of 4 and 6 is 2. |
| Multiplying all the primes | 2^4 \times 3^2 \times 5 for 48 and 180 | Use only the primes that both numbers share. |
| Using the bigger exponent | 2^4 \times 3^2 = 144 | Use the smaller exponent: 2^2 \times 3 = 12. |
| Saying the GCF is 0 | GCF of 14 and 15 is 0 | 1 is a factor of every whole number, so the GCF is at least 1. |
Using the GCF
Simplifying fractions
Divide the top and bottom of a fraction by their GCF to write it in simplest form. The GCF of 18 and 24 is 6.
\frac{18}{24} = \frac{18 \div 6}{24 \div 6} = \frac{3}{4}You’ll practice this more in the Fractions lesson.
Factoring a sum
You can use the GCF to rewrite a sum as a product. The GCF of 36 and 48 is 12, so:
36 + 48 = 12 \times 3 + 12 \times 4 = 12(3 + 4)
This uses the distributive property, which you’ll use a lot in algebra.
Practice Problems
For problems 1–8, find the GCF.
- 8 and 12
- 15 and 25
- 27 and 36
- 40 and 56
- 17 and 51
- 9 and 20
- 60 and 84
- 12, 30 and 48
- Use the GCF to write 32 + 40 as a product.
- A teacher has 42 pencils and 56 erasers. She wants to make identical supply kits with nothing left over. What is the greatest number of kits she can make? What goes in each kit?
Show answers
- The common factors are 1, 2 and 4, so the GCF is 4.
- The common factors are 1 and 5, so the GCF is 5.
- The common factors are 1, 3 and 9, so the GCF is 9.
- 40 = 2^3 \times 5 and 56 = 2^3 \times 7. They share 2^3, so the GCF is 8.
- 17 is prime, and 51 = 3 \times 17. The GCF is 17.
- 9 = 3^2 and 20 = 2^2 \times 5. They share no primes, so the GCF is 1.
- 60 = 2^2 \times 3 \times 5 and 84 = 2^2 \times 3 \times 7. The GCF is 2^2 \times 3 = 12.
- 12 = 2^2 \times 3, 30 = 2 \times 3 \times 5 and 48 = 2^4 \times 3. All three share one 2 and one 3, so the GCF is 6.
- The GCF of 32 and 40 is 8, so 32 + 40 = 8(4 + 5).
- The GCF of 42 and 56 is 14. She can make 14 kits, each with 42 ÷ 14 = 3 pencils and 56 ÷ 14 = 4 erasers.
Greatest Common Factor FAQ
What is the GCF of two prime numbers?
If the two primes are different, their GCF is 1. For example, the GCF of 7 and 11 is 1.
Can the GCF be one of the numbers?
Yes. If the smaller number divides the larger one, the smaller number is the GCF. The GCF of 17 and 51 is 17.
Is GCF the same as GCD?
Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same idea.
What is the difference between the GCF and the LCM?
The GCF is the largest number that divides both numbers. The least common multiple (LCM) is the smallest number that both numbers divide into. The GCF is never bigger than the smaller number, and the LCM is never smaller than the larger number.
Summary
- The GCF is the largest factor that two or more numbers share.
- For small numbers, list the factors and pick the largest common one.
- For larger numbers, multiply the shared primes, using the smaller exponent of each.
- If two numbers share no primes, their GCF is 1.
- Use the GCF to simplify fractions and to split things into equal groups.
Previous lesson: Prime Factorization
Next lesson: Least Common Multiple
Back to the Pre-Algebra (Math Basics) Index
