On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Numbers & Quantities · Grade 6-8

Greatest Common Factor

The greatest common factor (GCF) of two or more numbers is the largest integer that divides all of them with no remainder.

GCF(a,b)×LCM(a,b)=a×b

Quick Answer

The greatest common factor (GCF) of two or more numbers is the largest integer that divides all of them with no remainder. Use it to simplify a fraction in one step, to split two amounts into the largest possible equal groups with nothing left over, or to factor the biggest common piece out of an expression like 12x+18. Find it by listing factors, or by taking the prime factors the numbers share: 24=23×3 and 36=22×32 share 22×3=12. The GCF is never larger than the smallest of the numbers.

Why This Matters

The GCF turns several steps into one. Dividing the top and bottom of 2436 by 12 gives 23 at once, instead of halving twice and then dividing by 3. It tells you the largest identical bundles you can make from two supplies, and it is how 12x+18 becomes 6(2x+3). Confusing it with the LCM gives an answer too large to divide either number.

Intuitive Explanation

You have 24 red beads and 36 blue beads and want to make identical bracelet kits with nothing left over. The number of kits must divide 24 and also divide 36. The common factors of 24 and 36 are 1, 2, 3, 4, 6 and 12, so you could make 2 kits, or 6, or 12. The greatest, 12, gives the most kits, each with 2 red and 3 blue beads.

Listing factors works for small numbers; prime factors scale better. Write 24=23×3 and 36=22×32. A common factor can use only primes that both numbers contain, and no more copies of each than the number with fewer: two 2s (24 has three, 36 has two) and one 3. That makes gcd⁡(24,36)=22×3=12. A useful check: after dividing, the quotients 2 and 3 share no factor except 1, so no bigger common factor exists.

The GCF is easy to swap with the least common multiple. The GCF divides into the numbers, so it is at most the smaller one: gcd⁡(24,36)=12. The LCM is what the numbers divide into, so it is at least the larger one: lcm(24,36)=72. Questions about cutting, sharing or simplifying want the GCF; questions about cycles lining up, or about a common denominator, want the LCM. The two are linked: 12×72=864=24×36.

Think of it like this. The GCF is the longest measuring stick that fits a whole number of times into two lengths. A 12 cm stick measures both 24 cm and 36 cm exactly, 2 and 3 times. Shorter sticks such as 6 cm also fit both, but any stick longer than 12 cm fails on at least one.

Core idea. The GCF is the largest whole number that divides every given number evenly.


When to Use

Use the GCF when a problem asks for the largest group size, piece length or tile that fits evenly into two or more amounts, when you want to simplify a fraction in one step, or when you factor the greatest common factor out of an expression. If the question asks when two repeating events next coincide, or for a common denominator to add fractions, you need the LCM instead.

Tip. Ask: Am I looking for the largest number that divides every given value with no remainder?

How to Recognize It

Before you find a GCF, check that the answer is a piece that fits evenly into every amount, so it can be no larger than the smallest one.

  1. Are two or more amounts being cut or grouped into equal pieces with nothing left over, such as 48 red and 60 blue beads into identical bags?

    Yes points to the GCF: the most bags is GCF(48,60)=12, each holding 4 red and 5 blue. If the amounts are instead built up until they match, use the LCM.

  2. Is the answer you expect smaller than or equal to the smallest number given?

    That fits a GCF, which can never exceed the smallest number. An answer bigger than all the numbers, such as the time when two events line up again, is an LCM.

  3. Does the question ask for every number that divides both, not just the largest one?

    Then list all the common factors. For 18 and 30 these are 1, 2, 3 and 6; the GCF is only the last of them, and every other common factor divides it.

  4. Is only one number given, with a request for what divides it?

    Then there is nothing to share, so you simply list that number's factors. A GCF always needs at least two numbers.

Greatest Common Factor compared with Least common multiple, Factors (of one number), and Common factors (all of them)

The GCF, the LCM, one number's factors and the full list of common factors all start from the same factor lists. Ask how many numbers you have, whether you want one answer or all of them, and whether it divides into the numbers or they divide into it.

