Factoring calculator

Type a polynomial (no equals sign) and get it fully factored over the integers, with the method named at each step.

Use ^ for powers, sqrt() for roots, |x| for absolute value, and separate a system with ;.

Try:

Factoring patterns to know

PatternFormulaExample
Greatest common factorab+ac=a(b+c)ab + ac = a(b + c)3x3−12x=3x(x2−4)3x^3-12x = 3x(x^2-4)
Difference of squaresa2−b2=(a−b)(a+b)a^2 - b^2 = (a-b)(a+b)x2−49=(x−7)(x+7)x^2-49 = (x-7)(x+7)
Perfect-square trinomiala2±2ab+b2=(a±b)2a^2 \pm 2ab + b^2 = (a \pm b)^24x2+12x+9=(2x+3)24x^2+12x+9 = (2x+3)^2
Simple trinomialx2+bx+c=(x+p)(x+q)x^2+bx+c = (x+p)(x+q), pq=c, p+q=bpq=c,\ p+q=bx2−5x+6=(x−2)(x−3)x^2-5x+6=(x-2)(x-3)
Sum of cubesa3+b3=(a+b)(a2−ab+b2)a^3+b^3=(a+b)(a^2-ab+b^2)x3+27=(x+3)(x2−3x+9)x^3+27=(x+3)(x^2-3x+9)
Difference of cubesa3−b3=(a−b)(a2+ab+b2)a^3-b^3=(a-b)(a^2+ab+b^2)x3−8=(x−2)(x2+2x+4)x^3-8=(x-2)(x^2+2x+4)
Groupingax+ay+bx+by=(a+b)(x+y)ax+ay+bx+by=(a+b)(x+y)x3+2x2−x−2=(x+2)(x2−1)x^3+2x^2-x-2=(x+2)(x^2-1)

Factoring is also the fastest way to solve many equations: once a polynomial is a product, set each factor to zero. Try it on the quadratic solver or the polynomial equation solver.

Frequently asked questions

What does it mean to factor a polynomial?
To write it as a product of simpler polynomials. For example, x² − 9 = (x − 3)(x + 3). Factoring is expanding in reverse.
What order should I try factoring methods in?
Always take out the greatest common factor first. Then check the number of terms: two terms suggests a difference of squares or a sum/difference of cubes; three terms suggests a trinomial (simple or AC method); four terms suggests grouping.
What is the AC method?
For ax² + bx + c, find two numbers that multiply to a·c and add to b. Split the middle term using them and factor by grouping. For 6x² + 11x − 10: a·c = −60, the numbers are 15 and −4, so 6x² + 15x − 4x − 10 = 3x(2x + 5) − 2(2x + 5) = (3x − 2)(2x + 5).
What does “prime over the integers” mean?
The polynomial can’t be written as a product of lower-degree polynomials with integer coefficients, like x² + x + 1. It may still have real or complex roots.