Algebra • Polynomial Factorization

Factoring by Grouping Calculator

Factor four-term cubic expressions, quadratic trinomials via middle-term splitting, and multivariable polynomials using the method of grouping. Step-by-step greatest common factor extraction and FOIL expansion verification.

|
Last Updated: September 2026
|
Verified Accurate: Symbolic Algebraic Rigor
Algebra • Factoring by Grouping Factorable over Rationals
Representative Expressions: Click to load & factor

Polynomial Expression Format

Cubic Grouping

Grouping Strategy Architecture

Step 1: Partition Pairs (Term 1 + Term 2) + (Term 3 + Term 4)
Step 2: Common Binomial Extraction g₁(px + q) + g₂(px + q) → (g₁ + g₂)(px + q)
Factored Form Solution Standard Rational Factors
Completely Factored Expression:
(x² + 2)(x + 3)
Original Polynomial: x³ + 3x² + 2x + 6
Expanded Check: x³ + 3x² + 2x + 6 (Verified by FOIL)
Analytical Step-by-Step Derivation Step-by-Step Solution
Direct Answer & Overview
Verified Educational Guide

How Do You Factor by Grouping?

To factor by grouping, partition a four-term polynomial into two pairs, extract the greatest common factor (GCF) from each individual pair to expose an identical binomial factor, and factor out that common binomial to produce a product of two lower-degree expressions.

Primary Mathematical Formula Canonical Four-Term Grouping Identity
Standard Equation
ƒ(x)
Q.E.D.
ax3+bx2+cx+d=x2(ax+b)+c′(ax+b)=(x2+c′)(ax+b)ax^3 + bx^2 + cx + d = x^2(ax + b) + c'(ax + b) = (x^2 + c')(ax + b)
Requires proportional coefficient ratios between paired terms or after algebraic rearrangement
Exact Formula
Input Parameters
Required
1
Polynomial term coefficients (a, b, c, d)
2
Algebraic structure (cubic, trinomial AC split, or multivariable)
Expected Outputs
Calculated
Fully factored binomial product (P_1)(P_2)
Extracted GCFs from each individual sub-group
Step-by-step pairing and distributive expansion verification
Worked Numerical Example
Instant Verification
Cubic Polynomial Grouping
→ ax^3 + bx^2 + cx + d = x^2(ax + b) + c(ax + b)
(x^2 + 2)(x + 3)

Fundamental Algebraic Principles of Factoring by Grouping

Factoring by grouping is an essential algebraic strategy that transforms an expanded sum of four or more polynomial terms into a compact product of lower-degree factors. It serves as the primary bridge between elementary single-term greatest common factor (GCF) extraction and advanced root-finding methods like the Rational Root Theorem.

The foundation of the technique relies on the distributive property of multiplication over addition applied in reverse:

Distributive Identity:
$$A \cdot C + B \cdot C = (A + B) \cdot C$$

In standard factoring, $C$ is a single variable or scalar constant. In factoring by grouping, $C$ is a composite algebraic expression—typically a binomial such as $(px + q)$ or $(ax + b)$.

When examining a general four-term cubic polynomial $P(x) = ax^3 + bx^2 + cx + d$, there is frequently no single non-trivial common factor shared across all four terms simultaneously. For example, in $x^3 + 3x^2 + 2x + 6$, the variable $x$ is absent from the constant term $6$, while the scalar $2$ divides only the latter two terms. However, by partitioning the four terms into two associative pairs $(x^3 + 3x^2)$ and $(2x + 6)$, commonalities emerge within each sub-group that allow factorization. For broader polynomial structures, explore our comprehensive Factoring Polynomials Calculator.

Standard Four-Step Grouping Algorithm

Every grouping factorization follows a deterministic four-step sequence. Executing these steps systematically ensures accurate results:

Step 1: Check for an Overall Greatest Common Factor

