SolveMathAI

Factoring calculator

Type a polynomial. Get the factors and the reason for each one.

Enter to solve · Shift+Enter for a new line

  • Free
  • No account
  • Every step shown
  • Arithmetic to calculus

Factoring is writing a polynomial as a product. It is how quadratics get solved, how fractions cancel, and how most of an algebra course quietly works. There is a fixed order to try things in, and once you know it, most school polynomials fall out in one line.

The order to try things in

Work down this list. The first one that fits is almost always the intended route.

  1. Common factor first, always

    Pull out the greatest common factor of every term. 6x³ − 9x² becomes 3x²(2x − 3), and what is left is usually easy.

  2. Two terms: look for a pattern

    A difference of squares is a² − b² = (a − b)(a + b). A difference of cubes is a³ − b³ = (a − b)(a² + ab + b²), and a sum of cubes flips the middle signs. A sum of squares does not factor over the real numbers.

  3. Three terms with a leading 1

    For x² + bx + c, find two numbers that multiply to c and add to b. Those two numbers are the factors.

  4. Three terms with a leading number

    For ax² + bx + c, find two numbers that multiply to a·c and add to b, split the middle term with them, then factor in pairs.

  5. Four terms: group in pairs

    Factor each pair, and if the same bracket appears twice, pull it out.

  6. Check by expanding

    Multiply your factors back out. It takes five seconds and catches every sign error.

Worked examples

Each one is solved the way the solver solves it: the rule first, then the line.

Factor x^2 - 5x + 6

x25x+6x^2 - 5x + 6
  1. Two numbers: multiply to 6, add to −5
    (2)×(3)=6,(2)+(3)=5(-2) \times (-3) = 6, \qquad (-2) + (-3) = -5
  2. Write the factors
    x25x+6=(x2)(x3)x^2 - 5x + 6 = (x - 2)(x - 3)
  3. Check by expanding
    (x2)(x3)=x23x2x+6=x25x+6  (x-2)(x-3) = x^2 - 3x - 2x + 6 = x^2 - 5x + 6 \;\checkmark
Answer
(x2)(x3)(x - 2)(x - 3)

Factor 6x^2 + 11x - 10

6x2+11x106x^2 + 11x - 10
  1. Multiply a by c
    6×(10)=606 \times (-10) = -60
  2. Two numbers: multiply to −60, add to 11
    15×(4)=60,15+(4)=1115 \times (-4) = -60, \qquad 15 + (-4) = 11
  3. Split the middle term
    6x2+15x4x106x^2 + 15x - 4x - 10
  4. Factor in pairs
    3x(2x+5)2(2x+5)3x(2x + 5) - 2(2x + 5)
  5. Pull out the common bracket
    (3x2)(2x+5)(3x - 2)(2x + 5)
Answer
(3x2)(2x+5)(3x - 2)(2x + 5)

Factor 4x^2 - 9

4x294x^2 - 9
  1. Recognise a difference of squares
    4x2=(2x)2,9=324x^2 = (2x)^2, \qquad 9 = 3^2
  2. Apply a² − b² = (a − b)(a + b)
    (2x)232=(2x3)(2x+3)(2x)^2 - 3^2 = (2x - 3)(2x + 3)
Answer
(2x3)(2x+3)(2x - 3)(2x + 3)

Factor x^3 - 8

x38x^3 - 8
  1. Recognise a difference of cubes
    x38=x323x^3 - 8 = x^3 - 2^3
  2. Apply a³ − b³ = (a − b)(a² + ab + b²)
    (x2)(x2+2x+4)(x - 2)(x^2 + 2x + 4)
  3. The quadratic does not factor further
    b24ac=416=12<0b^2 - 4ac = 4 - 16 = -12 < 0
Answer
(x2)(x2+2x+4)(x - 2)(x^2 + 2x + 4)

Where marks get lost

Skipping the common factor

Factoring 2x² − 8 as (2x − 4)(x + 2) is not wrong, but it is not finished. Pull out the 2 first: 2(x − 2)(x + 2).

Trying to factor a sum of squares

x² + 4 does not factor over the real numbers. A difference does; a sum does not.

Losing a sign in the split

When the two numbers have different signs, the middle term is the difference, not the sum. Expanding at the end catches this every time.

Questions

What if nothing factors nicely?

Then the roots are not whole numbers, and the quadratic formula is the right tool. A negative discriminant means it does not factor over the real numbers at all.

How do I factor a quadratic with a leading coefficient?

Multiply a by c, find two numbers that multiply to that and add to b, split the middle term, then factor in pairs. Example four above works through 6x² + 11x − 10.

Is factoring the same as solving?

No, but it is the step before it. Once x² − 5x + 6 = (x − 2)(x − 3), the equation equals zero when either bracket is zero, so x = 2 or x = 3.

Does it factor cubics and higher?

Yes, when they factor over the rationals. It tries the rational root theorem, divides out the root it finds, and factors whatever is left.