Factoring Calculator
Factor a polynomial with integer coefficients and see which method did the work.
x = 2 · x = −3
- 1x = 2 is a root.Substituting gives 0, so (x − 2) divides in exactly, leaving x + 3.
- 2x = −3 is a root.Substituting gives 0, so (x + 3) divides in exactly and nothing is left to factor.
Factoring rewrites a polynomial as a product. Always pull out the greatest common factor first, then match a pattern: x² + x − 6 factors to (x − 2)(x + 3), because −2 and 3 multiply to −6 and add to 1. Setting each factor to zero gives the roots.
Why factoring is worth the trouble
A factored polynomial hands you its roots for free. Because a product is zero only when one of its parts is zero, (x − 2)(x + 3) = 0 immediately gives x = 2 or x = −3 — no formula needed. That zero-product property is the reason factoring appears in every topic that follows: solving equations, sketching curves, simplifying rational expressions, and finding where a function changes sign.
It also exposes structure the expanded form hides. Written as x³ − 6x² + 11x − 6 a cubic tells you almost nothing; written as (x − 1)(x − 2)(x − 3) it tells you where it crosses the axis, how it behaves between those points, and that it has no repeated roots.
The order to try things in
Start with the greatest common factor, every time — it is the step most often skipped and it makes everything after it smaller. Then count the terms. Two terms suggest a difference of squares or a sum or difference of cubes. Three terms suggest a trinomial method. Four terms suggest grouping. Only then reach for the rational root theorem, which handles whatever is left.
r₁ and r₂ are the roots; they exist as fractions exactly when b² − 4ac is a perfect square
- 1 Take out the greatest common factor. For 2x³ − 4x² − 16x every term shares 2x, leaving 2x(x² − 2x − 8).
- 2 Count the terms to pick a method. Two terms point to a difference of squares or cubes; three to a trinomial; four to grouping.
- 3 For a trinomial, find the pair that multiplies and adds. In x² − 2x − 8 you need two numbers multiplying to −8 and adding to −2: those are −4 and 2.
- 4 Write the factors and check by expanding. x² − 2x − 8 = (x + 2)(x − 4), so the full factorisation is 2x(x + 2)(x − 4).
- 5 Read off the roots if you need them. Setting each factor to zero gives x = 0, x = −2, and x = 4.
The patterns worth recognising on sight
Each identity read right to left is the factoring move; read left to right it is the expansion.
| Pattern | Factors as | Example |
|---|---|---|
| a² − b² | (a + b)(a − b) | x² − 16 = (x + 4)(x − 4) |
| a² + 2ab + b² | (a + b)² | x² + 6x + 9 = (x + 3)² |
| a² − 2ab + b² | (a − b)² | x² − 10x + 25 = (x − 5)² |
| a³ − b³ | (a − b)(a² + ab + b²) | x³ − 8 = (x − 2)(x² + 2x + 4) |
| a³ + b³ | (a + b)(a² − ab + b²) | x³ + 27 = (x + 3)(x² − 3x + 9) |
| a² + b² | Does not factor over the reals | x² + 9 stays as it is |
When a polynomial simply will not factor
Plenty of perfectly ordinary polynomials have no factorisation with integer coefficients. For a quadratic the test is quick: if b² − 4ac is not a perfect square, no pair of whole numbers will work, and x² + 2x + 5 with a discriminant of −16 is a standard example. That is not a failure of method — it is a fact about the polynomial, and the quadratic formula is the right next step.
Two habits keep the rest honest. Check every factorisation by expanding it back, which catches a wrong sign in seconds. And remember that a difference of squares factors while a sum of squares does not: x² − 9 splits into (x + 3)(x − 3), but x² + 9 has no real roots to split at.