Greatest Common Factor

Meaning
Use this when you must find the largest number that divides two or more values evenly.
Key test
Am I looking for the largest number that divides every given value with no remainder?
Formula
GCF(a,b)×LCM(a,b)=a×b
Example
Find the GCF of 24 and 36.

Least common multiple

Meaning
The SMALLEST number BOTH divide into, found from multiples not factors.
Key test
Use when finding a common denominator or where cycles meet.
Formula
abgcd⁡(a,b)
Example
LCM of 12,18 is 36

Factors (of one number)

Meaning
All divisors of a SINGLE number, not the shared largest one.
Key test
Use when listing one number's building blocks.
Formula
a×b=n
Example
Factors of 12: 1,2,3,4,6,12

Common factors (all of them)

Meaning
EVERY shared divisor, not just the greatest.
Key test
Use when you need the full list of shared divisors.
Example
Common factors of 12,18: 1,2,3,6

Formula & Notation

GCF(a,b)×LCM(a,b)=a×b
gcd⁡(a,b)=max⁡{d∈Z+:d∣a and d∣b}. Via prime factorization: if a=∏piαi and b=∏piβi, then gcd⁡(a,b)=∏pimin⁡(αi,βi).

How to read it: GCF(a,b) or gcd⁡(a,b) denotes the greatest common factor of a and b

Worked Examples

Example 1 — Find the GCF

Easy

Find the GCF of 24 and 36.
Show the steps and the answer
  1. Write each number as a product of primes: 24=2×2×2×3=23×3 and 36=2×2×3×3=22×32.

    Every common factor of 24 and 36 is built only from primes that appear in both.

  2. Take each shared prime with its smaller power: 22 (smaller than 23) and 31 (smaller than 32).

    A common factor can't use more copies of a prime than the number with fewer copies has.

  3. Multiply the chosen powers: 22×3=4×3=12.

    This is the largest product that still divides both numbers.

  4. Check: 24÷12=2 and 36÷12=3, and 2 and 3 share no factor except 1.

    If the two quotients still shared a factor, there would be a bigger common factor.

Answer: gcd⁡(24,36)=12

Takeaway: For the GCF, take only the primes the numbers share, each with its smaller power; quotients with no common factor confirm it is the greatest.

Example 2 — Wants where they meet

Standard

Two buses leave every 24 and 36 minutes. When do they next leave together?
Show the steps and the answer
  1. List the departure times: one bus at 24, 48, 72, … minutes; the other at 36, 72, … minutes.

    'Leave together' means a time on both lists, which is a common multiple, not a common factor.

  2. Find the first shared time: 72 minutes.

    The smallest common multiple is the next meeting; 48 appears on only one list.

  3. Confirm with the formula: lcm(24,36)=24×36gcd⁡(24,36)=86412=72.

    The GCF still appears, but only as a tool for computing the LCM.

Answer: 72 minutes — that is the LCM, not the GCF

Takeaway: A question about when repeating events line up wants the LCM. The GCF, 12 minutes, is shorter than either gap, so it can't be a meeting time.

Example 3 — Find the mistake: a common factor that is not the greatest

Application

Simplify 4860 using the GCF. Mia writes: "Both numbers are even, so the GCF is 2: 4860=2430." Find the mistake and correct it.
Show the steps and the answer
  1. Check Mia's result: 24 and 30 are both still divisible by 6, so 2430 can be simplified further.

    When the result still has a common factor, the number used was a common factor but not the greatest.

  2. Find the GCF with primes: 48=24×3 and 60=22×3×5, so gcd⁡(48,60)=22×3=12.

    The shared primes with their smaller powers are two 2s and one 3.

  3. Divide the top and bottom by 12: 48÷1260÷12=45.

    4 and 5 share no factor except 1, so one division by the true GCF finishes the job.

Answer: The GCF of 48 and 60 is 12, so 4860=45.

Takeaway: Any shared factor is a common factor, but the GCF is the one that leaves quotients with nothing more in common.

