CalculatorSignAll calculators

Factoring Calculator

Factor ax² + bx + c over the integers when possible. See the discriminant and the rational roots, including repeated roots.

Factoring Calculator

Result
—

How do you factor a quadratic polynomial with integer coefficients?

Enter the three coefficients in ax² + bx + c, where a is nonzero. The calculator uses the discriminant b² − 4ac to determine whether the quadratic has rational roots. If it does, it writes the polynomial as a product of two integer linear factors and a possible leading constant. Expanding that product returns the polynomial you entered.

Put the polynomial in standard order

Collect like terms before entering the coefficients. In 6x² + 7x − 3, the coefficient of x² is 6, the coefficient of x is 7, and the constant is −3. If the x term is missing, use zero for b. If the constant is missing, use zero for c, and the expression will have x as a factor.

If you are solving an equation such as x² + 4 = 5x, move every term to one side first. The equation becomes x² − 5x + 4 = 0. Enter 1, −5, and 4 to get the factors. Keeping the right side equal to zero lets you find roots by setting each factor equal to zero.

Follow the discriminant through an example

For 6x² + 7x − 3, b² is 49 and 4ac is −72. Subtracting the negative gives a discriminant of 121, whose square root is 11. The two numerators from the quadratic formula are −7 + 11 and −7 − 11, over a denominator of 12. Reducing them gives roots 1/3 and −3/2.

A root of 1/3 corresponds to a factor 3x − 1. A root of −3/2 corresponds to 2x + 3. Their leading coefficients multiply to six, so no additional constant is needed in this example. Expanding gives 6x² + 9x − 2x − 3 and combines the middle terms to recover 7x.

Read the cases with a repeated or irrational root

A discriminant of zero gives a repeated rational root, so the same linear factor appears twice. For instance, x² − 6x + 9 becomes (x − 3)(x − 3). A positive discriminant that is not a perfect square leads to irrational roots and cannot give two integer linear factors. The tool reports that distinction.

A negative discriminant rules out real roots. For x² + x + 1, the discriminant is −3. The coefficients are integers, but factors into linear terms would require complex roots. This calculator focuses on integer linear factorization, so it explains why no such product is returned for that example.

Check a leading constant separately

With a polynomial such as 2x² − 8, an initial common factor is two. Factoring what remains gives 2(x − 2)(x + 2). A negative leading coefficient can produce a negative constant outside the two factors. The app scales the product of the two root-derived factors to match the original leading coefficient.

If you are working by hand, pulling out the greatest common divisor of all coefficients first can make the remaining search easier. A polynomial might have a nontrivial common constant even when its quadratic portion cannot be broken into integer linear factors. Use the Factor Calculator if you want to inspect divisors of each integer coefficient separately.

Frequently asked questions

How do I factor a quadratic with a zero constant?

Every term contains x when c is zero. Factoring it out gives x(ax + b). With 4x² + 8x, you can also factor a four to write 4x(x + 2). The two roots are zero and −2, with a repeated zero root when b is also zero.

What should I enter for a linear expression?

The input is designed for a quadratic, so the coefficient of x² must be nonzero. If that coefficient is zero, work with bx + c as a linear expression. For b other than zero, its single root is −c divided by b.

How can I verify factorization quickly?

Multiply the factors back together. The product of the x terms should reproduce the original quadratic coefficient after applying any outside constant. Add the outer and inner products to check the middle coefficient. Finally, multiply the constants together and compare with the original term that has no x.

Why can factor order be different from my textbook?

Multiplication of the factors is commutative. Reversing two factors preserves the polynomial. A negative sign can also be distributed between a factor and a leading constant as long as the overall product keeps the same sign. Compare expansions to confirm the expressions agree.

Can I use fractional coefficients?

This page takes integers. Clear denominators by multiplying the whole polynomial by a common multiple of the coefficient denominators. Factor the resulting integer polynomial and divide the final factored expression by that same multiple if the goal is to reproduce the original expression.

Can I read the roots without calculating the discriminant again?

Set each linear factor equal to zero and solve it separately. A factor of 5x + 2 gives −2/5. A nonzero constant outside the product changes the height of the graph but does not change the values of x that make the product zero.