Skip to content

Factoring Calculator

Factor polynomials step by step: GCF, difference of squares, sum and difference of cubes, trinomials by the ac method, grouping and rational roots; factor pairs of numbers.

Calculator Details

6x² + 7x − 3:= (2x + 3)(3x − 1)See results ↓

A polynomial in x, or a whole number (factors and factor pairs)

In x, e.g. 6x^2 + 7x - 3, x^3 - 8, 2x^3 - 8x or x^4 - 5x^2 + 4 (fractions and decimals allowed)

Your Results

6x² + 7x − 3: = (2x + 3)(3x − 1)

6x² + 7x − 3

= (2x + 3)(3x − 1)

Methods: ac method

Factors

2

Irreducible factors, counted with repeats

Degree

2

6x² + 7x − 3 = (2x + 3)(3x − 1) (ac method).

Compare scenarios

Save these inputs as a scenario, change them, and compare the results side by side.

Loading, available in a moment

Detailed Breakdown

Step by step
StepMethodWorkingResult
1Ac methodac = 6 × (−3) = −18. 9 × (−2) = −18 and 9 + (−2) = 7, so 6x² + 9x − 2x − 3 = 3x(2x + 3) − 1(2x + 3) = (2x + 3)(3x − 1)(2x + 3)(3x − 1)
Irreducible factors
FactorTimesNote
2x + 31linear
3x − 11linear

Irreducible over the rationals: no factor with rational coefficients splits further.

How This Calculator Works

How it's calculated

a² − b² = (a − b)(a + b) · a³ ± b³ = (a ± b)(a² ∓ ab + b²)

ax² + bx + c: find m·n = ac with m + n = b, split bx and group

Your polynomial: 6x² + 7x − 3. The calculator takes out the greatest common factor, then tries the special patterns, the ac method and grouping, and finally rational roots ±p/q, repeating on every factor until none splits: 6x² + 7x − 3 = (2x + 3)(3x − 1). Multiplying the factors back gives the original exactly.

Frequently Asked Questions

What is the first step in factoring any polynomial?

Take out the greatest common factor (GCF): the largest number and the highest power of x that divide every term. 2x³ − 8x has GCF 2x, leaving 2x(x² − 4), which then factors further. Forgetting the GCF is the most common reason a factorisation is incomplete.

How do you factor a trinomial ax² + bx + c?

Use the ac method. Multiply a × c, find two numbers m and n whose product is ac and whose sum is b, split bx into mx + nx, and factor by grouping. For 6x² + 7x − 3: ac = −18, and 9 × (−2) = −18 with 9 + (−2) = 7, so 6x² + 9x − 2x − 3 = 3x(2x + 3) − 1(2x + 3) = (2x + 3)(3x − 1).

How do I factor a difference of squares?

a² − b² = (a − b)(a + b). Recognise two perfect squares separated by a minus sign: x² − 49 = (x − 7)(x + 7), and 9x² − 25 = (3x − 5)(3x + 5). A sum of squares such as x² + 4 does not factor over the real numbers.

What are the sum and difference of cubes formulas?

a³ + b³ = (a + b)(a² − ab + b²) and a³ − b³ = (a − b)(a² + ab + b²). The quadratic factor never splits further over the rationals. Example: x³ − 8 = (x − 2)(x² + 2x + 4). The signs follow the pattern SOAP: same, opposite, always positive.

How do I know a polynomial can’t be factored?

For a quadratic, compute the discriminant b² − 4ac. If it is not a perfect square, the quadratic is prime over the rationals (x² − 2 has irrational roots ±√2); if it is negative, the roots are complex (x² + 1). For higher degrees, if no rational root ±p/q works and no quadratic factor exists, the polynomial is irreducible over the rationals.

When does factoring by grouping work?

With four terms that pair up into the same binomial. x³ + 2x² − 9x − 18 = x²(x + 2) − 9(x + 2) = (x + 2)(x² − 9) = (x + 2)(x − 3)(x + 3). For ax³ + bx² + cx + d it works when a·d = b·c.