Where You'll See It

  • Tiling a floor without cutting

    A room 360 cm by 480 cm is to be covered with equal square tiles, none cut. The largest tile side is gcd⁡(360,480)=120 cm, giving a 3 by 4 grid of 12 tiles. A 100 cm tile would need cutting, because 100 does not divide 360.

  • Packing identical gift bags

    A club has 40 pencils and 56 erasers and wants identical bags with nothing left over. Since gcd⁡(40,56)=8, it can make at most 8 bags, each holding 5 pencils and 7 erasers.

  • Scaling a recipe ratio

    A school kitchen uses 45 cups of flour to 27 cups of sugar. Dividing both by gcd⁡(45,27)=9 shows the ratio is 5:3, which is easy to remember and to scale down for a home kitchen.

Common Mistakes

  1. The slip: Picking the LCM by mistake

    Instead: GCF is the largest shared FACTOR (at most the smaller number), not a multiple.

  2. The slip: Stopping at a common factor that is not the greatest

    Instead: 3 divides 12 and 18, but 6 is larger.

  3. The slip: Multiplying the numbers

    Instead: GCF divides into them; it never exceeds the smaller number.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Find the GCF of 18 and 30.

    Hint: List the factors of each and find the largest one in both lists.

  2. Find the GCF of 16, 40 and 56.

    Hint: Write each number as a product of primes.

  3. You have 48 pencils and 60 erasers. You want identical kits with nothing left over. What is the greatest number of kits, and what goes in each?

    Hint: The number of kits must divide both 48 and 60.

  4. Simplify 4575 in one step using the GCF.

    Hint: Find the greatest number that divides both 45 and 75.

  5. A 24 m by 40 m field is to be split into equal squares that are as large as possible. Do you need the GCF or the LCM?

    Hint: Is the square side a number that divides the lengths, or one they divide into?

  6. Tim says the GCF of 20 and 30 is 5, because 5 goes into both. Correct Tim.

    Hint: Is there a larger number that goes into both?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

What if the GCF of two numbers is 1?

Then the numbers share no factor except 1, and they are called relatively prime, or coprime. 8 and 15 are an example, even though neither is prime: 8=238=2^3 and 15=3×515=3\times5 have no prime in common. A fraction whose top and bottom are coprime, like 815\frac{8}{15}, is already in simplest form. Coprime numbers also have the easiest LCM: just multiply them, so LCM(8,15)=120\text{LCM}(8,15)=120.

Is there a faster way than listing factors when the numbers are big?

Yes, the Euclidean algorithm, which is over 2,000 years old. Replace the larger number with the remainder after dividing by the smaller, and repeat until the remainder is 0. For 252 and 198: 252=1×198+54252=1\times198+54, 198=3×54+36198=3\times54+36, 54=1×36+1854=1\times36+18, 36=2×18+036=2\times18+0. The last nonzero remainder, 18, is the GCF. It works because any number dividing both originals also divides each remainder.

Can the GCF be one of the numbers itself?

Yes, whenever the smaller number divides the larger one. GCF(7,35)=7\text{GCF}(7,35)=7, because 7 goes into itself and into 35 evenly, and nothing bigger than 7 can divide 7. So when one number is a factor of the other, the smaller number is the GCF. That makes a quick first check before any listing: try dividing the big number by the small one.

Can a GCF include a variable?

Yes. In 12x2+18x12x^2+18x, the numbers share 6 and both terms contain at least one xx, so the GCF is 6x6x and 12x2+18x=6x(2x+3)12x^2+18x=6x(2x+3). Take each variable to the smallest power it appears with: for x3y2x^3y^2 and x5yx^5y, the GCF is x3yx^3y. Check by multiplying back out; the result should match the original expression exactly.

Learning Path

Greatest Common Factor

You are here

You need Factors (listing factor pairs) and Divisibility Intuition first; prime factorization makes the work faster. The GCF picks out the largest factor that two or more numbers share. Next, Simplification uses it to reduce fractions and factor expressions, and the Least Common Multiple, its partner, finds the smallest number they all divide into, using LCM(a,b)=abGCF(a,b).

See Also