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:
- Greatest common factor. Always first.
- 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.
- Anything left of degree 3 or more: try rational roots.
- 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.
- Multiply a and c: 6 × (−3) = −18.
- 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.
- Split the middle term: 6x² + 9x − 2x − 3.
- Group in pairs and factor each: 3x(2x + 3) − 1(2x + 3).
- 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.