Factor by Grouping Calculator
Grouping is the only factoring method where you are allowed to be wrong once and carry on. You pair the terms, take a factor out of each pair, look at what is left — and if the two brackets do not match, you have not failed. You have just learned that this pairing is the wrong one, and there are two others to try.
Almost every factor by grouping calculator hides that. It prints the answer as though the first pairing always works. What people actually want from a factoring by grouping calculator with steps is the attempts, so that is what this one shows: the pairing, what came out of each pair, and whether the brackets matched — including the ones that did not.
The Method, and the One Test
Take x³ + 3x² + 2x + 6. Pair the first two and the last two:
(x³ + 3x²) + (2x + 6)
= x²(x + 3) + 2(x + 3)
= (x + 3)(x² + 2)
The whole method is that middle line. Take the greatest common factor out of each pair and look at what is left in the brackets. Same bracket both times — that is the test, and it is the only one. When it passes, that bracket lifts out and the two things you took out become the second factor.
The Minus That Catches Everyone
Now x³ − 3x² − 2x + 6. The second pair is −2x + 6, and here is where marks disappear:
| take out 2 | 2(−x + 3) ✗ does not match |
| take out −2 | −2(x − 3) ✓ matches x²(x − 3) |
Both lines are true. Only the second one is useful. When the first term of the second pair is negative, pull the minus out with the factor — otherwise the bracket comes out back to front and you conclude, wrongly, that grouping does not work here.
The calculator marks that factor in the working and says so when it happens.
When the First Pairing Fails: Reorder
Four terms can be split into pairs in exactly three ways: first with second, first with third, or first with fourth. The order the terms happen to be written in is not fixed, and nothing stops you rearranging them.
x³ + 2x + 3x² + 6 looks unpromising as it stands — (x³ + 2x) and (3x² + 6) give x(x² + 2) and 3(x² + 2), which do match. Sort the terms by degree first and it is the same problem as before.
This is the step most tools perform invisibly. Here each attempt is listed with its verdict, so when a pairing fails you can see why it failed rather than just watching a different answer appear.
Take the Common Factor Out First
If all four terms share something, remove it before pairing anything. 2x⁴ + 6x³ + 4x² + 12x has a 2 and an x in every term, so it becomes 2x(x³ + 3x² + 2x + 6) — and what is inside is the example from the top of this page.
Skipping this is the usual reason a factorisation is marked incomplete rather than wrong. To factor completely by grouping, the common factor has to come out first and stay in the answer.
Grouping and Trinomials
A trinomial has three terms, so it cannot be grouped as it stands. But the AC method turns it into four: multiply a by c, find two numbers with that product and a sum of b, and split the middle term with them. Now you have four terms and grouping finishes the job.
That is why the two methods are always taught together, and why a search for a factor by grouping AC method calculator, or for a factor by grouping trinomials calculator, really wants both halves. The factoring trinomials calculator does the splitting half and shows the number-pair search; this page does the grouping half for four terms directly.
When No Pairing Works
x³ + x² + x + 2 will not group. All three pairings leave two different brackets, and that is the end of it.
This is worth being clear about, because it surprises people: a polynomial can have factors that grouping cannot reach. Grouping is a technique that exposes a factor when the terms happen to line up, not a general method that always works. When it fails, the factoring polynomials calculator works through the full ladder of techniques instead.
How to Use This Factor by Grouping Calculator
To factor each polynomial by grouping, type one with exactly four terms and press =. Terms can be in any order, brackets are expanded first, and a common factor is taken out for you. The keypad has x, powers, brackets and a fraction bar; the key icon switches to your own keyboard.
The band gives the factored form and says whether the terms had to be reordered. Tap show how the terms were paired and every attempt opens — the pairing, what came out of each pair in blue, and the shared bracket in green. Below that, the working step by step, ending with the brackets multiplied back out to check.
Worked Examples
| Polynomial | Grouped | Factored |
|---|---|---|
| x³ + 3x² + 2x + 6 | x²(x + 3) + 2(x + 3) | (x + 3)(x² + 2) |
| x³ − 3x² − 2x + 6 | x²(x − 3) − 2(x − 3) | (x − 3)(x² − 2) |
| 2x³ + 3x² − 8x − 12 | x²(2x + 3) − 4(2x + 3) | (2x + 3)(x² − 4) |
| 6x³ + 9x² + 4x + 6 | 3x²(2x + 3) + 2(2x + 3) | (2x + 3)(3x² + 2) |
| 2x⁴ + 6x³ + 4x² + 12x | 2x taken out first | 2x(x + 3)(x² + 2) |
| x³ + x² + x + 2 | all three pairings fail | will not group |
Row three is the one to study. The second pair is −8x − 12, and taking out −4 rather than 4 is what makes (2x + 3) appear twice.
Frequently Asked Questions
How do you factor by grouping?
What do you do when factoring by grouping does not work?
Why does the second factor sometimes have to be negative?
Can you factor a trinomial by grouping?
How many ways can four terms be paired?
Do you take out a common factor before grouping?
Is this factor by grouping calculator free?
Whether you searched for a factor by group calculator or the longer name, the method underneath is the same, and it rewards patience more than cleverness. Take the common factor out, pair the terms, watch the sign on the second pair, and if the brackets do not match, reorder and try again — you have two more goes. Use the calculator above to see each attempt judged, and the pattern of which pairings work starts to become obvious.