Factoring calculator with steps
Type a polynomial in x and get it fully factored, with each step explained: the common factor, the special product it matches, the ac-method for trinomials, or the rational root test for cubics and beyond. Every answer is checked by multiplying the factors back out.
- ac-method: find two numbers that multiply to a·c = 6 and add to b = 7: 1 and 6
- Split the middle term: 2x² + x + 6x + 3
- Factor each pair: x(2x + 1) + 3(2x + 1)
- (2x + 1) is a common factor: (2x + 1)(x + 3)
- Result: (2 x + 1) (x + 3)
How to use it
- 1Type the polynomial with
^for powers:x^2 - 5x + 6,6x^3 - 4x^2,x^4 - 5x^2 + 4. - 2Press Factor. The steps list each method in the order it was used, and the result is the complete factorization over the rational numbers.
- 3Use the link under the result to graph the polynomial: every linear factor (x − r) is a place where the graph crosses or touches the x-axis.
The methods, in the order to try them
Factoring is a search, and the order matters: always take out the common factor first, because it makes everything after it simpler. Then look for a pattern that matches the number of terms.
| Method | Pattern | Example |
|---|---|---|
| Common factor | every term shares a factor | 6x³ − 4x² = 2x²(3x − 2) |
| Difference of squares | A² − B² = (A − B)(A + B) | x² − 9 = (x − 3)(x + 3) |
| Perfect square | A² ± 2AB + B² = (A ± B)² | x² + 6x + 9 = (x + 3)² |
| Simple trinomial | x² + bx + c with p·q = c, p + q = b | x² − 5x + 6 = (x − 2)(x − 3) |
| ac-method | ax² + bx + c with a ≠ 1 | 2x² + 7x + 3 = (2x + 1)(x + 3) |
| Sum or difference of cubes | A³ ± B³ = (A ± B)(A² ∓ AB + B²) | x³ − 8 = (x − 2)(x² + 2x + 4) |
| Quadratic in x² | ax⁴ + bx² + c, with u = x² | x⁴ − 5x² + 4 = (x − 1)(x + 1)(x − 2)(x + 2) |
| Rational root test | cubics and higher | x³ − 6x² + 11x − 6 = (x − 1)(x − 2)(x − 3) |
The ac-method, worked through
For a trinomial ax² + bx + c with a ≠ 1, guessing the two brackets gets slow. The ac-method turns it into a short search followed by grouping. Take 2x² + 7x + 3:
- Multiply a and c: a·c = 2 · 3 = 6.
- Find two numbers that multiply to 6 and add to b = 7: they are 1 and 6.
- Split the middle term with them: 2x² + x + 6x + 3.
- Group in pairs and factor each pair: x(2x + 1) + 3(2x + 1).
- The bracket is now a common factor: (2x + 1)(x + 3).
If no pair of whole numbers works, the trinomial doesn’t factor over the rationals. You can tell in advance from the discriminant b² − 4ac: the trinomial factors over the rationals exactly when the discriminant is a perfect square. Here it is 49 − 24 = 25 = 5².
The rational root test for cubics and beyond
For a polynomial with whole-number coefficients, any rational root p/q must have p dividing the constant term and q dividing the leading coefficient. That gives a short list of candidates to try. For x³ − 6x² + 11x − 6 the candidates are ±1, ±2, ±3 and ±6.
Substituting x = 1 gives 1 − 6 + 11 − 6 = 0, so (x − 1) is a factor. Synthetic division by (x − 1) leaves the quadratic x² − 5x + 6, which factors as (x − 2)(x − 3). Altogether, x³ − 6x² + 11x − 6 = (x − 1)(x − 2)(x − 3).
The calculator repeats this until what’s left is a quadratic, then finishes with the quadratic methods above.
When a polynomial won’t factor
Some polynomials have no rational factors. x² − 2 has roots ±√2, so over the real numbers it is (x − √2)(x + √2), but those aren’t rational. x² + 1 has no real roots at all, so it can’t be split into real linear factors either.
This calculator factors over the rational numbers, which is what “factor completely” means in most algebra courses. To find irrational or complex roots, use the equation solver or the quadratic equation solver.
Checking a factorization
Multiply the factors back out and you should get the original polynomial. The calculator does exactly that before showing any steps, so the explanation is always consistent with the answer.
A graph is a faster sanity check. The factored form shows where the polynomial is zero:
Examples to try
y = x^3 - 6x^2 + 11x - 6y = x^2 + 6x + 9y = x^4 - 5x^2 + 4Frequently asked questions
Does the factoring calculator show steps?
How do I factor a trinomial?
How do I know if a quadratic can be factored?
Can it factor cubic and quartic polynomials?
What does “factor over the rationals” mean?
Related tools and guides
Solve for x with steps: linear, quadratic, polynomial and more.
Solve ax² + bx + c = 0 by factoring or the quadratic formula.
Symbolic derivatives with the rules shown step by step.
Limits by substitution, factoring, L’Hôpital and at infinity.
The Algebra tab factors, expands and solves any expression in the graph, with the same steps.