Before pairing terms, inspect all four terms for a global common factor. If present, factor it out completely. For instance, in $2x^3 + 6x^2 + 4x + 12$, factoring out $2$ yields $2(x^3 + 3x^2 + 2x + 6)$, simplifying subsequent steps.

Step 2: Group Terms into Pairs

Associate the terms into two distinct binomials: $(T_1 + T_2) + (T_3 + T_4)$. Pay special attention to signs when the third term is negative. If $T_3$ has a minus sign, write the grouping as $(T_1 + T_2) - (|T_3| - T_4)$ or $(T_1 + T_2) + (-|T_3| + T_4)$ to avoid sign distribution errors.

Step 3: Extract the GCF from Each Individual Group

Factor out the highest shared monomial from the first pair ($g_1$) and the second pair ($g_2$). This generates the intermediate structure $g_1(B) + g_2(B)$, where $B$ is the resulting binomial quotient.

Step 4: Factor Out the Shared Binomial

Because the binomial $B$ is common to both terms, factor it out to produce $(g_1 + g_2)(B)$. Finally, inspect both factors to determine if further factorization is possible (for example, applying difference of squares).

Splitting the Middle Term: The AC Method Connection

While grouping is most visibly used on four-term polynomials, its most frequent real-world application is solving quadratic trinomials of the form $ax^2 + bx + c$ where $a \neq 1$. This approach is widely known as the AC Method.

To factor $6x^2 + 11x + 4$:

1. Compute product of leading coefficient and constant: $a \cdot c = 6 \cdot 4 = 24$
2. Find two integer factors of $24$ that sum to middle coefficient $b = 11$: $8 \cdot 3 = 24$ and $8 + 3 = 11$
3. Split the middle linear term $11x$ into $8x + 3x$:
$$6x^2 + 11x + 4 \implies 6x^2 + 8x + 3x + 4$$
4. Apply standard grouping to the resulting four-term expression:
$$(6x^2 + 8x) + (3x + 4) = 2x(3x + 4) + 1(3x + 4) = (2x + 1)(3x + 4)$$

The AC method succeeds because splitting the middle term creates proportional coefficients across the pairs: $\frac{6}{8} = \frac{3}{4} = \frac{3}{4}$. For dedicated quadratic analysis, use our Factoring Quadratic Calculator or review roots via the Quadratic Formula Calculator.

Multivariable and Non-Standard Grouping Formations

Factoring by grouping is not limited to single-variable polynomials. In multivariable algebra, expressions frequently involve cross-products of variables:

Multivariable Linear Cross-Product Identity:
$$axy + bx + cy + d = x(ay + b) + c'(ay + b) = (x + c')(ay + b)$$

Consider $xy + 4x + 3y + 12$. Pairing the terms with $x$ together yields:

$$x(y + 4) + 3(y + 4) = (x + 3)(y + 4)$$

Another common multivariable pattern involves Three-to-One Grouping, where three terms form a perfect square trinomial, leaving the fourth term as a square:

$$x^2 + 6x + 9 - y^2 = (x + 3)^2 - y^2 = (x + 3 - y)(x + 3 + y)$$

Recognizing whether a four-term expression requires $2+2$ pairing or $3+1$ difference-of-squares partitioning is a key milestone in mastering algebraic factoring. For additional techniques involving squares, see our guide on Difference of Squares Factorization.

Comprehensive Worked Examples with Step-by-Step Solutions

Review these four step-by-step examples covering standard cubic grouping, sign management with negative terms, fractional grouping, and multi-step full factorization.

Case 1: Standard Cubic Polynomial

Problem: Factor $x^3 + 5x^2 + 4x + 20$ completely over the real numbers.

Solution Steps:
1. Associate pairs: $(x^3 + 5x^2) + (4x + 20)$
2. Extract GCF from first pair: $x^2(x + 5)$
3. Extract GCF from second pair: $4(x + 5)$
4. Combine terms: $x^2(x + 5) + 4(x + 5) = (x^2 + 4)(x + 5)$
5. Final Factored Form: $(x^2 + 4)(x + 5)$

