Factoring Calculator

Factor polynomials and quadratics completely with step-by-step solutions.

Result

Type a polynomial like 6x^2 + x - 2 or x^3 - 8. Use ^ for powers.

Type a polynomial and it is factored the way it is taught – common factor first, then the pattern that fits: 6x² + x − 2 = (2x − 1)(3x + 2) by the AC method. It also spots differences of squares, perfect squares and sums or differences of cubes, groups four-term polynomials and uses the rational root theorem on cubics.

The factoring checklist

Work through these in order – it is the order the calculator uses:

  1. Greatest common factor. Always first: 12x^2y - 18xy^2 = 6xy(2x - 3y).
  2. Two terms. Difference of squares a^2 - b^2 = (a - b)(a + b); sum or difference of cubes a^3 \pm b^3 = (a \pm b)(a^2 \mp ab + b^2). A sum of squares a^2 + b^2 does not factor.
  3. Three terms. A perfect square a^2 \pm 2ab + b^2 = (a \pm b)^2? Otherwise find two numbers that multiply to ac and add to b – directly when a = 1, by splitting the middle term and grouping (the AC method) when a ≠ 1. The same works for x^4 + bx^2 + c, treating x^2 as the variable.
  4. Four terms. Group them in pairs; or spot a perfect square trinomial minus a square.
  5. Higher degree. Use the rational-root theorem to find a root r, divide by (x - r) with synthetic division, and factor what is left.
  6. Check every factor again – x^4 - 16 = (x^2 - 4)(x^2 + 4) still has x^2 - 4 = (x - 2)(x + 2) inside.

Special patterns at a glance

PatternFactoredExample
Difference of squaresa^2 - b^2 = (a - b)(a + b)9x^2 - 25 = (3x - 5)(3x + 5)
Perfect squarea^2 + 2ab + b^2 = (a + b)^2x^2 + 10x + 25 = (x + 5)^2
Sum of cubesa^3 + b^3 = (a + b)(a^2 - ab + b^2)8x^3 + 27 = (2x + 3)(4x^2 - 6x + 9)
Difference of cubesa^3 - b^3 = (a - b)(a^2 + ab + b^2)x^3 - 8 = (x - 2)(x^2 + 2x + 4)

The AC method

Factor 6x^2 + x - 2: ac = -12; the numbers −3 and 4 multiply to −12 and add to 1.

\begin{aligned} 6x^2 + x - 2 &= 6x^2 - 3x + 4x - 2 \\ &= 3x(2x - 1) + 2(2x - 1) \\ &= (3x + 2)(2x - 1) \end{aligned}

Factoring by grouping

Four terms often pair up. In x^3 + 3x^2 - 4x - 12 the first two share x^2 and the last two share −4:

x^2(x + 3) - 4(x + 3) = (x + 3)(x^2 - 4) = (x + 3)(x - 2)(x + 2)

The bracket left over, x^2 - 4, is a difference of squares – factoring isn’t finished until no factor splits further. See the grouping in the calculator.

Why factor? Solving equations

A product is zero only when one of its factors is zero. Once x^3 + 3x^2 - 4x - 12 = 0 is written as (x + 3)(x - 2)(x + 2) = 0, the solutions can be read off: x = −3, 2 or −2. The same factors show where a graph crosses the x-axis and simplify algebraic fractions. Check any factoring by multiplying the brackets out again – you must get the original polynomial back.

When a polynomial cannot be factored with whole numbers it is called prime (irreducible over the rationals) – for example x^2 + 1 or x^2 - 2. To find the roots of such a quadratic, use the quadratic equation solver.

Frequently asked questions

What does it mean if a polynomial is prime?

It has no factors other than 1 and itself using whole-number coefficients, like x² + x + 1.