Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Factor Out the Greatest Common Factor

The first step of every factoring problem: find what all the terms share, the largest common number and the lowest power of each common variable, and write it once in front of a bracket.

Recognize the task

Every term has a factor in common: 12x3+18x2−6x12x^3 + 18x^2 - 6x, 8a2b−12ab28a^2b - 12ab^2, x(x+2)+5(x+2)x(x + 2) + 5(x + 2). Test: does one number, letter or bracket divide every term?
The lesson section is Greatest Common Factor; it is the reverse of the distributive law.

Steps

StepOn 12x3+18x2−6x12x^3 + 18x^2 - 6x
1Find the GCF of the coefficients. The largest number dividing all of them.gcd⁡(12,18,6)=6\gcd(12, 18, 6) = 6
2Find the lowest power of each shared variable. A variable missing from one term is not shared.x1x^1
3Divide every term by the GCF. The quotients go inside the bracket; a term equal to the GCF leaves 11, not 00.6x(2x2+3x−1)6x(2x^2 + 3x - 1)
4Check by expanding, then factor the bracket further if possible. Continue with trinomials or other patterns.Distribute every term ↗6x⋅2x2+6x⋅3x−6x=12x3+18x2−6x6x\cdot 2x^2 + 6x\cdot 3x - 6x = 12x^3 + 18x^2 - 6x ✓; 2x2+3x−12x^2 + 3x - 1 does not factor

Worked examples

Example 1 · two variables

basic
8a2b−12ab28a^2b - 12ab^2: GCF 4ab4ab
4ab(2a−3b)4ab(2a - 3b)

Example 2 · a bracket as the common factor

binomial GCF
x(x+2)+5(x+2)x(x + 2) + 5(x + 2)
(x+2)(x + 2) is in both terms
(x+2)(x+5)(x + 2)(x + 5)

Example 3 · negative leading term

factor out −
−3x2+9x-3x^2 + 9x: take out −3x-3x
leaves a positive leading term inside
−3x(x−3)-3x(x - 3)

See it happen

Each term is a rectangle of area 12x312x^3, 18x218x^2 and 6x6x. Factoring out 6x6x lines them up along a common side of length 6x6x; the other sides, 2x22x^2, 3x3x and 11, are what goes in the bracket.

Common mistakes

Leaving 0 for a term equal to the GCF

✗ 12x3+18x2−6x=6x(2x2+3x)12x^3 + 18x^2 - 6x = 6x(2x^2 + 3x)
✓ 6x(2x2+3x−1)6x(2x^2 + 3x - 1)

Not the greatest factor

✗ 12x3+18x2=2x(6x2+9x)12x^3 + 18x^2 = 2x(6x^2 + 9x)
✓ 6x2(2x+3)6x^2(2x + 3)

Sign errors after factoring out a negative

✗ −3x2+9x=−3x(x+3)-3x^2 + 9x = -3x(x + 3)
✓ −3x(x−3)-3x(x - 3)