Case 2: Sign Inversion and Negative Factor Extraction

Problem: Factor $2x^3 - 8x^2 - 3x + 12$ completely.

Solution Steps:
1. Associate pairs: $(2x^3 - 8x^2) + (-3x + 12)$
2. Extract GCF from first pair: $2x^2(x - 4)$
3. Extract negative GCF from second pair to match signs: $-3(x - 4)$
4. Factor common binomial $(x - 4)$: $(2x^2 - 3)(x - 4)$
5. Final Factored Form: $(2x^2 - 3)(x - 4)$

Case 3: Complete Multi-Stage Factorization

Problem: Factor $4x^3 + 12x^2 - x - 3$ over rational and linear factors.

Solution Steps:
1. Group pairs: $(4x^3 + 12x^2) - (x + 3)$
2. Extract common monomials: $4x^2(x + 3) - 1(x + 3)$
3. Factor common binomial: $(4x^2 - 1)(x + 3)$
4. Note that $4x^2 - 1$ is a difference of squares: $(2x - 1)(2x + 1)$
5. Completely Factored Form: $(2x - 1)(2x + 1)(x + 3)$

Case 4: Four-Variable Symmetric Expression

Problem: Factor $ac + ad + bc + bd$.

Solution Steps:
1. Group first two and last two: $(ac + ad) + (bc + bd)$
2. Factor $a$ from group 1 and $b$ from group 2: $a(c + d) + b(c + d)$
3. Extract common factor $(c + d)$: $(a + b)(c + d)$
4. Final Factored Form: $(a + b)(c + d)$

Rearrangement Strategies and Non-Standard Grouping Order

A common beginner mistake is assuming that terms must always be grouped in their original written order $(T_1 + T_2)$ and $(T_3 + T_4)$. If the initial pairing does not yield a common binomial, rearranging the terms can reveal an alternative factorization path.

Consider the expression $6x^2 - 4y + 3xy - 8$:

Attempt 1 (Original Order):
$$(6x^2 - 4y) + (3xy - 8)$$

The first pair has GCF $2$: $2(3x^2 - 2y)$. The second pair shares no common factor: $1(3xy - 8)$. The binomials do not match, so grouping fails.

Attempt 2 (Rearranged by Common Variable x):
Rearrange terms 2 and 3: $$6x^2 + 3xy - 4y - 8$$
Group: $(6x^2 + 3xy) - (8 + 4y)$
Extract GCF: $3x(2x + y) - 4(2 + y)$ → still mismatched.
Attempt 3 (Pairing Term 1 with Term 4):
Rearrange: $$(6x^2 - 8) + (3xy - 4y)$$
Extract GCFs: $$2(3x^2 - 4) + y(3x - 4)$$
Notice $3x^2 - 4 \neq 3x - 4$, so this particular expression is irreducible over rational groupings.

Systematically testing all three independent pairings—$(1,2)(3,4)$, $(1,3)(2,4)$, and $(1,4)(2,3)$—definitively determines whether an expression is factorable by $2+2$ grouping.

Identifying Irreducible Polynomials and Failure Conditions

Not every four-term polynomial can be factored by grouping over the integers $\mathbb{Z}$ or rational numbers $\mathbb{Q}$. A rigorous mathematical criterion exists to evaluate factorability without guessing:

Proportional Ratio Theorem for Grouping:
A cubic polynomial $ax^3 + bx^2 + cx + d$ is factorable by consecutive grouping if and only if:
$$\frac{a}{b} = \frac{c}{d} \iff a \cdot d = b \cdot c$$

The cross-product of the outer coefficients must equal the product of the inner coefficients.

For example, in $2x^3 + 5x^2 + 4x + 10$:

$$a \cdot d = 2 \cdot 10 = 20 \qquad b \cdot c = 5 \cdot 4 = 20 \implies 20 = 20 \quad \text{(Factorable)}$$

