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

x2−5x+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
    x2−5x+6=(x−2)(x−3)x^2 - 5x + 6 = (x - 2)(x - 3)
  3. Check by expanding
    (x−2)(x−3)=x2−3x−2x+6=x2−5x+6  ✓(x-2)(x-3) = x^2 - 3x - 2x + 6 = x^2 - 5x + 6 \;\checkmark
Answer
(x−2)(x−3)(x - 2)(x - 3)

Factor 6x^2 + 11x - 10

6x2+11x−106x^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+15x−4x−106x^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
    (3x−2)(2x+5)(3x - 2)(2x + 5)
Answer
(3x−2)(2x+5)(3x - 2)(2x + 5)

Factor 4x^2 - 9

4x2−94x^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)2−32=(2x−3)(2x+3)(2x)^2 - 3^2 = (2x - 3)(2x + 3)
Answer
(2x−3)(2x+3)(2x - 3)(2x + 3)

Factor x^3 - 8

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

Solved problems

Asked here and worked through in full. Open one for every step.

  1. Solve for all values of x by factoring. x, squared, minus, 8, x, plus, 15, equals, 0 x 2 −8x+15= 0
    Answer x=3,x=5x = 3, x = 5
  2. Factor completely. 2, x, squared, plus, 5, x, minus, 3 2x 2 +5x−3
    Answer (2x−1)(x+3)(2x - 1)(x + 3)
  3. Factor completely. 3, x, squared, minus, x, minus, 4 3x 2 −x−4
    Answer (3x−4)(x+1)(3x - 4)(x + 1)
  4. Factor x^2 - 5x + 6
    Answer (x−2)(x−3)(x - 2)(x - 3)

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

How do I factor a trinomial?

For x² + bx + c, find two numbers that multiply to c and add to b. For x² − 5x + 6 that is −2 and −3, so it factors as (x − 2)(x − 3). Always multiply back to check.

What is factoring in math?

Writing an expression as a product instead of a sum. 6 factors as 2 × 3, and x² − 9 factors as (x + 3)(x − 3). It is the step that turns an equation into a list of roots.

How do I factor a quadratic equation?

Factor the left side, then set each bracket to zero. x² + x − 6 = 0 becomes (x + 3)(x − 2) = 0, so x = −3 or x = 2. A product is zero only when one of its factors is.

What if the leading coefficient is not 1?

For ax² + bx + c, look for two numbers that multiply to a × c and add to b, then split the middle term and group. For 2x² + 7x + 3 use 6 and 1: 2x² + 6x + x + 3 = 2x(x + 3) + 1(x + 3) = (2x + 1)(x + 3).

What is the difference of squares?

Anything of the form a² − b² factors as (a + b)(a − b). x² − 16 is (x + 4)(x − 4). A sum of squares, x² + 16, does not factor over the real numbers.

What do I do first when factoring?

Take out the greatest common factor before anything else. 2x² − 8 is 2(x² − 4), which then becomes 2(x + 2)(x − 2). Skipping this step is the most common way to get a half-finished answer.

What if the quadratic does not factor?

Check b² − 4ac. If it is not a perfect square there are no whole-number factors, and the quadratic formula or completing the square will give the exact roots instead.

Does it factor polynomials of higher degree?

Yes. The solver handles cubics and higher by taking out common factors, grouping, and testing rational roots, and it names the rule at each step.