How to Factor Polynomials: Complete Step-by-Step Guide

By MathSolver Editorial Team · Published October 8, 2026 · Updated October 8, 2026

Factoring polynomials is one of the most useful skills in algebra. Whether you are solving quadratic equations, simplifying fractions, or preparing for calculus, knowing how to factor a polynomial quickly and accurately saves time and prevents errors. This guide walks you through five essential factoring methods, each with a fully worked example.

If you want to check your work as you practice, our factoring calculator shows every step of the process.

What Is Factoring?

Factoring a polynomial means rewriting it as a product of simpler polynomials. It is the reverse of multiplying (expanding). For example, expanding (x + 2)(x + 3) gives x² + 5x + 6. Factoring goes the other way: starting from x² + 5x + 6, we recover the factors (x + 2)(x + 3).

Why does factoring matter? A factored polynomial reveals its roots immediately. From (x + 2)(x + 3) = 0, you can see that x = -2 or x = -3. Factoring also simplifies rational expressions and helps sketch graphs, since the factors give the x-intercepts.

The general strategy: always try the methods below in order. Start with the GCF, then check for special patterns, then move on to trinomials and grouping.

Method 1: Greatest Common Factor (GCF)

Always look for a greatest common factor first. Every term of the polynomial may share a common numerical factor, a common variable, or both. Pulling it out first makes everything else easier.

