Definition
What factoring a polynomial means
Factoring a polynomial rewrites it as a product of simpler polynomials and any common numerical factor. Expanding the factors gives back the original expression. Setting a linear factor equal to zero gives a root of the polynomial.
- First check
- A factor common to every term
- Verify by
- Expanding the product
- Linear factor
- Gives a root when set equal to zero
What factoring means
Factoring writes an expression as a product of simpler ones, the reverse of multiplying out brackets. Just as 12 factors as 2² × 3, the polynomial x² + 5x + 6 factors as (x + 2)(x + 3). Factored form makes it easy to see where a polynomial equals zero, to simplify algebraic fractions, and to sketch a graph.
This calculator factors over the integers, which is what most algebra courses mean by “factor completely”: every factor has whole-number coefficients and none can be split further that way.
How the calculator works
First it takes out the greatest common factor of all the coefficients and the highest power of the variable that every term shares. Next it uses the rational root theorem: any root p/q in lowest terms must have p dividing the constant term and q dividing the leading coefficient. Each root found gives a linear factor (qx − p), which is divided out exactly.
For what remains, it searches for quadratic factors, which catches cases such as x⁴ + 4 = (x² − 2x + 2)(x² + 2x + 2) that have no rational roots at all. Finally it multiplies every factor back together and shows the result, so you can see the answer is right.
Worked example: a cubic
Factor 2x³ − x² − 2x + 1. There is no common factor. Grouping the first two and last two terms gives x²(2x − 1) − 1(2x − 1) = (x² − 1)(2x − 1). The first bracket is a difference of squares, so the full answer is (x − 1)(x + 1)(2x − 1), with roots 1, −1 and 1/2.
The rational root theorem reaches the same answer without needing to spot the grouping: the candidates are ±1 and ±1/2, and testing them shows that 1, −1 and 1/2 are all roots.
Patterns worth remembering
Difference of squares: a² − b² = (a − b)(a + b), so x² − 9 = (x − 3)(x + 3). Perfect square trinomials: a² ± 2ab + b² = (a ± b)², so x² − 6x + 9 = (x − 3)². Sum and difference of cubes, as in the FAQ above. A sum of squares such as x² + 4 does not factor over the real numbers.
Higher powers often hide these patterns: x⁴ − 16 is (x²)² − 4², which gives (x² − 4)(x² + 4) and then (x − 2)(x + 2)(x² + 4).
Factoring numbers
Type a single whole number, up to a trillion, and the calculator gives its prime factorization, the number of factors, every factor and the factor pairs. 360 = 2³ × 3² × 5, which has (3 + 1)(2 + 1)(1 + 1) = 24 factors. For the common factors of several numbers at once, use the GCF and LCM calculator.
Step-by-step example
Factor 2x³ − x² − 2x + 1 over the rationals and find its roots.
| Step | Result |
|---|---|
| Factored polynomial | (x − 1)(x + 1)(2x − 1) |
| Root from x − 1 | 1 |
| Root from x + 1 | −1 |
| Root from 2x − 1 | 1/2 |
Formulas used
If p/q (in lowest terms) is a root of aₙxⁿ + … + a₀,
then p divides a₀ and q divides aₙ, and (qx − p) is a factor
- p
- numerator of the candidate root
- q
- positive denominator of the candidate root
- aₙ
- coefficient of the highest power
- x
- polynomial variable
- n
- degree of the polynomial
- a₀
- constant term
Example: 2x² + 7x + 3: candidates ±1, ±3, ±1/2, ±3/2. Testing finds −1/2 and −3, so it factors as (2x + 1)(x + 3).
a² − b² = (a − b)(a + b)
a² ± 2ab + b² = (a ± b)²
a³ ± b³ = (a ± b)(a² ∓ ab + b²)
- a
- first term
- b
- second term
Example: x³ − 8 = (x − 2)(x² + 2x + 4).
Find m and n with m × n = a × c and m + n = b
Rewrite bx as mx + nx and factor by grouping
- a
- coefficient of x²
- b
- coefficient of x
- c
- constant term
- m
- first coefficient used to split the middle term
- n
- second coefficient used to split the middle term
- x
- polynomial variable
Example: 6x² − x − 2: m = 3, n = −4, so 6x² + 3x − 4x − 2 = 3x(2x + 1) − 2(2x + 1) = (3x − 2)(2x + 1).
When the answer can mislead
- A rational root candidate needs testing before it can be used to form a factor.
- A polynomial with an irreducible quadratic factor over the rationals can still have irrational roots.
- A repeated factor gives the same root more than once.
Questions
How do I factor a quadratic trinomial?
For x² + bx + c, find two numbers that multiply to c and add to b. For x² + 5x + 6 those are 2 and 3, so it factors as (x + 2)(x + 3). When the leading coefficient is not 1, use the AC method: for 6x² − x − 2, multiply 6 × −2 = −12, find numbers that multiply to −12 and add to −1 (3 and −4), split the middle term to get 6x² + 3x − 4x − 2, and group: 3x(2x + 1) − 2(2x + 1) = (3x − 2)(2x + 1).
What should I always check first?
The greatest common factor. Take out any number and any power of x that every term shares before doing anything else. 3x³ − 12x has a common factor of 3x, leaving 3x(x² − 4), and x² − 4 is a difference of squares, so the full answer is 3x(x − 2)(x + 2).
How do I factor a sum or difference of cubes?
Use a³ − b³ = (a − b)(a² + ab + b²) and a³ + b³ = (a + b)(a² − ab + b²). So x³ − 8 = (x − 2)(x² + 2x + 4) and 27x³ + 1 = (3x + 1)(9x² − 3x + 1). The quadratic factors that are left cannot be factored further with whole numbers.
What does it mean if a polynomial cannot be factored?
It is called prime (or irreducible) over the integers: there is no way to write it as a product of smaller polynomials with whole-number coefficients. x² + 1 and x² + 2x + 3 are examples. They still have roots, but the roots are irrational or complex, which the calculator shows for any quadratic factor left over.
How does factoring help solve an equation?
If a product is zero, one of its factors must be zero. Factoring 2x² + 7x + 3 = 0 as (2x + 1)(x + 3) = 0 gives x = −1/2 or x = −3. The calculator lists these rational roots. For quadratics that do not factor, the quadratic equation calculator gives the exact roots with the quadratic formula.
What can I type, and what are the limits?
Type an expanded polynomial in one variable with whole-number coefficients, using ^ for powers (x^2) or superscripts (x²). Powers go up to 6 and coefficients up to 10,000. Products in brackets, fractions and decimals are not accepted; multiply them out or clear the fractions first. Type a single whole number to get its prime factors instead.
Embed this calculator
Cite this calculator
Factoring Calculator. CalculatorLab. https://calculatorlab.site/calculators/factoring-calculator/. Last updated . Accessed .