Mathovia

Algebra / Preliminaries

Greatest Common Factor

Factoring out the greatest common factor is the first move to try on every factoring problem, and skipping it is the single most common reason a later factoring step gets stuck. This lesson covers finding the GCF of plain numbers, of monomials with variables, and then pulling it out of a polynomial as the reverse of the distributive property.

Practice Problems
M
Written by
Mathovia Team
Editorial Team

Every factoring problem should start with the same question: do all the terms share a common factor? Finding and removing that shared factor — the greatest common factor, or GCF — is usually the fastest step in the whole factoring process, and skipping it is the most common reason a later step (like factoring a trinomial) seems to get stuck on numbers that don’t work.

Factoring Polynomials covers the GCF as the first of several techniques; this lesson slows down and drills it on its own, including the numeric and multi-variable cases that deserve extra practice.

What Is the Greatest Common Factor?

The greatest common factor (GCF) of a set of terms is the largest expression that divides every one of them evenly. Finding it has two independent parts: the largest number that divides every coefficient, and the lowest power of each variable that appears in every term.

$$ \text{GCF of } 12x^{3} \text{ and } 18x^{2} = 6x^{2} $$

\(6\) is the largest number dividing both \(12\) and \(18\); \(x^{2}\) is the lowest power of \(x\) shared by \(x^{3}\) and \(x^{2}\). Neither part can be increased without failing to divide one of the two terms evenly.

Finding the GCF of Two or More Numbers

List the factors of each number (or use prime factorization) and identify the largest one they share.

NumbersShared factorsGCF
\(8, 12\)\(1, 2, 4\)\(4\)
\(18, 24, 30\)\(1, 2, 3, 6\)\(6\)
\(15, 22\)\(1\)\(1\)

When the only shared factor is \(1\), as in the last row, the numbers are said to have no common factor worth extracting — the GCF is trivially \(1\) and doesn’t change anything.

Finding the GCF of Monomials

For monomials, combine the numeric GCF with the lowest exponent of each variable that appears in every term — never the highest, since a higher power wouldn’t divide a term that only has the lower one.

$$ \text{GCF of } 20x^{4}y^{2} \text{ and } 12x^{2}y^{5} = 4x^{2}y^{2} $$

\(4\) is the GCF of \(20\) and \(12\); \(x^{2}\) is the lower of the two \(x\)-exponents (\(4\) and \(2\)); \(y^{2}\) is the lower of the two \(y\)-exponents (\(2\) and \(5\)). A variable that’s completely missing from even one term contributes nothing to the GCF at all, since it can’t be a common factor of a term it doesn’t appear in.

Factoring the GCF Out of a Polynomial

Factoring out the GCF is the reverse of the distributive property: divide every term by the GCF, and write the polynomial as the GCF times whatever’s left in parentheses.

$$ 12x^{3} + 18x^{2} = 6x^{2}(2x+3) $$

Each term divided by the GCF \(6x^{2}\): \(12x^{3} \div 6x^{2} = 2x\), and \(18x^{2} \div 6x^{2} = 3\). Multiplying \(6x^{2}(2x+3)\) back out reproduces \(12x^{3}+18x^{2}\) exactly, which is the standard way to check the factoring was done correctly.

Factoring Out a Negative GCF

When a polynomial’s leading term is negative, factoring out a negative version of the GCF leaves a positive leading term inside the parentheses, which is the more useful and conventional form.

$$ -6x^{3}-9x^{2} = -3x^{2}(2x+3) $$

Every term still has to be divided by the negative GCF, including the sign: \(-6x^{3} \div (-3x^{2}) = 2x\) (positive, since a negative divided by a negative is positive), and \(-9x^{2} \div (-3x^{2}) = 3\).

Worked Example A: The GCF of Two Numeric Coefficients and Variables

Factor the GCF out of \(15x^{4} - 25x^{2}\).

Step 1 — find the GCF: the GCF of \(15\) and \(25\) is \(5\); the lower exponent of \(x\) is \(2\):

$$ \text{GCF} = 5x^{2} $$

Step 2 — divide every term by the GCF and write the factored form:

$$ 15x^{4}-25x^{2} = 5x^{2}(3x^{2}-5) $$

Answer: \(5x^{2}(3x^{2}-5)\)

Worked Example B: A GCF with Two Variables

Factor the GCF out of \(8x^{3}y^{2} + 12x^{2}y^{4}\).

Step 1 — find the GCF: the GCF of \(8\) and \(12\) is \(4\); the lower exponent of \(x\) is \(2\); the lower exponent of \(y\) is \(2\):

$$ \text{GCF} = 4x^{2}y^{2} $$

Step 2 — divide every term by the GCF:

$$ 8x^{3}y^{2}+12x^{2}y^{4} = 4x^{2}y^{2}(2x+3y^{2}) $$

Answer: \(4x^{2}y^{2}(2x+3y^{2})\)

Worked Example C: Factoring Out a Negative GCF

Factor the GCF out of \(-4x^{3}+8x^{2}-12x\), keeping the leading term inside positive.

Step 1 — find the GCF, using a negative sign since the leading term is negative:

$$ \text{GCF} = -4x $$

Step 2 — divide every term by \(-4x\):

$$ -4x^{3}+8x^{2}-12x = -4x(x^{2}-2x+3) $$

Answer: \(-4x(x^{2}-2x+3)\). Dividing \(-4x^{3}\) by \(-4x\) gives a positive \(x^{2}\), which is exactly the point of choosing a negative GCF.

Worked Example D: A GCF That’s Only a Binomial

Factor the GCF out of \(3x(x+5) - 7(x+5)\), where the common factor is an entire binomial rather than a monomial.

Step 1 — recognize \((x+5)\) as the shared factor between both terms:

$$ \text{GCF} = (x+5) $$

Step 2 — factor it out, exactly as with a monomial GCF:

$$ 3x(x+5)-7(x+5) = (x+5)(3x-7) $$

Answer: \((x+5)(3x-7)\). A GCF is never required to be a single monomial — any expression shared by every term, including a whole binomial, can be factored out the same way.

Common Mistakes to Avoid

  • Using the highest exponent of a variable instead of the lowest. The GCF of \(x^{2}\) and \(x^{5}\) is \(x^{2}\), not \(x^{5}\); a higher power doesn’t divide the term that only has \(x^{2}\).
  • Forgetting a variable that’s missing from one term. If even one term has no \(y\) in it at all, \(y\) cannot be part of the GCF, regardless of how large its exponent is in the other terms.
  • Stopping before finding the greatest common factor, not just a common one. \(2\) is a common factor of \(12\) and \(18\), but \(6\) is the greatest one — always check whether a larger shared factor exists.
  • Forgetting to divide every term when factoring out the GCF. Every single term, not just the first one, has to be divided by the GCF and represented inside the parentheses.
  • Dropping the sign when factoring out a negative GCF. Dividing a negative term by a negative GCF gives a positive result inside the parentheses — losing track of that sign flip is the most common error in this section.
  • Not checking the answer by redistributing. Multiplying the GCF back through the parentheses should exactly reproduce the original polynomial; if it doesn’t, the GCF or the division was done incorrectly.

Where This Shows Up Later

  • Factoring by Grouping. Grouping starts by finding a GCF within each pair of terms separately, using this exact same technique twice in a row.
  • Factoring Quadratics. A trinomial with a GCF hiding in every term should always have that GCF removed first, since factoring the smaller remaining trinomial is significantly easier.
  • Factoring Higher-Degree Polynomials. Every higher-degree factoring problem begins with the same GCF check, before any other technique is even considered.
  • Simplifying Rational Expressions. Cancelling a rational expression to lowest terms depends on first factoring both the numerator and denominator, which routinely starts with pulling out each one’s GCF.

Practice Problems

Work each problem yourself before opening the answer.

Problem 1. Factor the GCF out of \(6x^{2}+9x\).

Show answer

The GCF of \(6\) and \(9\) is \(3\); the lower power of \(x\) is \(x^{1}\):

$$ 6x^{2}+9x = 3x(2x+3) $$

Answer: \(3x(2x+3)\)

Problem 2. Factor the GCF out of \(20x^{3}-15x^{2}\).

Show answer

The GCF of \(20\) and \(15\) is \(5\); the lower power of \(x\) is \(x^{2}\):

$$ 20x^{3}-15x^{2} = 5x^{2}(4x-3) $$

Answer: \(5x^{2}(4x-3)\)

Problem 3. Factor the GCF out of \(14x^{4}+21x^{3}-7x^{2}\).

Show answer

The GCF of \(14, 21, 7\) is \(7\); the lower power of \(x\) is \(x^{2}\):

$$ 14x^{4}+21x^{3}-7x^{2} = 7x^{2}(2x^{2}+3x-1) $$

Answer: \(7x^{2}(2x^{2}+3x-1)\)

Problem 4. Factor the GCF out of \(9x^{2}y^{3}-12x^{3}y^{2}\).

Show answer

The GCF of \(9\) and \(12\) is \(3\); the lower power of \(x\) is \(x^{2}\); the lower power of \(y\) is \(y^{2}\):

$$ 9x^{2}y^{3}-12x^{3}y^{2} = 3x^{2}y^{2}(3y-4x) $$

Answer: \(3x^{2}y^{2}(3y-4x)\)

Problem 5. Factor the GCF out of \(-8x^{3}-20x^{2}\), keeping the leading term inside positive.

Show answer

The GCF of \(8\) and \(20\) is \(4\); factor out \(-4x^{2}\) so the leading term becomes positive:

