Factor by Grouping Calculator

FACTORED BY GROUPING
Type a four-term polynomial above and press = to group it.
The pairing
Enter a polynomial with exactly four terms. A common factor is taken out first, and if the natural pairing does not work the terms are reordered and tried again.
How the grouping works, step by step

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.

Factor by Grouping Calculator logo — a free tool from Monkza

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 22(−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 + 6x²(x + 3) + 2(x + 3)(x + 3)(x² + 2)
x³ − 3x² − 2x + 6x²(x − 3) − 2(x − 3)(x − 3)(x² − 2)
2x³ + 3x² − 8x − 12x²(2x + 3) − 4(2x + 3)(2x + 3)(x² − 4)
6x³ + 9x² + 4x + 63x²(2x + 3) + 2(2x + 3)(2x + 3)(3x² + 2)
2x⁴ + 6x³ + 4x² + 12x2x taken out first2x(x + 3)(x² + 2)
x³ + x² + x + 2all three pairings failwill 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?
Split the four terms into two pairs. Take the greatest common factor out of each pair. If the bracket left behind is the same both times, it lifts out as one factor, and what you took out of each pair becomes the other. If the brackets differ, reorder the terms and pair them a different way.
What do you do when factoring by grouping does not work?
Try the other pairings first — four terms can be split three different ways, and the order they are written in is not fixed. If none of the three leaves a shared bracket, grouping genuinely does not factor that polynomial. It is a technique, not a rule that always applies.
Why does the second factor sometimes have to be negative?
Because the bracket has to come out identical both times. In x³ − 3x² − 2x + 6 the second pair is −2x + 6, and you must take out −2 rather than 2 to leave (x − 3). Taking out the positive gives (−x + 3), which does not match, and that is the commonest mistake in the whole method.
Can you factor a trinomial by grouping?
Yes, but not directly — a trinomial has three terms and grouping needs four. Split the middle term first using the AC method, which turns ax² + bx + c into four terms, and then group those. That is exactly how the AC method finishes.
How many ways can four terms be paired?
Three. First with second, first with third, or first with fourth — the remaining two make the other pair. This calculator tries all three and shows you each attempt, so you can see why one worked and the others did not.
Do you take out a common factor before grouping?
Yes, and first. If all four terms share something, take it out before you pair anything. The numbers left behind are smaller and the pairing is easier to see, and it is the difference between a factorisation that is complete and one that stops a step short.
Is this factor by grouping calculator free?
Completely free, with every pairing and every step shown, and no limit on how many polynomials you factor. No account, no download, and nothing held back behind a subscription.

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.