Factoring calculator

Factoring Calculator for Breaking Polynomials into Products

A factoring calculator rewrites supported polynomials as products of simpler factors. The resulting factors can help reveal zeros in an equation.

  • Independent answer checks
  • Every step shown
  • Free, no sign-up

What math problem do you want to solve?

Ctrl+V pastes a screenshot · Shift+Enter: new line (one equation per line)

Try

Typed problems our engine solves stay in your browser. Photos, screenshots, PDFs and AI-helped problems are processed by our AI service — privacy.

For example, x squared minus 9 factors into (x - 3)(x + 3). Expanding the factors checks that their product matches the original expression.

Factoring · worked example✓ Verified
factor 3x3−12x\text{factor } 3x^{3} - 12x
Start with the expression
3(x3)−(12x)3(x^{3})-(12x)
Factor out common factors
3x⋅(x−2)⋅(x+2)3x \cdot (x-2) \cdot (x+2)
3x⋅(x−2)⋅(x+2)3x \cdot (x-2) \cdot (x+2)Re-checked by a second engine
Factoring · worked example✓ Verified
factor 2x2+7x+3\text{factor } 2x^{2} + 7x + 3
Start with the expression
2(x2)+7x+32(x^{2})+7x+3
Factor out common factors
(x+3)⋅(2x+1)(x+3) \cdot (2x+1)
(x+3)⋅(2x+1)(x+3) \cdot (2x+1)Re-checked by a second engine
Factoring · worked example✓ Verified
factor x3+8\text{factor } x^{3} + 8
Start with the expression
x3+8x^{3}+8
Factor out common factors
(x+2)⋅(x2−2x+4)(x+2) \cdot (x^{2}-2x+4)
(x+2)⋅(x2−2x+4)(x+2) \cdot (x^{2}-2x+4)Re-checked by a second engine

1 / 3

Quick examples

Study guide

How to solve factoring

Factoring reverses multiplication: you rewrite a polynomial as a product of simpler factors. It is the key skill behind solving quadratics and simplifying rational expressions.

Always look for a greatest common factor first. In 2x² + 8x, both terms share 2x, so factor it out: 2x(x + 4). Skipping this step is the most common factoring mistake.

For trinomials like x² + 5x + 6, find two numbers that multiply to the constant (6) and add to the middle coefficient (5): 2 and 3. So x² + 5x + 6 = (x + 2)(x + 3).

Recognize the special patterns. Difference of squares: x² − 9 = (x − 3)(x + 3). Perfect square trinomials: x² + 6x + 9 = (x + 3)². Spotting these saves minutes on tests.

Check by expanding: (x + 2)(x + 3) must multiply back to x² + 5x + 6. Our solver expands the factored form automatically to verify it before showing the badge.

Box method for x² − 7x + 12: a two-by-two grid with x and −3 across the top and x and −4 down the side, holding x², −3x, −4x and 12; the middle terms add to −7x, so x² − 7x + 12 = (x − 3)(x − 4).
The box method for x² − 7x + 12: the four cells multiply out to x² − 3x − 4x + 12, and −3x − 4x = −7x, so the factors are (x − 3)(x − 4).

Checking the result

How this result is checked

The math engine checks that the factored and original expressions agree at multiple allowed values. A factorization is an equivalent expression; roots require an equation.

A checklist

The order the factoring calculator tries methods in

Factoring is pattern recognition, and patterns are easier to spot in the right order. Work down this list and stop as soon as the polynomial is fully factored:

  1. Greatest common factor. Always first. 3x3−12x=3x(x2−4)3x^3 - 12x = 3x(x^2 - 4) — and the bracket may factor further.
  2. Count the terms. Two terms: look for a difference of squares or a sum/difference of cubes. Three terms: a trinomial. Four terms: try grouping.
  3. Trinomials with a = 1: find two numbers that multiply to c and add to b.
  4. Trinomials with a ≠ 1: use the ac method — find two numbers that multiply to a⋅ca \cdot c and add to b, split the middle term, and group.
  5. Check every factor. A factor like x2−4x^2 - 4 is not finished; it is (x−2)(x+2)(x - 2)(x + 2).

The ac method

Factoring when the leading coefficient is not 1