How it works:

  1. Find the largest number that divides every coefficient.
  2. Find the lowest power of each variable present in every term.
  3. Factor out this GCF, writing the remaining terms inside parentheses.
  4. Check your work by multiplying back.
  5. Worked example: Factor 6x³ + 9x² - 12x

    Step 1: The coefficients are 6, 9, and -12. The largest number dividing all three is 3.

    Step 2: Every term contains at least one x, so the variable part of the GCF is x.

    Step 3: Factor out 3x:

    6x³ + 9x² - 12x = 3x(2x² + 3x - 4)

    Step 4: Multiply back to check: 3x · 2x² = 6x³, 3x · 3x = 9x², 3x · (-4) = -12x. Correct.

    Tip: A trinomial like 2x² + 8x + 6 is far easier to factor after removing the GCF of 2.

    Method 2: Grouping

    Grouping works for polynomials with four or more terms. The idea is to split the polynomial into pairs, factor a GCF out of each pair, and then factor out the common binomial that remains.

    How it works:

    1. Group the terms in pairs (usually the first two and the last two).
    2. Factor the GCF out of each pair separately.
    3. If a common binomial factor appears, factor it out.
    4. Verify by expanding.
    5. Worked example: Factor x³ + 3x² + 2x + 6

      Step 1: Group into pairs: (x³ + 3x²) + (2x + 6)

      Step 2: Factor each pair: x²(x + 3) + 2(x + 3)

      Step 3: The binomial (x + 3) is common, so factor it out: (x + 3)(x² + 2)

      Step 4: Expand to check: (x + 3)(x² + 2) = x³ + 2x + 3x² + 6. Correct.

      Tip: If the pairs do not share a common binomial, try a different pairing order. Sometimes grouping the first and third terms with the second and fourth works better.

      Method 3: Difference of Squares

      A difference of squares is a binomial of the form a² - b², which always factors as (a - b)(a + b). Recognizing this pattern instantly is a huge time saver.

      How it works:

      1. Confirm the expression is a binomial (two terms) with a minus sign.
      2. Check that both terms are perfect squares.
      3. Take the square root of each term to find a and b.
      4. Write (a - b)(a + b).
      5. Worked example: Factor 9x² - 25

        Step 1: Two terms, joined by subtraction. Good candidate.

        Step 2: 9x² = (3x)² and 25 = 5². Both are perfect squares.

        Step 3: So a = 3x and b = 5.

        Step 4: 9x² - 25 = (3x - 5)(3x + 5)

        Check: (3x - 5)(3x + 5) = 9x² + 15x - 15x - 25 = 9x² - 25. Correct.

        Common trap: A sum of squares, a² + b², does not factor over the real numbers. Only the difference pattern works.

        Want to verify patterns like this instantly? The factoring calculator recognizes special patterns and shows which rule it applied.

        Method 4: Factoring Trinomials

        Trinomials of the form x² + bx + c are among the most common factoring problems. The goal is to find two numbers that multiply to c and add to b.

        How it works:

        1. List factor pairs of the constant term c.
        2. Find the pair whose sum equals the middle coefficient b.
        3. Write (x + m)(x + n) using those two numbers.
        4. Expand to verify.
        5. Worked example: Factor x² + 7x + 12

          Step 1: Factor pairs of 12: (1, 12), (2, 6), (3, 4).

          Step 2: Which pair sums to 7? 3 + 4 = 7. That is the one.

          Step 3: x² + 7x + 12 = (x + 3)(x + 4)

          Step 4: Expand: (x + 3)(x + 4) = x² + 4x + 3x + 12 = x² + 7x + 12. Correct.

          When the leading coefficient is not 1: For ax² + bx + c with a ≠ 1, use the ac method. Multiply a and c, find two numbers that multiply to ac and add to b, then split the middle term and factor by grouping.

          Worked example: Factor 2x² + 7x + 3

          Step 1: a · c = 2 · 3 = 6. Find two numbers that multiply to 6 and add to 7: 1 and 6.

          Step 2: Split the middle term: 2x² + x + 6x + 3

          Step 3: Group: x(2x + 1) + 3(2x + 1) = (2x + 1)(x + 3)

          Step 4: Expand to verify: (2x + 1)(x + 3) = 2x² + 6x + x + 3 = 2x² + 7x + 3. Correct.

          Trinomials connect directly to quadratic equations. Once factored, you can read off the roots, or use our quadratic formula calculator to double-check your solutions with full step-by-step working.

          Method 5: Sum and Difference of Cubes

          Cubes follow their own memorable patterns:

          • Sum of cubes: a³ + b³ = (a + b)(a² - ab + b²)
          • Difference of cubes: a³ - b³ = (a - b)(a² + ab + b²)

          How it works:

          1. Confirm both terms are perfect cubes.
          2. Take the cube root of each to find a and b.
          3. Apply the correct formula (note the sign pattern: same, opposite, always plus).
          4. Verify by expanding.
          5. Worked example: Factor x³ - 27

            Step 1: x³ = (x)³ and 27 = 3³. Both are perfect cubes.

            Step 2: a = x, b = 3. This is a difference of cubes.

            Step 3: x³ - 27 = (x - 3)(x² + 3x + 9)

            Step 4: Expand: (x - 3)(x² + 3x + 9) = x³ + 3x² + 9x - 3x² - 9x - 27 = x³ - 27. Correct.

            Memory aid: For the trinomial part, remember "SOAP": Same sign as the original, Opposite sign in the middle, Always Positive at the end.

            Common Mistakes to Avoid

            1. Forgetting the GCF. Factoring 2x² + 10x + 12 as (2x + 4)(x + 3) is correct but not complete. Pull out the 2 first: 2(x + 2)(x + 3).

            2. Trying to factor a sum of squares. x² + 16 cannot be factored with real numbers. Do not force it into (x + 4)(x + 4), because that expands to x² + 8x + 16.

            3. Sign errors in trinomials. When c is negative, the two numbers have opposite signs. For x² + 2x - 15, you need numbers that multiply to -15 and add to 2: that is 5 and -3, giving (x + 5)(x - 3).

            4. Stopping too early. Check whether any factor can be factored further. In (x² - 4)(x + 1), the first factor is itself a difference of squares: (x - 2)(x + 2)(x + 1).

            5. Not verifying. Always expand your answer mentally or with a quick check. A thirty-second verification catches most errors. You can also paste the original polynomial into our online math solver to confirm the factored form.

            Practice Strategy

            The fastest way to get good at factoring polynomials is structured practice: start with GCF-only problems, move to difference of squares until you spot the pattern instantly, then practice trinomials with positive constants, negative constants, and leading coefficients other than 1. Finally, mix all five methods so you learn to choose the right one.

            Our factoring calculator is ideal for this: attempt each problem by hand, then enter it to see the complete step-by-step solution and compare with your working.

            Frequently Asked Questions

            What is the first step in factoring any polynomial?

            Always check for a greatest common factor first. Factoring out the GCF simplifies the remaining expression and often reveals patterns, like a difference of squares or a simple trinomial, that were hidden before.

            How do you factor polynomials with 4 terms?

            Use grouping. Split the four terms into two pairs, factor the GCF out of each pair, then factor out the common binomial. For example, x³ + 3x² + 2x + 6 = (x + 3)(x² + 2).

            Can every polynomial be factored?

            No. Some polynomials, like x² + 1, have no real factors. These are called prime (or irreducible) over the real numbers. If no method works and the discriminant is negative, the polynomial is prime.

            What is the difference between factoring and solving?

            Factoring rewrites a polynomial as a product, for example x² + 5x + 6 = (x + 2)(x + 3). Solving finds the values of x that make an equation true. Factoring is often the key step in solving: from (x + 2)(x + 3) = 0, the solutions are x = -2 and x = -3.

            How can I check my factoring quickly?

            Multiply the factors back together. You should recover the original polynomial exactly. For instant verification with full steps shown, use a factoring calculator.

            Conclusion

            Learning how to factor polynomials comes down to recognizing five patterns: the GCF, grouping, difference of squares, trinomials, and sum or difference of cubes. Work through them in order, verify each answer by expanding, and practice until the patterns feel automatic.

            Factoring is a gateway skill. It unlocks quadratic equations, rational expressions, and much of calculus. Master it now, and every algebra topic that follows becomes easier. Happy factoring.