Factoring by Grouping Calculator
Enter a four-term polynomial and watch it get paired, reduced, and factored one step at a time.
What Grouping Actually Does
Every other factoring method on this site works on a specific shape: a trinomial, a binomial that’s a difference of squares, a perfect cube. Grouping is different — it’s less a formula and more a trick you apply to four-term polynomials that don’t fit any of those neat patterns on their own.
The idea is simple once you see it: split the four terms into two pairs, pull the greatest common factor out of each pair, and if you picked the pairing correctly, both pairs will leave behind the same leftover binomial. That shared binomial becomes one factor, and the two things you pulled out become the other.
It only works reliably on polynomials with exactly four terms, arranged (or rearrangeable) so that the first two share a factor and the last two share a different factor — but both leave the same expression behind. When that condition holds, grouping turns a cubic or quartic expression into two binomials almost mechanically.
General pattern for a 4-term polynomial
Three Worked Examples
The calculator above will do this instantly, but seeing the reasoning laid out is what actually makes the method stick. Here are three examples that cover the situations you’ll run into most.
Example 1 — the clean case
Step 1. Group the first two terms and the last two terms: (x³ + 3x²) + (2x + 6).
Step 2. Pull the GCF from each pair. The first pair shares x², leaving x²(x + 3). The second pair shares 2, leaving 2(x + 3).
Step 3. Both pairs left behind the same binomial, (x + 3) — that’s the signal that the grouping worked. Factor it out: (x + 3)(x² + 2).
That’s the answer. You can check it by expanding (x + 3)(x² + 2) back out: x³ + 2x + 3x² + 6, which reorders to the original expression.
Example 2 — with a coefficient other than 1
Step 1. Group: (6x³ − 9x²) + (4x − 6).
Step 2. The first pair’s GCF is 3x², leaving 3x²(2x − 3). The second pair’s GCF is 2, leaving 2(2x − 3).
Step 3. Same binomial again, (2x − 3), so it factors out: (2x − 3)(3x² + 2).
The only thing that changed from Example 1 is that the leading coefficients weren’t 1 — you still just chase the GCF of each pair, whatever it happens to be.
Example 3 — a negative last term (and a bonus factor)
Step 1. Group: (x³ − 5x²) + (−x + 5).
Step 2. First pair: GCF is x², leaving x²(x − 5). Second pair is where people usually trip up — the GCF here is −1, not 1. Pull out −1 and you get −1(x − 5).
Step 3. Same binomial, (x − 5), so: (x − 5)(x² − 1).
Here’s the bonus: (x² − 1) is itself a difference of squares, so this doesn’t have to stop there. Keep going and you land on the fully factored form: (x − 5)(x − 1)(x + 1). Grouping got you to the first split; it’s worth always checking whether either resulting factor can be broken down further.
When grouping doesn’t work
Group it the same way: (x³ + 2x²) + (3x + 4) → x²(x + 2) + 1(3x + 4). The leftover binomials, (x + 2) and (3x + 4), don’t match. No amount of adjusting the sign fixes that — they’re genuinely different expressions.
This is a real outcome, not a mistake on your part. Some four-term polynomials simply don’t factor by grouping, and this method won’t force an answer that isn’t there. If you paste this into the calculator above, it’ll tell you plainly that grouping — and every other method it checks — doesn’t apply. That’s useful information: it tells you the expression may only be reducible numerically (via the rational root theorem, for instance) rather than by clean algebraic factoring.
Grouping vs. the Other Factoring Methods
Grouping is really a fallback for when a polynomial doesn’t match a more specific pattern. Here’s how to tell which method actually applies before you start:
| If your polynomial has… | Try this instead |
|---|---|
| 3 terms (ax² + bx + c) | Trinomial factoring |
| 2 terms, both perfect squares, subtracted | Difference of squares |
| 2 terms, both perfect cubes | Difference/sum of cubes |
| Every term shares a common factor | GCF factoring |
| 4 terms, no obvious shared factor across all of them | Factoring by grouping (this page) |
Common Mistakes
- Forgetting the sign when the second pair starts negative. If the third term is negative, you’re often factoring out a negative GCF, not a positive one — skip that and the binomials won’t match even though the polynomial does factor.
- Stopping too early. As in Example 3 above, one of your two resulting factors might still be factorable. Always glance at each piece before calling it done.
- Assuming grouping always works. It’s a technique for a specific situation, not a universal method. If the leftover binomials don’t match after pairing first-two/last-two, that’s a real result — try rearranging the order of the terms before concluding it doesn’t factor at all.
- Forgetting to check GCF first. If all four terms already share a common factor, pull that out before grouping — it keeps the numbers smaller and the pairing easier to spot.