Take 2x2+7x+32x^2 + 7x + 3. Here a⋅c=6a \cdot c = 6, and the pair that multiplies to 6 and adds to 7 is 6 and 1. Split the middle term with them:

2x2+6x+x+3=2x(x+3)+1(x+3)=(2x+1)(x+3)2x^2 + 6x + x + 3 = 2x(x + 3) + 1(x + 3) = (2x + 1)(x + 3)

Grouping always works once the middle term is split correctly — if the two brackets do not match, recheck the pair of numbers. Setting each bracket to zero then solves 2x2+7x+3=02x^2 + 7x + 3 = 0: x=−12x = -\tfrac{1}{2} or x=−3x = -3 — the factoring route the quadratic equation calculator shows.

Factoring is often a step toward the roots rather than the goal. To go from a quadratic equation straight to its solutions, use the quadratic equation calculator, or type a longer problem into the AI math solver, which works the whole question in one place.

Reference

Factoring patterns

Difference of squares

a2−b2=(a−b)(a+b)a^2 - b^2 = (a - b)(a + b)

There is no matching rule for a sum of squares over the reals.

Perfect square trinomial

a2±2ab+b2=(a±b)2a^2 \pm 2ab + b^2 = (a \pm b)^2

First and last terms are squares; the middle is twice their product.

Sum of cubes

a3+b3=(a+b)(a2−ab+b2)a^3 + b^3 = (a + b)(a^2 - ab + b^2)

Signs: same, opposite, always positive.

Difference of cubes

a3−b3=(a−b)(a2+ab+b2)a^3 - b^3 = (a - b)(a^2 + ab + b^2)

The quadratic factor does not factor further over the reals.

Worked examples

Factoring, worked step by step

Each solution below is the solver’s own working, checked before it was published. Press “Solve it live” to open it in the calculator above.

Example 1 · A trinomial with a = 1

factor x2−7x+12\text{factor } x^{2} - 7x + 12

Numbers that multiply to 12 and add to −7: −3 and −4.

(x−3)⋅(x−4)(x-3) \cdot (x-4)
✓ Verified

Independent check

x=1.7:original 2.99, answer 2.99x = 1.7:\quad \text{original } 2.99,\ \text{answer } 2.99
x=−2.3:original 33.39, answer 33.39x = -2.3:\quad \text{original } 33.39,\ \text{answer } 33.39
  1. Start with the expression
    x2−(7x)+12x^{2}-(7x)+12
    This is the expression to factor.
  2. Factor out common factors
    (x−3)⋅(x−4)(x-3) \cdot (x-4)
    Pull out what every term shares so the x terms split into factors.

Example 2 · The ac method

factor 2x2+7x+3\text{factor } 2x^{2} + 7x + 3

a·c = 6; the split is 6x + x.

(x+3)⋅(2x+1)(x+3) \cdot (2x+1)
✓ Verified

Independent check

x=1.7:original 20.68, answer 20.68x = 1.7:\quad \text{original } 20.68,\ \text{answer } 20.68
x=−2.3:original −2.52, answer −2.52x = -2.3:\quad \text{original } -2.52,\ \text{answer } -2.52
  1. Start with the expression
    2(x2)+7x+32(x^{2})+7x+3
    This is the expression to factor.
  2. Factor out common factors
    (x+3)⋅(2x+1)(x+3) \cdot (2x+1)
    Pull out what every term shares so the x terms split into factors.

Example 3 · Difference of squares

factor 4x2−25\text{factor } 4x^{2} - 25

Both terms are perfect squares: (2x)2(2x)^2 and 525^2.

(2x+5)⋅(2x−5)(2x+5) \cdot (2x-5)
✓ Verified

Independent check

x=1.7:original −13.44, answer −13.44x = 1.7:\quad \text{original } -13.44,\ \text{answer } -13.44
x=−2.3:original −3.84, answer −3.84x = -2.3:\quad \text{original } -3.84,\ \text{answer } -3.84
  1. Start with the expression
    4(x2)−254(x^{2})-25
    This is the expression to factor.
  2. Factor out common factors
    (2x+5)⋅(2x−5)(2x+5) \cdot (2x-5)
    Pull out what every term shares so the x terms split into factors.

