The AC method with the search made visible, not just the brackets it produced.
Calculator
Factor a trinomial
The common factor comes out first.
Write powers as x^2 or x². Any single letter works as the variable. Four terms are grouped; two-term squares and cubes are recognised.
6x² − x − 2
(2x + 1)(3x − 2)
General trinomial — AC method · checked by multiplying back out
The factor pairs of −12, and their sums
Every integer factor pair of −12 that was tried, with the sum of each pair and whether it matched the middle coefficient
Pair
Product
Sum
Match?
1, −12
−12
−11
no
−1, 12
−12
11
no
2, −6
−12
−4
no
−2, 6
−12
4
no
3, −4
−12
−1
yes
Working
1Multiply a by c: 6 × −2 = −12Now find two numbers that multiply to −12 and add to −1.This is the whole AC method. Everything after it is bookkeeping.
2The pair3 × −4 = −12 and 3 − 4 = −1
3Split the middle term using that pair6x² + 3x − 4x − 2Either order works — the shared bracket comes out the same, which is worth trying once to convince yourself.
4Take the common factor out of each pair3x(2x + 1) − 2(2x + 1)The same bracket has to appear in both halves. If it does not, the pair was split in the wrong order — swap them and regroup.
5Take the shared bracket out(2x + 1)(3x − 2)
6Check by multiplying back out(2x + 1)(3x − 2) = 6x² − x − 2It matches the expression you entered.
Verified: (2x + 1)(3x − 2) multiplies back out to 6x² − x − 2.
What this tool shows
Not just the factors — the search that found them, and the proof when there are none. Every factor pair of ac appears beside its sum, the common factor comes out first, and the answer is multiplied back out in front of you.
The AC method with every factor pair of ac listed and its sum shown
The greatest common factor pulled out first, before anything else
Perfect squares, differences of squares, and sums and differences of cubes
Trinomials in x² such as x⁴ − 5x² + 4, and four-term expressions by grouping
The AC search shown, pair by pair a ≠ 1, x⁴ trinomials, cubes, grouping Every answer multiplied back out Free, no signup
Free, no signup — every answer checked by expansion.
Updated 6 September 2026 · Works in any browser, no installation
To factor ax² + bx + c, find two numbers that multiply to a×c and add to b, split the middle term with them, and group. For 6x² − x − 2 that pair is 3 and −4, and the answer is (2x + 1)(3x − 2). When a is 1 the pair is the answer directly: x² + 5x + 6 factors as (x + 2)(x + 3).
At a glance
Formula shown
Find m, n with m·n = ac and m + n = b. Then ax² + bx + c = ax² + mx + nx + c, grouped into two binomials.
Scenario support
Any trinomial, a two-term square or cube, a trinomial in x², or a four-term expression to group.
Educational estimate
Planning support from the values you enter — not professional advice.
The AC method, and why the search is worth seeing
Factoring a trinomial is one search and some bookkeeping. The search is for two integers whose product is a×c and whose sum is b; everything after that is mechanical. x² + 5x + 6 has a×c = 6 and b = 5, so the pair is 2 and 3, and because a is 1 those numbers go straight into the brackets: (x + 2)(x + 3).
Signs are where this goes wrong, and the pattern is worth internalising rather than re-deriving each time. When c is positive both numbers share b’s sign — x² − 5x + 6 needs two negatives, giving (x − 2)(x − 3). When c is negative they have opposite signs and the larger one carries b’s sign: x² − x − 6 factors as (x + 2)(x − 3).
The calculator lists the pairs it tried with their sums, and marks the one that worked. That table is not decoration — it is the method. A tool that prints only the final brackets has removed the part being taught, and it also removes the only way to spot that you were looking at the wrong product all along.
Take the common factor out first — always
2x² + 10x + 12 factors as 2(x + 2)(x + 3). It is also true that it equals (2x + 4)(x + 3), and that answer is marked wrong. The reason is not pedantry: (2x + 4) still has a factor of 2 in it, so the expression has not been fully factored, and every downstream use — cancelling in a fraction, reading off roots, finding a common denominator — assumes it has been.
Taking the GCF out first also makes the search smaller. Without it, 2x² + 10x + 12 has a×c = 24 and a longer list of pairs to check; with the 2 removed, a×c = 6 and there are four. On a trinomial with larger coefficients that difference is the difference between a search you can do in your head and one you cannot.
The common factor can include the variable. 3x³ − 6x² is 3x²(x − 2), and the x² has to come out for the same reason the 3 does. The calculator pulls both, in that order, before it looks at anything else.
When a is not 1, stop guessing and start grouping
With a = 1 the two numbers from the search go straight into the brackets. With a ≠ 1 they do not, and the usual advice — try pairs of factors of a against pairs of factors of c until something works — is trial and error that gets slow fast. Grouping replaces the guessing with a construction that cannot fail once the pair is found.
6x² − x − 2: a×c = −12, and the pair that adds to −1 is 3 and −4. Split the middle term with them — 6x² + 3x − 4x − 2 — then take a common factor out of each half: 3x(2x + 1) − 2(2x + 1). The same bracket appears twice, which is the signal that it worked, and pulling it out gives (2x + 1)(3x − 2).
Two practical notes. The order of the split does not matter: putting −4x first and 3x second produces the same two brackets, and trying it once is the fastest way to be convinced. And the sign on the second group’s common factor is not optional — it has to be chosen so the bracket matches, which for a negative n means factoring out a negative. Getting that sign from the first bracket rather than from a greatest-common-divisor is the difference between (x − 2)(x − 3) and an answer that does not expand back.
The four patterns worth recognising on sight
Some expressions do not need the search at all, and spotting them saves the whole method:
Difference of squares. p² − q² = (p − q)(p + q), with no middle term because the cross products cancel. 4x² − 25 is (2x − 5)(2x + 5). A sum of squares does not factor over the reals at all, and that asymmetry is the single most useful thing on this list.
Perfect square trinomial. The first and last terms are squares and the middle is twice the product of their roots. 9x² − 24x + 16 is (3x − 4)(3x − 4). It is exactly the case where the discriminant is zero, and the same condition the Completing the Square Calculator solves for when it finds the missing constant.
Difference and sum of cubes. p³ − q³ = (p − q)(p² + pq + q²), and p³ + q³ = (p + q)(p² − pq + q²). x³ − 8 is (x − 2)(x² + 2x + 4). The signs are the whole trick: the binomial keeps the sign, the trinomial takes the opposite in its middle term, and its last term is always positive.
A common factor hiding in plain sight. Covered above, and worth listing here because it is the pattern people skip when they are looking for a clever one.
The trinomial in a cube factorisation, p² + pq + q², never factors further over the integers — its discriminant is −3q², which is negative for every non-zero q. That is worth knowing so you stop trying.
Trinomials that are not quadratics
x⁴ + 5x² + 6 is a trinomial and is not a quadratic, and most calculators refuse it. It is quadratic in x², so the same search applies with x² playing the role of x: the pair is 2 and 3, and the factorisation is (x² + 2)(x² + 3).
The interesting case is when the resulting factors can go further. x⁴ − 5x² + 4 gives (x² − 1)(x² − 4) at the first pass, and both of those are differences of squares, so the real answer is (x − 1)(x + 1)(x − 2)(x + 2) — four linear factors. Stopping at the pair of quadratics is a very common half-answer, and the rule that prevents it is simple: factoring is not finished until no factor can be factored again. The tool re-examines each factor it produces for exactly that reason.
The same works for any even power — x⁶ + 5x³ + 6 is quadratic in x³ — and for expressions in any letter. The variable does not have to be x; a single letter of any kind is read as the variable, so a trinomial in t or n factors the same way.
Four terms: grouping in its own right
Grouping is not only a step inside the AC method — it is a technique for four-term expressions where no trinomial search applies. x³ + 2x² + 3x + 6 splits into (x³ + 2x²) + (3x + 6), and taking a common factor out of each pair gives x²(x + 2) + 3(x + 2). The shared bracket comes out: (x + 2)(x² + 3).
It works exactly when the same bracket appears in both halves, which is a real condition and not a guarantee. When it does not, the fix is usually to try the other pairing — first and third against second and fourth — before concluding the expression is prime. Rearranging is allowed; the terms of a sum commute.
This is the technique that generalises. There is no formula for factoring a general quartic, but grouping, the special patterns above, and pulling out a common factor between them handle most of what appears in a course.
When it is prime, and how you can be sure
x² + x + 1 does not factor over the integers, and that is the answer — not a failure of the method. The proof is short: any factorisation would need two integers multiplying to a×c = 1 and adding to 1, the divisors of 1 are a list of length one, and neither ±1 pairing works. Checking a finite list exhaustively is a proof, and the calculator says so rather than trailing off.
The discriminant gives the same answer without any searching. A trinomial factors over the rationals precisely when b² − 4ac is a perfect square, so a quick check settles it before you start: x² + x + 1 has a discriminant of −3, and no negative number is a square.
“Prime” here means prime over the integers, which is what the word means when a question says “factor”. x² − 2 is prime in that sense, and it does factor over the reals as (x − √2)(x + √2). If surd factors are what you want, the roots from the Quadratic Formula Calculator give them directly — a root r corresponds to a factor (x − r). Reporting those as “the factorisation” on this page would be answering a question that was not asked.
Sources and methodology
The identities and the method above are derivations rather than citable figures, so they are written out and checkable in place. What is cited is the standard reference for the underlying result — that factorisation over the integers is unique, which is what makes “the” factorisation a well-defined thing to ask for.
Method. Every factorisation on this page comes from one engine, src/lib/factoring-trinomials.ts, over the exact-rational core in src/lib/algebra/. No answer is asserted: each one is re-parsed, multiplied back out, and compared coefficient by coefficient with the expression that was entered, and the comparison is printed. The factor-pair search runs over the exact integer divisors of ac, so a “prime” verdict is an exhausted list rather than a give-up. That engine is verified on every change against 49 hand-written assertions, including an exhaustive sweep over more than eleven thousand integer trinomials confirming that every factorisation it prints re-expands to the polynomial it came from. The count and the per-case breakdown are published on the formula verification page.
Read the guide
Everything above is about how to factor. The question of whether to reach for factoring at all is settled one step earlier, and Factoring, Completing the Square, or the Quadratic Formula — Which to Use is where that decision is made: the discriminant tells you in advance whether an integer factorisation exists, which turns the AC search from an open-ended hunt into a question with a yes-or-no answer. It is the single habit that saves the most time on this topic.
Related calculators
The same expression, other questions:
Quadratic FormulaSolve any quadratic with exact roots — surds stay surds and a negative discriminant gives the complex pair — plus the vertex, the factored form and every step of the working.
DiscriminantEvaluate b² − 4ac, the cubic and quartic discriminants, or D = f_xx·f_yy − (f_xy)² for the second-derivative test, in exact arithmetic so the sign is never a rounding artefact.
Completing the SquareRewrite ax² + bx + c as a(x − h)² + k with every step shown, solve by the method, or find the constant that completes a square — all in exact fractions.
ScientificTrigonometry, logarithms, powers, roots, and factorials with correct order of operations, memory registers, history, and keyboard entry.
GPACalculate your GPA from letter grades or percentages and credit hours, or combine a new term with your existing cumulative GPA.
PercentageSolve X% of Y, what percent X is of Y, reverse percentage, increase/decrease, discounts, and tax, tip, or commission.
This calculator factors polynomials over the integers and shows the route it took. Where no integer factorisation exists it reports the expression as prime and says why, rather than returning decimal approximations of irrational factors — those are a different question, and the Quadratic Formula Calculator answers it. Every answer is multiplied back out and compared with the input before it is displayed. It is a study and checking aid; the working is printed because in the setting where this is asked, the method is what is being marked.
Published the factoring trinomials calculator: the AC method with every factor pair of ac listed beside its sum, so the search is visible rather than only its result.
Handles a ≠ 1 by grouping rather than trial and error, pulls the greatest common factor out first, and recognises perfect squares, differences of squares, sums and differences of cubes, trinomials in x², and four-term expressions by grouping.
A trinomial with no integer factorisation is reported as prime with the reason, rather than falling back to decimal approximations of irrational factors.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.