Factoring Calculator
Enter a polynomial and get the factored form with step-by-step solutions.
Use ^ for powers — or just type x2 for x². Example: x^2 + 5x + 6.
How to Use This Factoring Calculator
Type any polynomial into the box above — quadratics, trinomials, binomials with a common factor, or a difference of squares. The calculator returns the fully factored form along with the steps it used, so you can follow the same method on your homework.
What Is Factoring?
Factoring is the reverse of multiplying. When you multiply (x + 2)(x + 3) you get x² + 5x + 6. Factoring means starting from that expanded polynomial and recovering the original factors. It is the single most useful skill in algebra — you need it to simplify rational expressions, solve quadratic equations, and find the x-intercepts of a parabola.
Every factoring problem you will meet in a standard algebra course falls into one of four patterns below.
Common Factoring Methods
1. Greatest Common Factor (GCF)
Always try this first. Pull out the largest factor shared by every term. For 6x² + 9x, both terms share 3x, so the factored form is 3x(2x + 3). If the polynomial has a GCF, nothing else you do afterward will be correct until you remove it. For a standalone gcd calculation, use the greatest common factor solver.
Worked example — factor 12x³ + 18x². The coefficients 12 and 18 share a GCF of 6, and both terms contain x², so the overall GCF is 6x². Divide each term by 6x²: 12x³ ÷ 6x² = 2x and 18x² ÷ 6x² = 3. The factored form is 6x²(2x + 3). Check it by distributing: 6x² · 2x = 12x³ and 6x² · 3 = 18x², which recovers the original exactly. Watch the signs, too — if every term is negative, as in −4x² − 8x, pull out −4x so the leading coefficient inside the parentheses stays positive: −4x(x + 2). Our factoring calculator handles GCF extraction automatically — type any polynomial and it pulls out the common factor first, before applying any other method.
2. Trinomials (x² + bx + c)
Find two numbers that multiply to c and add to b. For x² + 5x + 6 those numbers are 2 and 3, giving (x + 2)(x + 3). When the leading coefficient is not 1, as in 2x² + 7x + 3, multiply a·c first (2·3 = 6), then find two numbers that multiply to 6 and add to 7 — here 1 and 6 — and split the middle term.
Worked example — factor 3x² + 11x + 6. Here a = 3, b = 11, c = 6, so a·c = 18. Look for two numbers that multiply to 18 and add to 11: that pair is 9 and 2. Split the middle term: 3x² + 9x + 2x + 6. Group the pairs: 3x(x + 3) + 2(x + 3). Both groups now share the binomial (x + 3), so the answer is (x + 3)(3x + 2). Verify with FOIL: (x + 3)(3x + 2) = 3x² + 2x + 9x + 6 = 3x² + 11x + 6. If no integer pair works, as in x² + x + 3, the trinomial is prime over the integers. If you are stuck on a trinomial with a ≠ 1, this factoring calculator walks through the ac method step by step so you can see exactly which pair of numbers works.
3. Difference of Squares (a² − b²)
Any expression in the form a² − b² factors instantly as (a + b)(a − b). So x² − 9 = (x + 3)(x − 3), and 4x² − 25 = (2x + 5)(2x − 5). Look for this pattern whenever you see two perfect squares separated by a minus sign.
Worked example — factor 9x² − 49. Both terms are perfect squares: 9x² = (3x)² and 49 = 7². Apply the pattern with a = 3x and b = 7 to get (3x + 7)(3x − 7). The middle terms cancel when you check: (3x + 7)(3x − 7) = 9x² − 21x + 21x − 49 = 9x² − 49. Always ask whether a factor can go further — x⁴ − 16 first factors as (x² + 4)(x² − 4), and that second factor is itself a difference of squares, so the complete answer is (x + 2)(x − 2)(x² + 4). The factoring calculator spots difference-of-squares patterns instantly, even nested ones like x⁴ − 16.
4. Factor by Grouping
Use this for four-term polynomials. Group the first two terms and the last two, factor each pair, then factor out the common binomial. For x³ + 3x² + 2x + 6: the first pair gives x²(x + 3) and the second gives 2(x + 3), so the whole thing is (x + 3)(x² + 2).
Worked example — factor x³ − 4x² + 2x − 8. Group the first two and last two terms: (x³ − 4x²) + (2x − 8). Factor each pair: x²(x − 4) + 2(x − 4). Both groups share (x − 4), so the answer is (x − 4)(x² + 2), and expanding it back out confirms x³ − 4x² + 2x − 8. Grouping is also the engine behind the ac method for trinomials with a ≠ 1: once you split the middle term you have four terms and group twice. If your first pairing produces no common binomial, rearrange the terms and try another pairing before declaring the polynomial prime. When grouping gets messy with four or more terms, paste it into the factoring calculator above and it will attempt every viable pairing for you.
Factoring Examples
| Polynomial | Method | Factored Form |
|---|---|---|
| x² + 5x + 6 | Trinomial, a = 1 | (x + 2)(x + 3) |
| 2x² + 7x + 3 | Trinomial, a ≠ 1 | (2x + 1)(x + 3) |
| x² − 9 | Difference of squares | (x + 3)(x − 3) |
| 6x² + 9x | Greatest common factor | 3x(2x + 3) |
| x³ + 3x² + 2x + 6 | Grouping | (x + 3)(x² + 2) |
Factoring Tips for Algebra Students
Factoring gets fast once you stop guessing and follow a fixed order. Always pull out the GCF first — it shrinks every later step, and some problems finish right there. Then count the terms before choosing a method: two terms calls for a binomial pattern (difference of squares, or a sum/difference of cubes), three terms calls for the trinomial number search, and four terms calls for grouping.
Most wrong answers come from signs, not from picking the wrong method. Write the sign of every middle term carefully, and when you find a candidate pair of numbers for a trinomial, check both conditions — multiply and add — before you commit. Finally, check every answer by multiplying it back out; a quick FOIL takes ten seconds and catches nearly every error. If a quadratic refuses to factor, compute the discriminant b² − 4ac: a negative value means no real roots, and a value that is not a perfect square means the roots are irrational — in both cases, switch to the quadratic formula.
Frequently Asked Questions
What is factoring in algebra?
Factoring rewrites an expression as a product of simpler expressions. It is the inverse operation of expanding, and it is how you solve most quadratic equations.
How do you factor a quadratic equation?
Write it as ax² + bx + c, find two numbers that multiply to a·c and add to b, split the middle term, then group. If no such pair of integers exists, the quadratic does not factor over the integers — use the quadratic formula instead.
What is the difference between factoring and finding the GCF?
Finding the GCF gives you one number or expression shared by all terms. Factoring rewrites the entire polynomial as a product. GCF is almost always the first step of factoring.
Can every polynomial be factored?
No. Over the integers, many polynomials are prime — x² + 5x + 7 has no integer factorization. Over the complex numbers every polynomial of degree ≥ 1 factors completely.