What is the rational root theorem?

Every rational zero of a polynomial with integer coefficients has the form ±p/q, where p divides the constant term and q divides the leading coefficient. For 2x³ − 3x² − 11x + 6 the candidates are ±1, ±2, ±3, ±6, ±1/2 and ±3/2. Testing them finds x = 1/2, so (2x − 1) is a factor, and dividing leaves x² − x − 6 = (x + 2)(x − 3).

What are the factor pairs of a number?

Pairs of whole numbers that multiply to it. 36 has the factor pairs 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6, so its factors are 1, 2, 3, 4, 6, 9, 12, 18 and 36. Only numbers up to the square root need checking: each factor below √36 = 6 has a partner above it.

Included: factoring polynomials in x with rational coefficients over the rationals, up to degree 10, by greatest common factor, difference of squares, sum and difference of cubes, perfect square trinomials, the ac method, substitution (quadratic in form), grouping, rational roots and quadratic factors (Kronecker’s method), following OpenStax Algebra and Trigonometry 2e §1.5. Every result is checked by multiplying the factors back. Whole numbers up to one trillion get every factor and factor pair. Left out: polynomials in two or more variables, factoring over the real or complex numbers (irrational and complex roots), and irreducible factors of degree 3 or more beyond a statement that they don’t split.

Factoring Calculator: Factor Polynomials and Trinomials Step by Step

By FindMySum · Last reviewed

A factoring calculator rewrites a polynomial as a product of simpler polynomials, the way 12 can be written as 2 × 2 × 3. This one factors polynomials in x step by step, naming the method at each step: greatest common factor, difference of squares, sum or difference of cubes, perfect square trinomials, the ac method for trinomials, substitution, grouping, and the rational root theorem for cubics and beyond. It keeps going until every factor is irreducible over the rationals, and it checks the answer by multiplying the factors back together. Switch to whole-number mode to list every factor and factor pair of a number.

The order to try methods in

Most factoring problems fall to the same checklist, in this order:

  1. Greatest common factor. Always first.
  2. Count the terms.
    • Two terms: difference of squares, sum of cubes or difference of cubes.
    • Three terms: perfect square trinomial, then the ac method.
    • Four terms: grouping.
  3. Anything left of degree 3 or more: try rational roots.
  4. Repeat on every factor until nothing splits.

Worked example: the default trinomial

Factor 6x² + 7x − 3.

There is no common factor, and it has three terms, so try the ac method.

  1. Multiply a and c: 6 × (−3) = −18.
  2. Find two numbers with product −18 and sum 7 (the middle coefficient). The factor pairs of −18 are 1 and −18, −1 and 18, 2 and −9, −2 and 9, 3 and −6, −3 and 6. Only 9 and −2 add to 7.
  3. Split the middle term: 6x² + 9x − 2x − 3.
  4. Group in pairs and factor each: 3x(2x + 3) − 1(2x + 3).
  5. Take out the common binomial: (2x + 3)(3x − 1).

Check by expanding: (2x + 3)(3x − 1) = 6x² − 2x + 9x − 3 = 6x² + 7x − 3.

Special patterns

Difference of squares: a² − b² = (a − b)(a + b). For 4x² − 25: (2x)² − 5² = (2x − 5)(2x + 5). Higher even powers work too: x⁴ − 16 = (x² − 4)(x² + 4) = (x − 2)(x + 2)(x² + 4).

Perfect square trinomial: a² ± 2ab + b² = (a ± b)². For 4x² + 12x + 9, the first and last terms are (2x)² and 3², and the middle is 2 × 2x × 3, so it is (2x + 3)².

Sum and difference of cubes: a³ + b³ = (a + b)(a² − ab + b²), a³ − b³ = (a − b)(a² + ab + b²). For 27x³ + 64 = (3x)³ + 4³ = (3x + 4)(9x² − 12x + 16).

Grouping

Four-term polynomials often split into two pairs with a common binomial:

x³ + 2x² − 9x − 18 = x²(x + 2) − 9(x + 2) = (x + 2)(x² − 9) = (x + 2)(x − 3)(x + 3).

Grouping is also what the ac method does after it splits the middle term.

Quadratic in form

A polynomial like x⁴ − 5x² + 4 is a quadratic in x². Let u = x²: u² − 5u + 4 = (u − 1)(u − 4). Put x² back: (x² − 1)(x² − 4), and both are differences of squares, so the full answer is (x − 1)(x + 1)(x − 2)(x + 2).

Rational roots for cubics and higher

When no pattern fits, use the rational root theorem. Every rational zero of a polynomial with integer coefficients is ±p/q, where p divides the constant and q divides the leading coefficient. For 2x³ − 3x² − 11x + 6 the candidates are ±1, ±2, ±3, ±6, ±1/2 and ±3/2. Testing them shows P(1/2) = 0, so (2x − 1) is a factor. Dividing (synthetic division is quickest) leaves x² − x − 6, which the ac method factors as (x + 2)(x − 3). The answer is (2x − 1)(x + 2)(x − 3).

If no candidate works, a quartic or higher may still split into quadratics: x⁴ + 4 = (x² − 2x + 2)(x² + 2x + 2), which the calculator finds with Kronecker's method.

When to stop

A factor is finished when it is linear, or when it is a quadratic whose discriminant b² − 4ac is negative or not a perfect square, or when it is a higher-degree polynomial with no rational roots and no quadratic factors. Such factors are called irreducible (or prime) over the rationals. The calculator labels each one, so you can see why x² + 2x + 4 in x³ − 8 = (x − 2)(x² + 2x + 4) stops there: its discriminant is 4 − 16 = −12.

Factors and factor pairs of a number

For whole numbers, the calculator lists every factor and pairs them: 360 has 24 factors, from 1 × 360 and 2 × 180 down to 18 × 20, and its prime factorisation is 2³ × 3² × 5. The number of factors comes straight from the exponents: (3 + 1)(2 + 1)(1 + 1) = 24.

Common mistakes

  • Skipping the GCF, which leaves a factorisation that isn't complete.
  • Sign errors in the ac method: the two numbers must multiply to ac (with its sign) and add to b.
  • Treating a sum of squares as factorable: x² + 9 does not factor over the reals.
  • Stopping too early: x⁴ − 16 = (x² − 4)(x² + 4) is not finished, because x² − 4 still factors.

More questions

Is factoring the opposite of expanding?

Yes. Expanding (for example with FOIL) turns (2x + 3)(3x − 1) into 6x² + 7x − 3; factoring goes back from the sum to the product. You can always check a factorisation by expanding it again, which is exactly what this calculator does before it shows an answer.

Why is factoring useful?

A product is zero only when one of its factors is zero, so factoring solves equations: (2x + 3)(3x − 1) = 0 gives x = −3/2 or x = 1/3. Factored forms also show where a graph crosses the x-axis, simplify rational expressions by cancelling common factors, and set up partial fractions in calculus.

Can every quadratic be factored?

Over the rationals, only those whose discriminant b² − 4ac is a perfect square. Over the real numbers, every quadratic with b² − 4ac ≥ 0 factors using the quadratic formula's roots, and over the complex numbers every quadratic factors. School factoring questions mean factoring with integer or rational coefficients.

Where is factoring taught in Canada?

In Ontario, factoring common factors, simple trinomials and differences of squares is part of the grade 10 academic course (MPM2D), with sums and differences of cubes and the factor theorem in grade 12 Advanced Functions. Other provinces cover the same methods in Foundations and Pre-calculus 10 to 12.

What does it mean that a polynomial is prime?

It can't be written as a product of polynomials of lower degree with rational coefficients, just as a prime number has no factors other than 1 and itself. x² + 1, x² − 2 and x³ − x² + 1 are prime over the rationals.

Sources

This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.

Spotted a wrong result or a bug? Report a problem

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy