Factoring can feel like guesswork. You stare at a polynomial, try one identity, abandon it, try another. The truth is that most school-level factoring is not a guessing game — it is routing. Count the terms, follow the right branch, apply the named method. The decision tree below handles around 95% of the polynomials you will see from class 9 through JEE Mains.

The flowchart

Read it from top to bottom. The blue boxes are decisions; the green boxes are actions; the red boxes are end states (the factored form is what you wrote down by following the path).

Factoring decision-tree flowchart A flowchart that starts with "Polynomial to factor", asks "Can you factor out a GCF?", then branches on the number of terms: 2 terms routes to difference of squares, sum of squares (irreducible), or sum and difference of cubes; 3 terms routes to a perfect-square trinomial check or to split-the-middle (the ac method); 4 terms routes to grouping; 5 or more terms routes to creative grouping or pattern hunting. Polynomial to factor Step 0: Can you factor out a common factor (GCF)? yes Pull GCF out front, factor what remains go back no Step 1: How many terms does it have? 2 terms 3 terms 4 terms 5+ terms Difference of squares? Difference / sum of cubes? a² − b² = (a−b)(a+b) a³ − b³ = (a−b)(a²+ab+b²) a³ + b³ = (a+b)(a²−ab+b²) Factored form (a² + b² is irreducible over the reals) Is it a perfect-square trinomial? yes no a² ± 2ab + b² = (a ± b)² Split the middle (ac): find p, q with p·q = ac, p + q = b. Group. Factored form Try grouping (2-and-2 split) Pair the four terms. Factor each pair. Common binomial? Pull it out. Factored form Creative grouping or pattern hunt Try 3+2, 2+2+1, or factor theorem + synthetic division Factored form After every step: check whether any factor itself can be factored further. A quadratic factor with negative discriminant is irreducible — stop there. Legend Decision (a question to ask) Action (apply the named method) End state (factored form written down) Always start at the top and walk down. After GCF, count the terms. After each method, re-examine each factor — sometimes a quadratic factor itself splits further.
The factoring decision tree. Pull a common factor first if there is one, count the terms, then follow the matching branch to the named method. End nodes are factored forms; you keep going until no factor can be reduced further.

Walk through the tree once and the rest of the article makes sense. The five sections below explain each branch in turn.

2-term polynomials: difference and sum of squares and cubes

Two terms is the smallest a non-trivial polynomial can shrink to, and there are exactly four shapes you should know.

Recognising the pattern is the whole game. Both terms perfect squares with a minus between them? Both terms perfect cubes? If yes, the identity does the work in one step.

Worked example. Factor x^2 - 16. Both terms are perfect squares: x^2 = (x)^2 and 16 = 4^2. Apply difference of squares with a = x, b = 4:

x^2 - 16 = (x - 4)(x + 4).

Worked example. Factor x^3 - 27. Both terms are perfect cubes: x^3 = (x)^3 and 27 = 3^3. Apply difference of cubes with a = x, b = 3:

x^3 - 27 = (x - 3)(x^2 + 3x + 9).

The quadratic factor x^2 + 3x + 9 has discriminant 9 - 36 = -27 < 0, so it is irreducible over the reals. You stop here.

3-term polynomials: perfect-square check, then split-the-middle

Three terms is the most common shape — every quadratic in standard form is a three-term polynomial. The flowchart asks two questions in order.

First, is it a perfect-square trinomial? A perfect-square trinomial has the shape a^2 \pm 2ab + b^2 and folds back into (a \pm b)^2. To check, see if the first and last terms are perfect squares, then see if the middle term is exactly \pm 2 \cdot a \cdot b. If yes, you are done in one step.

Second, if not a perfect square, use split-the-middle (the ac method). For a trinomial ax^2 + bx + c, find two numbers p and q such that p \cdot q = ac and p + q = b. Split the middle term bx into px + qx, and you now have a four-term polynomial that factors by grouping.

Worked example. Factor x^2 + 5x + 6. Not a perfect square (the constant 6 is not a perfect square anyway). Use split-the-middle: a c = 1 \cdot 6 = 6. You need two numbers with product 6 and sum 5. Those are 2 and 3. Split:

x^2 + 2x + 3x + 6 = x(x + 2) + 3(x + 2) = (x + 2)(x + 3).

Worked example. Factor 2x^2 + 7x + 3. Now a \neq 1, so the ac trick really matters. a c = 2 \cdot 3 = 6. You need two numbers with product 6 and sum 7. Those are 6 and 1. Split:

2x^2 + 6x + x + 3 = 2x(x + 3) + 1(x + 3) = (2x + 1)(x + 3).

The split-the-middle method is the general workhorse of three-term factoring; the perfect-square shortcut is only worth taking when you can spot it on sight.

4-term polynomials: grouping

Four terms is the canonical signal for grouping. Pair the terms two and two, factor a common piece out of each pair, and look for the same binomial bracket sitting in both halves. If you find it, pull it out as the common factor.

Worked example. Factor x^3 + x^2 + 2x + 2.

x^3 + x^2 + 2x + 2 = x^2(x + 1) + 2(x + 1) = (x^2 + 2)(x + 1).

The first pair gave x^2 outside and (x + 1) inside; the second pair gave 2 outside and the same (x + 1) inside. That repeated bracket is the common factor.

If the pairing does not produce a common bracket on the first try, swap the order of the terms before grouping. Sometimes the natural left-to-right split hides the structure, and you have to rearrange to see it.

Step 0 — always try GCF first

Before you count terms, before you reach for any identity, look for a greatest common factor. If every term shares a number, a variable, or a binomial, pull it out front. The remaining polynomial is smaller and easier to handle.

Take 4x^3 + 8x^2 + 4x. Every term contains a factor of 4x:

4x^3 + 8x^2 + 4x = 4x(x^2 + 2x + 1) = 4x(x + 1)^2.

After pulling out the 4x, what remained was x^2 + 2x + 1 — a perfect-square trinomial. If you had skipped the GCF step, you would have started with a cubic and worked harder for the same answer. The GCF step is free; never skip it.

When the flowchart doesn't fit

The decision tree handles the bulk of school-level factoring, but the corners do exist.

Five worked examples — apply the flowchart

Each of these starts at the top of the tree, follows one branch, and stops.

  1. x^2 - 9. 2 terms. Both perfect squares with a minus. Difference of squares. x^2 - 9 = (x - 3)(x + 3).
  2. x^2 + 6x + 9. 3 terms. Check perfect square: x^2 = (x)^2, 9 = 3^2, middle term 6x = 2 \cdot x \cdot 3. Yes. (x + 3)^2.
  3. x^2 - 7x + 12. 3 terms. Not a perfect square (12 is not a perfect square). Split-the-middle: product 12, sum -7. The pair is -3 and -4. (x - 3)(x - 4).
  4. ax + ay + bx + by. 4 terms. Grouping. a(x + y) + b(x + y) = (a + b)(x + y).
  5. 2x^3 - 4x^2. GCF first. Both terms share 2x^2. 2x^3 - 4x^2 = 2x^2(x - 2). Now what is left, x - 2, is a single linear term — no further factoring possible. Done.

Each of those took less than thirty seconds because the flowchart told you which method to use without any guessing.

Why the flowchart works

The tree is just the catalogue of standard identities organised by the most visible feature of any polynomial: how many terms it has. Each term-count maps to a small set of named methods, and within each method the steps are mechanical. The work that used to feel like guessing — "should I try grouping or the ac method?" — is now decided up front by counting.

The flowchart covers more than 95% of factoring problems in NCERT class 9 and 10 and most of the algebra in JEE Mains. The remaining 5% — irreducible polynomials, high-degree cases, exotic patterns — need either the Rational Root Theorem or genuine cleverness. For those, see the parent article on polynomial factorization.

Count the terms. Follow the branch. Apply the method. The only cases left to think about are the ones that genuinely deserve thought.