Free Math Guide

Greatest Common Factor Explained

Learn how to find the greatest common factor by listing factors, comparing prime factorizations, matching repeated shared primes, and multiplying the common factors.

The greatest common factor, or GCF, is the largest positive whole number that divides two or more numbers evenly. You can find it by listing all factors, but prime factorization gives a more organized method that works especially well with larger numbers and repeated factors.

The Basic Idea

What Is the Greatest Common Factor?

The greatest common factor is the largest positive whole number that divides two or more numbers without leaving a remainder.

GCF(24, 36) = 12

Common

The number must be a factor of both original numbers.

Greatest

Of all the shared factors, choose the largest one.

Check the Result

Since 24 ÷ 12 = 2 and 36 ÷ 12 = 3, the number 12 divides both numbers evenly. No larger positive whole number divides both.

Example: GCF of 18 and 30

The common factors of 18 and 30 are 1, 2, 3, and 6.

GCF(18, 30) = 6

Compare the Factor Lists

Factors and Common Factors

A factor divides a number evenly. A common factor divides every number being compared evenly.

Factors of 24

1, 2, 3, 4, 6, 8, 12, 24

Factors of 36

1, 2, 3, 4, 6, 9, 12, 18, 36

Common factors: 1, 2, 3, 4, 6, 12

The greatest of these shared factors is 12.

GCF(24, 36) = 12

Do Not Choose the First Shared Factor

Two numbers often have several common factors. The GCF is the largest one, not simply the first common factor you notice.

Method 1

Find the GCF by Listing All Factors

For smaller numbers, you can list every factor of both numbers and choose the largest factor they share.

1

List the First Number's Factors

Write every positive whole number that divides the first number evenly.

2

List the Second Number's Factors

Write every positive whole number that divides the second number evenly.

3

Find the Common Factors

Identify the numbers that appear in both lists.

4

Choose the Greatest

Select the largest number in the shared list.

Worked Example: GCF of 16 and 28

Factors of 16

1, 2, 4, 8, 16

Factors of 28

1, 2, 4, 7, 14, 28

Common factors: 1, 2, 4

The greatest shared factor is 4.

GCF(16, 28) = 4

When Is This Method Useful?

Listing factors works well when the numbers are relatively small. For larger numbers, prime factorization is usually faster and more organized.

Method 2

Find the GCF Using Prime Factorization

Prime factorization rewrites each number as a product of prime numbers. Then you match the prime factors that appear in both factorizations.

1

Prime Factorize Both Numbers

Continue factoring until every factor in both products is prime.

2

Match Shared Prime Factors

Pair each prime in the first factorization with one equal prime in the second factorization.

3

Ignore Unmatched Factors

Prime factors that appear in only one number do not belong in the GCF.

4

Multiply the Shared Factors

The product of all matched prime factors is the greatest common factor.

Worked Example: GCF of 48 and 60

48 =
2 × 2 × 2 × 2 × 3
60 =
2 × 2 × 3 × 5

Shared prime factors: 2 × 2 × 3

Multiply the shared factors: 2 × 2 × 3 = 12.

GCF(48, 60) = 12

Why This Method Works

Every factor of a number is built from its prime factors. By taking every prime copy shared by both numbers, you build the largest possible product that divides both numbers.

Match Each Copy

Repeated Shared Prime Factors

When a prime appears more than once, each copy must be matched separately. Use only as many copies as both numbers contain.

Example: GCF of 72 and 120

72 =
2 × 2 × 2 × 3 × 3
120 =
2 × 2 × 2 × 3 × 5

Shared prime factors: 2 × 2 × 2 × 3

There are three shared copies of 2 and one shared copy of 3.

GCF(72, 120) = 24

Use the Smaller Number of Copies

If one number contains four copies of 2 and the other contains three copies, only three copies of 2 are shared.

Exponent Shortcut

48 = 2⁴ × 3
60 = 2² × 3 × 5

For each shared prime, use the smaller exponent.

GCF = 2² × 3 = 12

Coprime Numbers

When Is the GCF Equal to 1?

If two numbers share no prime factors, their only common factor is 1. These numbers are called relatively prime or coprime.

Example: GCF of 20 and 27

20 =
2 × 2 × 5
27 =
3 × 3 × 3

Shared prime factors: none

GCF(20, 27) = 1

A GCF of 1 Does Not Mean No Common Factor

Every pair of positive whole numbers shares the factor 1. A GCF of 1 means they share no factor greater than 1.

Practice Examples

Step-by-Step Greatest Common Factor Examples

The best way to become comfortable finding the greatest common factor is to work through several examples.

Example 1

GCF(18, 24)
  1. 18 = 2 × 3 × 3
  2. 24 = 2 × 2 × 2 × 3
  3. Shared prime factors: 2 × 3
  4. 2 × 3 = 6
GCF = 6

Example 2

GCF(45, 75)
  1. 45 = 3 × 3 × 5
  2. 75 = 3 × 5 × 5
  3. Shared prime factors: 3 × 5
  4. 3 × 5 = 15
GCF = 15

Example 3

GCF(54, 90)
  1. 54 = 2 × 3 × 3 × 3
  2. 90 = 2 × 3 × 3 × 5
  3. Shared prime factors: 2 × 3 × 3
  4. 2 × 3 × 3 = 18
GCF = 18

Example 4

GCF(35, 64)
  1. 35 = 5 × 7
  2. 64 = 2 × 2 × 2 × 2 × 2 × 2
  3. No shared prime factors
  4. GCF = 1
GCF = 1

Avoid These Errors

Common Greatest Common Factor Mistakes

Mistake 1: Matching Too Many Copies

48 = 2 × 2 × 2 × 2 × 3
60 = 2 × 2 × 3 × 5

❌ Matching four copies of 2
✔ Only match two copies of 2 because the second number only contains two.

Mistake 2: Using Factors That Aren't Prime

24 = 4 × 6
✔ Continue factoring: 24 = 2 × 2 × 2 × 3

Mistake 3: Multiplying Every Factor

Using every prime from both factorizations.
✔ Multiply only the shared prime factors.

Mistake 4: Forgetting That 1 Is Always Common

Every pair of positive whole numbers has at least one common factor: 1. When no prime factors are shared, the GCF is 1.

Why It Matters

Where You'll Use the Greatest Common Factor

Finding the greatest common factor is an important skill that appears throughout middle school, high school, and college mathematics.

Simplifying Fractions

Divide both the numerator and denominator by their greatest common factor to write the fraction in simplest form.

Factoring Algebraic Expressions

Before factoring polynomials, you first factor out the greatest common factor.

Equal Groups

The GCF helps divide objects into the largest equal groups without any leftovers.

Number Theory

Greatest common factors are closely connected to prime factorization, least common multiples, and divisibility rules.

Quick Review

Greatest Common Factor Checklist

✓ Prime Factorize
Rewrite every number as a product of prime numbers.
✓ Match Shared Factors
Match every shared prime factor one copy at a time.
✓ Ignore Extras
Prime factors that appear in only one number do not belong in the GCF.
✓ Multiply
Multiply all shared prime factors together.
✓ Coprime Numbers
If no prime factors are shared, the GCF is 1.

Ready to Practice?

Work through interactive greatest common factor problems with instant feedback, hints, and step-by-step guidance.

Practice Greatest Common Factors