Calculator Tools

← Back to Blogs

How to Factor Polynomials: Methods With Examples

Learn how to factor polynomials step by step: common factors, trinomials, difference of squares, cubes, grouping, and rational roots, with worked examples.

By Calculator Tools Team2 min read

  • maths
  • algebra
The factored form (x+2)(x+3) in large type on a white card over a yellow background, above the polynomial x squared plus 5x plus 6

Factoring means writing an expression as a product of simpler pieces. It is the reverse of multiplying out brackets, and it is how you solve many equations, simplify fractions, and cancel terms in limits.

Step 1: take out the common factor

Always start here. Look for the largest number and power of x that divides every term.

6x + 12 = 6(x + 2)

Step 2: look for a pattern

Difference of squares. a² − b² = (a − b)(a + b), so x² − 4 = (x − 2)(x + 2). It works only for a difference. A sum of squares such as x² + 9 cannot be factored with real numbers.

Perfect square trinomial. a² + 2ab + b² = (a + b)². For example, x² + 2x + 1 = (x + 1)².

Sum and difference of cubes. a³ + b³ = (a + b)(a² − ab + b²) and a³ − b³ = (a − b)(a² + ab + b²), so x³ − 8 = (x − 2)(x² + 2x + 4).

Step 3: factor a trinomial

For x² + bx + c, find two numbers that multiply to c and add to b. In x² + 5x + 6, the numbers 2 and 3 multiply to 6 and add to 5, so the result is (x + 2)(x + 3).

When the first coefficient is not 1, multiply it by the last number. For 6x² + x − 2, a × c = −12. The numbers 4 and −3 multiply to −12 and add to 1. Split the middle term, group, and factor:

6x² + 4x − 3x − 2 = 2x(3x + 2) − 1(3x + 2) = (2x − 1)(3x + 2)

Step 4: try grouping

With four terms, factor each pair and look for a shared bracket:

3x³ + 6x² + 2x + 4 = 3x²(x + 2) + 2(x + 2) = (x + 2)(3x² + 2)

Step 5: use the rational root theorem

For higher degrees, any rational root is a fraction whose numerator divides the constant term and whose denominator divides the leading coefficient. Test the candidates. Each root r gives a factor (x − r).

Do not stop too early

x⁴ − 16 = (x² − 4)(x² + 4) is not finished, because x² − 4 factors again. The full answer is (x − 2)(x + 2)(x² + 4).

Always check

Multiply your factors back out. You should get the original expression.

Try it yourself

Our factoring calculator factors polynomials and whole numbers and shows the method it used at each step.