Conversely, in $x^3 + 2x^2 + 3x + 4$:

$$a \cdot d = 1 \cdot 4 = 4 \qquad b \cdot c = 2 \cdot 3 = 6 \implies 4 \neq 6 \quad \text{(Irreducible via Consecutive Grouping)}$$

When this ratio test fails across all permutations, higher-degree techniques such as Cardano's formula, Descartes' Rule of Signs, or our Synthetic Division Calculator should be used to find irrational or complex roots.

Geometric and Area Model Representations

Factoring by grouping has an intuitive geometric interpretation using area models (Punnett-style algebraic tiles). Consider a large rectangle partitioned into four smaller rectangular regions:

Dimensions Width: $x$ Width: $b$
Height: $x^2$ Area: $x^3$ Area: $b x^2$
Height: $c$ Area: $c x$ Area: $b c$

The total area is the sum of the four sub-regions: $\text{Total Area} = x^3 + bx^2 + cx + bc$. Because the outer boundary forms a single large rectangle, its area also equals $\text{Height} \times \text{Width} = (x^2 + c)(x + b)$. Factoring by grouping is simply the process of discovering the outer dimensions of this composite geometric rectangle.

Common Algebraic Mistakes and Verification Rules

Avoid these frequent pitfalls when working through grouping factorizations:

1. Sign Error When Third Term is Negative

When grouping $x^3 + 2x^2 - 5x - 10$, placing parentheses without distributing the negative sign produces $(x^3 + 2x^2) - (5x - 10)$, which changes the constant to $+10$. The correct grouped form is $(x^3 + 2x^2) - (5x + 10)$.

2. Stopping Before Full Factorization

Arriving at $(x^2 - 9)(x + 4)$ is an incomplete factorization. The factor $(x^2 - 9)$ must be factored further into $(x - 3)(x + 3)$, giving the complete result $(x - 3)(x + 3)(x + 4)$.

3. Forgetting the Implicit Coefficient of 1

In expressions like $x^2(x + 2) + (x + 2)$, students sometimes omit the $+1$ coefficient on the second term, mistakenly writing $x^2(x + 2)$. The correct factorization is $(x^2 + 1)(x + 2)$.

4. Always Verify with FOIL Multiplication

Multiply your final factors using the distributive property or FOIL to verify that the expansion reproduces the original four-term expression with identical coefficients and signs.

Fact-Checked & Verified • Computational Accuracy Standards
Updated September 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is factoring by grouping?
Factoring by grouping is an algebraic factorization technique primarily applied to polynomials with four or more terms. The terms are partitioned into pairs or subsets that each share a greatest common factor (GCF). Factoring out each group's GCF reveals an identical binomial factor, which is subsequently factored out of the entire expression.
When should factoring by grouping be used?
Factoring by grouping is the primary technique for four-term polynomials like ax^3 + bx^2 + cx + d or axy + bx + cy + d. It is also the underlying engine for the AC method used to factor three-term quadratic trinomials ax^2 + bx + c after splitting the middle linear term into two terms.
What condition must be met for a four-term polynomial to factor by grouping?
For a four-term polynomial to factor under standard sequential grouping, the ratio of the coefficients of the first pair must equal the ratio of the coefficients of the second pair (a/b = c/d). If this condition fails, rearranging terms into alternative pairings may reveal a common binomial factor.
What should you do if the grouped binomials have opposite signs?
If the extracted binomials differ only by a sign (for example, (x - 4) versus (4 - x)), factor a negative sign (-1) out of the second group. Since 4 - x = -(x - 4), factoring out -1 aligns the binomial factors so they match exactly.
Can all four-term polynomials be factored by grouping?
No. Many four-term polynomials are irreducible over the integers or rational numbers. If no arrangement of paired terms yields a shared common binomial factor, the polynomial cannot be factored by grouping and requires higher-order techniques like the Rational Root Theorem or numerical approximation.