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.

Venn diagram. Factors of 12 only: 4 and 12. Factors of 18 only: 9 and 18. In the overlap, the common factors 1, 2, 3 and 6. The greatest common factor is 6.
The factors in the overlap are shared by 12 and 18. The largest one, 6, is the GCF.

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

  1. List every factor of each number.
  2. Circle the factors that appear in every list.
  3. The largest circled number is the GCF.

This works well for small numbers.

Method 2: Use prime factorization

  1. Write the prime factorization of each number.
  2. Find the primes that every number shares.
  3. For each shared prime, use the smaller exponent.
  4. 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

MistakeWhat it looks likeHow to fix it
Stopping at a common factor that isn’t the greatestGCF of 16 and 24 is 4Check every common factor. 8 also divides both, so the GCF is 8.
Finding a multiple instead of a factorGCF of 4 and 6 is 12The GCF can’t be bigger than the smaller number. The GCF of 4 and 6 is 2.
Multiplying all the primes2^4 \times 3^2 \times 5 for 48 and 180Use only the primes that both numbers share.
Using the bigger exponent2^4 \times 3^2 = 144Use the smaller exponent: 2^2 \times 3 = 12.
Saying the GCF is 0GCF of 14 and 15 is 01 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.

  1. 8 and 12
  2. 15 and 25
  3. 27 and 36
  4. 40 and 56
  5. 17 and 51
  6. 9 and 20
  7. 60 and 84
  8. 12, 30 and 48
  9. Use the GCF to write 32 + 40 as a product.
  10. 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
  1. The common factors are 1, 2 and 4, so the GCF is 4.
  2. The common factors are 1 and 5, so the GCF is 5.
  3. The common factors are 1, 3 and 9, so the GCF is 9.
  4. 40 = 2^3 \times 5 and 56 = 2^3 \times 7. They share 2^3, so the GCF is 8.
  5. 17 is prime, and 51 = 3 \times 17. The GCF is 17.
  6. 9 = 3^2 and 20 = 2^2 \times 5. They share no primes, so the GCF is 1.
  7. 60 = 2^2 \times 3 \times 5 and 84 = 2^2 \times 3 \times 7. The GCF is 2^2 \times 3 = 12.
  8. 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.
  9. The GCF of 32 and 40 is 8, so 32 + 40 = 8(4 + 5).
  10. 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

Similar Posts

  • Least Common Multiple

    The least common multiple (LCM) of two numbers is the smallest number that both of them divide into with no remainder. To find it, list the multiples of each number until you find one they share, or use prime factorization. For example, the LCM of 4 and 6 is 12. Before this lesson: You should…

  • Unit Rates

    A unit rate tells how much of one thing there is for exactly 1 unit of another, like 60 miles per hour or $3 per pound. To find a unit rate, divide the first amount by the second amount. For example, $12 for 4 pounds of apples is 12 ÷ 4 = $3 per pound….

  • Operations with Decimals

    Operations with decimals work like whole-number math, with one extra step: placing the decimal point. To add or subtract, line up the decimal points. To multiply, multiply as usual, then count the decimal places in both numbers. To divide by a decimal, move both decimal points to the right until the divisor is a whole…

  • Square Root

    A square root of a number is a value that you multiply by itself to get that number. The square root of 25 is 5, because . We write this as . You can find exact square roots of perfect squares and estimate all the others. Before this lesson: You should know what squaring means…