Try it with your numbers
Show every step
The method works because that shared binomial is hiding in plain sight. Use the solver above on any four-term polynomial to see every step, then read on for the parts that decide whether you get the answer: what to do with negative signs, how to reorder terms, and a quick test that tells you whether grouping can work at all.
How does factoring by grouping work?
Grouping is the distributive property run backward. Expand by treating as a single block:
Four terms appear because nothing combines. The FOIL method is the same expansion with a name for each of the four products. Grouping starts from the finished four terms and recovers the two pieces and .
The payoff is the shared block. After you pull a GCF out of each pair, you hold two terms that are the same binomial multiplied by different coefficients. That binomial then factors out of both, and what is left over, , becomes the second factor. If the two binomials differ, that pairing has not exposed any structure, and you need a different pairing.
Quick check
Answer:
How to factor by grouping, step by step
Follow this order every time:
- Pull out any GCF shared by all four terms.
- Split what remains into two pairs.
- Factor the GCF out of each pair, choosing a negative GCF when that makes the leftover binomials match.
- Pull out the shared binomial.
- Check whether either factor can be factored further.
In , the belongs to all four terms. Skipping it still works, but leaves a factor that keeps factoring, and you may stop too early.
Take . No factor is shared by all four terms, so split into pairs and factor each one. The second pair has a negative leading coefficient, so pull out rather than :
The first factor is a difference of squares, which factors again into . The complete answer is . If the cubic had come with a common factor, factoring out the GCF would have been the first move.
What if the two binomials are opposites?

This is the trap that costs the most points. Take . Pairing in the given order and factoring each pair gives:
The binomials look different, so many students decide grouping has failed. They are opposites: . Factor out instead of from the second pair, and the binomials match:
Expanding confirms it: is the original. The habit to build is to write each pair so its binomial starts with the same variable term, positive. When a pair ends with a leftover that reads , flip it by factoring out a negative.
What to do when the first grouping fails
Sometimes the given order cannot work. Consider . The first pair, and , shares no factor except , so there is nothing to pull out. Do not give up. Reorder so that terms with a shared factor sit together:
The usual repair is to swap the two middle terms, as above. Another is to pair by variable, putting every term that contains together. Several reorderings may succeed, and they all produce the same factors, only listed in a different order.
Try this: Reorder so the pairs share a factor, then factor it. Expand your answer to confirm. (Answer: .)
Can you tell if grouping will work before you start?

Yes, and the test saves a lot of trial and error. If four terms came from , they are , , and . The two opposite corners multiply to the same thing as the other two:
So look for two terms whose product equals the product of the other two. Those two belong in the first and last positions. In , the products are and . They match, which is why the reordering above succeeded.
Now try . The possible products are against , then against , then against . Nothing matches, so no ordering will group. When that happens:
- Test for rational roots with the Rational Root Theorem. The candidates here are and , and none gives zero, so this cubic does not factor over the integers.
- Do not assume failure means “prime”. The polynomial also fails the test, yet is a root, and the Factor Theorem then gives .
Quick check
Answer:
Can you factor trinomials by grouping?
Yes. A trinomial is what you get when the two middle terms of a four-term expansion combine. Splitting the middle term pulls them apart again. You need two numbers and with and . That condition is exactly the product test from the previous section, applied to , , and .
Factor . Here . The pair that multiplies to and adds to is and . Split the middle term, then group:
Expanding gives , which collapses back to . This is the AC method, and it is the reliable option when guessing at factoring trinomials turns into a guessing game. The box method organizes the same numbers in a grid.
Writing instead gives , the same answer. Pick whichever order makes the first pair easy.
Factoring by grouping with cubics, two variables and 6 terms
The pattern does not care about the exponent. A degree 3 polynomial with four terms is the most common case, and groups into in two lines. With two variables, the shared block is simply a binomial in both letters, as in above.
Fractions are easier than they look. Pull out the fraction first: . Six terms group into three pairs or two triples. For example, .
Sometimes the right grouping is three terms against one. In , the first three terms are a perfect square trinomial, so the expression equals . That is a difference of squares, and it factors as . Four terms is a signal to try pairs first, but not the only option.
How to check a factoring by grouping answer
The slow check is to multiply your factors back out with multiplying polynomials and compare. The fast check is to substitute a number. A correct factoring must give the same value on both sides for every .
Test against at . The polynomial gives . The product gives . They agree. Try as well: the polynomial gives and the product gives .
One agreeing value is evidence, not proof, because an error can happen to cancel at a single number. Two different values make a slip very unlikely. Avoid values that make a factor zero, since both sides then read and tell you little. Finally, confirm that no factor you wrote can still be factored.
Quick check
Answer:
Where factoring by grouping is used
The main use is solving equations. Once a cubic is a product, the zero-product rule turns it into three small equations:
It also simplifies rational expressions. The fraction has the denominator . After factoring the top, and cancel, leaving for .
Grouping also sits inside the AC method for quadratics, so most trinomial work with a leading coefficient above uses it, even when it is not named. To build speed, work through factoring practice problems that mix grouping with the other methods, and use the order GCF, then count terms, then grouping or a special pattern.
Practice problems
0 of 5 solved
- Factor by grouping:
Answer:
Group: . Factor each pair: . Pull out the shared binomial: . - Factor by grouping:
Answer:
Group: . Factor from the first pair and from the second: . Pull out : . - Factor by grouping:
Answer:
The first pair and shares nothing, so reorder: . Factor: . Pull out : . - Factor by splitting the middle term.
Answer:
, and and multiply to and add to . Split: . Group: . - Factor completely:
Answer:
Pull out the GCF : . Group: . Then , so the result is .
Common questions
What is factoring by grouping?
It is a method that factors a four-term polynomial by splitting it into two pairs, pulling the GCF out of each pair, and then pulling out the binomial the pairs share. It reverses the expansion .
What do you do if the binomials do not match after grouping?
First check whether they are opposites, such as and , and factor out a from one pair to fix it. If that fails, reorder the terms (swapping the two middle terms is the usual fix) and group again.
Can you factor by grouping with three terms?
Yes, for a trinomial you split the middle term into two terms whose product is and whose sum is . That gives four terms, which you then group. This is called the AC method.
Does the order of the terms matter when factoring by grouping?
It matters for the grouping, not for the final answer. A bad order produces pairs with no common binomial, but any order that does work gives the same factors.
How do you know a polynomial cannot be factored by grouping?
For four terms that come from two binomials, the product of one pair of terms must equal the product of the other two. If no pairing satisfies that, grouping cannot work. The polynomial may still factor by another method, such as finding a rational root.
Should you take out the GCF before grouping?
Yes. A factor common to all four terms should come out first, because it keeps the numbers small and prevents a final answer that can still be factored.