Factoring Calculator

Factor quadratics, binomials, and cubics with full step-by-step working. Enter an expression like x^2 + 5x + 6 below.

Worked examples

Here's how the calculator handles a few common patterns:

x^2 + 5x + 6

= (x + 3)(x + 2)

  1. Factor the quadratic x^2 + 5x + 6 by finding two numbers that multiply to 6 and add to 5, then factor by grouping: (x + 3)(x + 2).

2x^2 - 7x - 15

= (x - 5)(2x + 3)

  1. Factor the quadratic 2x^2 - 7x - 15 by finding two numbers that multiply to -30 and add to -7, then factor by grouping: (x - 5)(2x + 3).

x^2 - 9

= (x - 3)(x + 3)

  1. Factor the quadratic x^2 - 9 by finding two numbers that multiply to -9 and add to 0, then factor by grouping: (x - 3)(x + 3).

x^3 - 8

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

  1. Recognize this as a difference of cubes: (1x)^3 - (2)^3, which factors as (px - q)(p^2x^2 ∓ pqx + q^2).

How this calculator factors an expression

  1. Factor out the greatest common factor (GCF) shared by every term, including any common power of the variable.
  2. For a quadratic ax² + bx + c, find two numbers that multiply to a×c and add to b, then split the middle term and factor by grouping (the "AC method"). This same process automatically catches differences of squares and perfect square trinomials.
  3. For a cubic, check first for a sum or difference of cubes (a³x³ ± b³). Otherwise, search for a rational root using the rational root theorem, divide it out, and factor the resulting quadratic the same way.

Looking for the factors of a specific whole number instead of an algebraic expression? Try the factor calculator or browse factors of a number.

Frequently asked questions

What kinds of expressions can this factoring calculator handle?

It factors polynomials in a single variable up to degree 3: linear expressions, quadratic trinomials and binomials (including differences of squares), and cubics (including sums and differences of cubes, and cubics with a rational root).

How do you factor a quadratic like x² + 5x + 6?

Find two numbers that multiply to give the constant term (6) and add to give the middle coefficient (5) - here, 2 and 3. Rewrite the middle term using those numbers, then factor by grouping to get (x + 2)(x + 3).

What if the expression does not factor?

Not every polynomial factors into integer or simple rational pieces. If it doesn't, the calculator shows the discriminant or rational-root check it used and explains why - the expression may still be solvable using the quadratic formula.

Does this handle factoring by grouping?

Yes. Quadratics with a leading coefficient greater than 1 (like 2x² - 7x - 15) are factored using the standard AC method and grouping, with each step shown.

Can it factor sum and difference of cubes?

Yes - expressions like x³ - 8 or x³ + 27 are recognized as a difference or sum of cubes and factored using the standard cube formulas.