$$ -8x^{3}-20x^{2} = -4x^{2}(2x+5) $$

Answer: \(-4x^{2}(2x+5)\)

Problem 6. Factor the GCF out of \(10x^{2}+15x-25\).

Show answer

The GCF of \(10, 15, 25\) is \(5\); no variable is shared by all three terms except \(x^{0}\) in the last term, so only the number \(5\) factors out:

$$ 10x^{2}+15x-25 = 5(2x^{2}+3x-5) $$

Answer: \(5(2x^{2}+3x-5)\)

Problem 7. Factor the GCF out of \(4x^{5}-8x^{3}+12x^{2}\).

Show answer

The GCF of \(4, 8, 12\) is \(4\); the lowest power of \(x\) among all three terms is \(x^{2}\):

$$ 4x^{5}-8x^{3}+12x^{2} = 4x^{2}(x^{3}-2x+3) $$

Answer: \(4x^{2}(x^{3}-2x+3)\)

Problem 8. Factor the GCF out of \(2x(x-4) + 9(x-4)\).

Show answer

\((x-4)\) is shared by both terms:

$$ 2x(x-4)+9(x-4) = (x-4)(2x+9) $$

Answer: \((x-4)(2x+9)\)

Problem 9. Factor the GCF out of \(18x^{4}y - 12x^{3}y^{2} + 6x^{2}y^{3}\).

Show answer

The GCF of \(18, 12, 6\) is \(6\); the lowest power of \(x\) is \(x^{2}\); the lowest power of \(y\) is \(y\):

$$ 18x^{4}y-12x^{3}y^{2}+6x^{2}y^{3} = 6x^{2}y(3x^{2}-2xy+y^{2}) $$

Answer: \(6x^{2}y(3x^{2}-2xy+y^{2})\)

Problem 10. Factor the GCF out of \(-5x^{3}+15x^{2}-10x\), keeping the leading term inside positive.

Show answer

The GCF of \(5, 15, 10\) is \(5\); the lowest power of \(x\) is \(x\); factor out \(-5x\):

$$ -5x^{3}+15x^{2}-10x = -5x(x^{2}-3x+2) $$

Answer: \(-5x(x^{2}-3x+2)\)

Quick Reference

SituationMove
GCF of the coefficientsThe largest number dividing every coefficient evenly
GCF of a repeated variableThe lowest exponent of that variable across every term
A variable missing from any termIt contributes nothing to the GCF, no matter its exponent elsewhere
Leading term is negativeFactor out a negative GCF so the term inside becomes positive
A shared binomial factorFactor it out exactly like a monomial GCF
Checking the answerMultiply the GCF back through the parentheses; it should reproduce the original polynomial exactly

Once spotting a GCF feels automatic, Factoring by Grouping uses this exact skill twice per problem, and Factoring Quadratics always starts by checking for one before anything else. Revisit Factoring Polynomials for the full overview these lessons split apart. Build speed with the Greatest Common Factor Generator, or browse the rest of the Algebra lessons as new ones publish.

Frequently Asked Questions

What is the greatest common factor of a set of terms?+

The largest expression that divides every one of the terms evenly, with nothing left over. For \(12x^{3}\) and \(18x^{2}\), the GCF is \(6x^{2}\) — the largest number that divides both \(12\) and \(18\), combined with the lowest power of \(x\) that appears in both.

Why does the GCF of the variable part always use the lowest exponent?+

The GCF has to divide every term evenly, and a factor like \(x^{5}\) doesn't divide a term that only has \(x^{2}\) in it. The lowest exponent among all the terms is always the largest power of that variable that every term can supply, which is exactly what "greatest common" requires.

Is factoring out the GCF the same operation as distributing, just backward?+

Yes, exactly. Distributing \(6x^{2}(2x+3)\) gives \(12x^{3}+18x^{2}\); factoring out the GCF starts from \(12x^{3}+18x^{2}\) and recovers \(6x^{2}(2x+3)\). Multiplying the factored answer back out is the standard way to check that a GCF was factored out correctly.

How can I check that I found the true greatest common factor, not just a common factor?+

After factoring it out, check whether the terms left inside the parentheses still share a common factor of their own. If they do, the first factor pulled out wasn't the greatest one, and it's worth factoring again from that point.

When should I factor out a negative GCF?+

Whenever the polynomial's leading term is negative, factoring out a negative GCF (rather than a positive one) leaves a leading term inside the parentheses that's positive, which is the conventional and generally more useful form for the next factoring step.

Does every polynomial have a greatest common factor worth pulling out?+

Every polynomial technically has a GCF, but it's only worth writing down separately when it's something other than \(1\) — if the only number and variable power shared by every term is \(1\), there's nothing to factor out, and the polynomial moves straight to whatever the next factoring technique is.

Related lessons