Example 4 · GCF first, then a pattern

factor 3x3−12x\text{factor } 3x^{3} - 12x

Take out 3x, then the bracket is a difference of squares.

3x⋅(x−2)⋅(x+2)3x \cdot (x-2) \cdot (x+2)
✓ Verified

Independent check

x=1.7:original −5.661, answer −5.661x = 1.7:\quad \text{original } -5.661,\ \text{answer } -5.661
x=−2.3:original −8.901, answer −8.901x = -2.3:\quad \text{original } -8.901,\ \text{answer } -8.901

Stopping at 3x(x2−4)3x(x^2 - 4) would lose marks: the factoring is not complete.

  1. Start with the expression
    3(x3)−(12x)3(x^{3})-(12x)
    This is the expression to factor.
  2. Factor out common factors
    3x⋅(x−2)⋅(x+2)3x \cdot (x-2) \cdot (x+2)
    Pull out what every term shares so the x terms split into factors.

Example 5 · Sum of cubes

factor x3+8\text{factor } x^{3} + 8

8 is 232^3, so this is a3+b3a^3 + b^3 with a = x and b = 2.

(x+2)⋅(x2−2x+4)(x+2) \cdot (x^{2}-2x+4)
✓ Verified

Independent check

x=1.7:original 12.913, answer 12.913x = 1.7:\quad \text{original } 12.913,\ \text{answer } 12.913
x=−2.3:original −4.167, answer −4.167x = -2.3:\quad \text{original } -4.167,\ \text{answer } -4.167
  1. Start with the expression
    x3+8x^{3}+8
    This is the expression to factor.
  2. Factor out common factors
    (x+2)⋅(x2−2x+4)(x+2) \cdot (x^{2}-2x+4)
    Pull out what every term shares so the x terms split into factors.

Avoid these

Common factoring mistakes

  • Skipping the GCF

    Factoring 2x2+8x+62x^2 + 8x + 6 without taking out the 2 first makes the trinomial harder and the answer incomplete.

  • Stopping too early

    x4−16=(x2−4)(x2+4)x^4 - 16 = (x^2 - 4)(x^2 + 4) still has a difference of squares inside.

  • Factoring a sum of squares

    x2+9x^2 + 9 does not factor over the real numbers. Writing (x+3)2(x + 3)^2 gives x2+6x+9x^2 + 6x + 9.

  • Sign errors in the pair

    If c is positive and b negative, both numbers are negative. If c is negative, the signs differ.

  • Mixing up cube formulas

    For a3+b3a^3 + b^3, the middle sign of the quadratic factor is minus: a2−ab+b2a^2 - ab + b^2.

  • Not checking by expanding

    Multiply your factors back out. If you do not get the original polynomial, a sign or number is wrong.

FAQ

Factoring calculator FAQ

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

Find two numbers that multiply to 6 and add to 5 — that is 2 and 3. Then x²+5x+6=(x+2)(x+3).

What is the difference of squares?

The pattern a²−b²=(a−b)(a+b). So x²−9=(x−3)(x+3), because 9 is 3².

What should I factor out first?

The greatest common factor of all terms. In 2x²+8x, factor out 2x first to get 2x(x+4) — then check whether anything inside factors further.

How do I know my factored answer is right?

Multiply it back out (FOIL/expand). You must get the original polynomial. The solver performs this expansion check on every answer.

How do I type a factoring problem?

Start with the word factor, then the polynomial: factor 2x^2 + 7x + 3. Brackets also work: factor(x^2+5x+6).

What if the polynomial cannot be factored?

Some polynomials are prime over the integers — x2+x+1x^2 + x + 1, for example. The calculator then returns the polynomial unchanged and does not mark it ✓ Verified, because there is no factorization to check. A quick test for a quadratic: if b2−4acb^2 - 4ac is not a perfect square, it will not factor over the integers. To find its roots anyway, use the quadratic calculator.

Can it factor cubics and higher powers?

Yes, when they contain a common factor, a recognizable pattern, or a rational root the engine can find. The result is always verified by expanding it back.

Your own factoring problem

Start the line with “factor”, paste the polynomial, and see which pattern unlocks it.