The greatest common factor of an algebraic expression is the largest factor shared by every term, and you find it by taking the GCF of the number parts, then the lowest power of each variable that appears in every term, and multiplying those pieces together. For example, the GCF of 12x³y² and 18x²y⁵ is 6x²y². The method works the same whether you have two terms or ten, but it only holds together if every term is fully factored first, and coefficients with no shared factor let you down gently: the numeric part of the answer becomes 1. Master the four steps below and most factoring problems in an algebra course collapse into routine work.
Step 1: Break Every Coefficient Into Prime Factors
Start with the numbers. Prime factorization turns each coefficient into a product of primes, which makes the shared part visible and removes any guesswork about whether you spotted the largest divisor.
Rewrite each coefficient as primes. For 24x⁴ and 36x², write 24 = 2 × 2 × 2 × 3 and 36 = 2 × 2 × 3 × 3. Line the factorizations up under each other so matching columns are easy to see.
Take every prime that shows up in all rows, using the smallest count across the rows. Two 2s and one 3 appear in both factorizations, so the numeric GCF is 2 × 2 × 3 = 12.
Handle negatives by factoring the sign separately. A coefficient of −24 factors as −1 × 2 × 2 × 2 × 3, and the negative only enters the answer as a sign choice you make deliberately, never as part of the numeric GCF itself.
Check the result against the Euclid algorithm when the numbers are large. For 84 and 132, repeated division gives 132 − 84 = 48, 84 − 48 = 36, 48 − 36 = 12, 36 ÷ 12 = 3 remainder 0, and the last nonzero remainder of 12 matches the prime route, which is a useful self-check on an exam.
Step 2: Take the Lowest Power of Each Shared Variable
Variables follow a rule that's simpler than the number rule: list the powers in every term, and the GCF gets the smallest exponent for each letter.
Write out each variable's exponent in every term before choosing anything. The expression 15x³y and 25x⁵y⁴ contains x in both terms at powers 3 and 5, and y at powers 1 and 4.
Select the minimum exponent for each variable that appears everywhere. The GCF takes x³ and y¹, giving the variable part x³y.
Drop any variable that is missing from at least one term. In 8a²b + 12ab²c, the letter c appears only in the second term, so c stays out of the GCF entirely, and the variable part is just ab.
Verify with the distributive property, because a correct GCF multiplied back must reproduce each term exactly. Did you choose x² by mistake in 15x³y and 25x⁵y⁴? Then 15x³y ÷ x² leaves x¹y inside the parentheses and the reconstruction breaks, which flags the error immediately.
Step 3: Combine the Numeric and Variable Parts Into One GCF
Multiplication joins the two halves. The numeric GCF and the variable GCF form a single monomial, and you can test it by dividing.
Multiply and write the result in conventional order, coefficient first. Steps 1 and 2 on 24x⁴ and 36x² produced 12 and x², so the GCF is 12x².
Divide each original term by the GCF to confirm there's no remainder. 24x⁴ ÷ 12x² = 2x² and 36x² ÷ 12x² = 3, both clean monomials, which is exactly what a correct GCF guarantees.
Beware the misleading constant term. In 6x² + 9x + 12, the numerals share a factor of 3, but x appears in only two of the three terms, so x stays out and the GCF is 3. A constant term of 5 in an otherwise variable-heavy expression often drops the variable part to 1.
Know the degenerate case. Terms like 7x²y and 11xy⁴ share no numeric factor and no variable held in common at a useful power beyond xy, so the GCF is xy, because 7 and 11 are distinct primes. When even the variable part vanishes, as in 5x + 7y, the GCF is 1, and the expression is called relatively prime or coprime.
How the GCF Differs From the LCM of Algebraic Expressions
GCF and LCM use opposite exponent rules on the same data, and mixing them up is the single most common error in this unit.
| Feature | GCF (greatest common factor) | LCM (least common multiple) |
|---|---|---|
| Numeric rule for 12 and 18 | 6 | 36 |
| Variable rule for x³ and x⁵ | x³ (smallest power) | x⁵ (largest power) |
| Coverage rule | Appears in every term | Appears in at least one term |
| Purpose | Factoring expressions | Finding common denominators |
| Result for 8a²b and 12ab²c | 4ab | 24a²b²c |
Use the GCF when you're pulling an expression apart into factors. Use the LCM when you're adding rational expressions and need matching denominators, a task that shows up constantly in Algebra 2.
The variable behind the table is blunt. GCF takes the minimum exponent, LCM takes the maximum, and the LCM's variable part always includes letters that the GCF excludes.
Test yourself with the pair 10x²y³ and 15x⁴y, where the GCF is 5x²y and the LCM is 30x⁴y³. Multiply those two results and you get 150x⁶y⁴, which equals 10x²y³ × 15x⁴y, a relationship that holds for any two monomials and gives you a free check on both answers.
Worked Example: Factor 12x³y² + 18x²y⁵ + 30x⁴y
Reading a full solution line by line shows how the three steps lock together on a problem with three terms and two variables.
Start with coefficients 12, 18, and 30. Their prime factorizations are 2² × 3, 2 × 3², and 2 × 3 × 5, and the shared minimum is 2 × 3 = 6.
Move to the variables. The x powers are 3, 2, and 4, so x² is shared. The y powers are 2, 5, and 1, so y¹ is shared.
Assemble and divide. The GCF is 6x²y, and dividing each term gives 2xy, 3y⁴, and 5x², so the factored form is 6x²y(2xy + 3y⁴ + 5x²).
Check by expanding. Distributing 6x²y across the parentheses returns 12x³y² + 18x²y⁵ + 30x⁴y exactly, which confirms the answer. Notice the 30x⁴y term: its y¹ set the variable floor for the whole expression.
Factoring Out a Negative GCF and Matching Signs
When the leading coefficient is negative, factor out a negative GCF so the first term inside the parentheses turns positive, which is the standard convention in most textbooks.
For −8x³ + 12x², the numeric GCF of 8 and 12 is 4, but the leading term is negative, so writers typically pull out −4x² rather than 4x², yielding −4x²(2x − 3).
Choose the sign by what makes the first inside term positive, and the other terms follow automatically. −12x² ÷ −4x² = 3, so the second term is +3, and the sign inside the parentheses reflects the division.
Factor out −1 only when no other common factor exists. For −5x − 10, the numeric GCF is 5, and pulling out −5 gives −5(x + 2), which reads cleaner than 5(−x − 2) because the parenthetical variable term leads positive.
Watch for expressions where the GCF carries a negative and the inside terms still share structure. −6x² − 9x − 15x³ factors as −3x(2x + 3 + 5x²), and ordering the inside terms by descending degree, −3x(5x² + 2x + 3), matches polynomial convention.
Common Mistakes That Produce a Wrong GCF
Most errors in this topic fall into four recognizable patterns, and each one has a quick corrective check.
Taking the highest power instead of the lowest turns the GCF into something closer to the LCM. The correction is mechanical: divide each term by your candidate and confirm no exponent goes negative.
Forgetting the variable when a constant term is present loses factors like x in 6x² + 9x + 12, where the correct GCF is 3. Divide and confirm every term yields a valid monomial.
Stopping at a partial factor such as 4 for the coefficients 24 and 36 leaves the true factor 12 unclaimed. Always compare against prime factorizations, or run the Euclid algorithm, rather than trusting the first shared divisor you spot.
Dropping the negative sign on the leading term loses the conventional form. If the original expression starts with a negative coefficient, the answer typically starts with a negative GCF.
Practicing With Mixed-Degree and Multi-Variable Problems
Speed comes from pattern recognition across a handful of problem types, and the arithmetic behind each one stays short.
Practice set
1: GCF of 14x⁵ and 21x² → 7x² 2: GCF of 9a³b² and 15a²b⁴ → 3a²b² 3: GCF of 20x²y³z and 30xy²z² → 10xy²z 4: GCF of x⁴y + x²y³ → x²y 5: GCF of 16m³n², 24m²n, and 40mn³ → 8mn
Check each by division before trusting it. Take problem 5: 16m³n² ÷ 8mn = 2m²n, 24m²n ÷ 8mn = 3m, and 40mn³ ÷ 8mn = 5n², all clean, so 8mn is correct.
The edge case that trips students
Expressions like 3x + 5 have a GCF of 1, and nothing can be factored out. Recognizing that early saves time. The same applies to 7a²b + 2ab⁴, where the coefficients 7 and 2 share nothing.
Why the rule holds
The logic rests on the distributive property in reverse: ab + ac = a(b + c). A correct GCF is the largest a that leaves whole-number and whole-variable factors inside the parentheses.
Self-Checking an Answer by Division and Expansion
Two cheap checks catch nearly every mistake, and each takes under a minute.
Division check
Divide every term by your candidate GCF. If any quotient has a negative exponent or a fractional coefficient, your GCF was too large.
Expansion check
Multiply the GCF back through the parentheses. The result must match the original expression term for term.
Build a habit of both
On a timed exam, the division check runs fastest. On homework, the expansion check confirms the final written form.
Slow down on three-term expressions
Most errors appear when the middle term differs in structure from its neighbors. The division check handles that case cleanly.
Where the GCF Fits in Factoring, Fractions, and Polynomial Division
Factoring out the GCF is the first move in nearly every multi-step factoring routine, from trinomials to difference of squares.
Fractions and rational expressions
Reducing 24x⁴ / 36x² to 2x²/3 borrows the exact GCF of 12x² from earlier in this article. Simplifying rational expressions follows the same logic on polynomials.
Polynomial long division
When dividing polynomials, factoring out the GCF of the dividend sometimes reveals a cleaner path. The division algorithm also uses the same minimum-exponent reasoning.
Time cost on an exam
A trained student handles a two-term GCF problem in roughly 30–60 seconds: 15–20 seconds for prime factorization, 10–15 seconds to read off variable minimums, and 10 seconds for the division check. Untrained students often spend two to three times that on a single problem because they skip the check and then rescind their answer.
Beyond monomials
The same idea extends to factoring polynomials with a binomial GCF, though that's a topic for a later unit.
FAQ
What is the GCF of 12x³y² and 18x²y⁵?
It's 6x²y². The numeric GCF is 6, the smallest x power is x², and the smallest y power is y². Multiply those three parts: 6 × x² × y².
Can the GCF of an algebraic expression be 1?
Yes, and this happens whenever no variable appears in every term and the coefficients share no factor. For example, 7x² + 11y has a GCF of 1, and such expressions are called relatively prime.
Is the GCF of 5x and 10x² just 5?
No, that stops one step short. The variable x appears in both terms, so the GCF is 5x, not just 5. Dividing 10x² by 5x gives 2x, which is a clean monomial.
How is the GCF of polynomials different from factoring trinomials?
The GCF method applies to any expression with two or more terms, whereas trinomial factoring targets a specific three-term form like x² + 5x + 6. Master the GCF first, because it's the opening move in every other factoring technique.
What if one term is a constant, like 4x² + 8x + 6?
The GCF is 2, because the variable x drops out (it isn't in the constant term 6). Coefficient 6 = 2 × 3, so the factor 2 survives.
Does factoring out a negative GCF change the answer?
The GCF's value doesn't change, only the sign shown in front. −8x³ + 12x² has the same GCF magnitude of 4x², but the conventional written form uses −4x²(2x − 3).
Can a GCF contain a fraction or a decimal coefficient?
Not in standard algebra work. The GCF is defined over integers and whole-number variable powers, so a fractional coefficient means you've made an error somewhere in factorization.