UTILS.
Private by default
🧩

Polynomial Factoring Calculator

Factor a single-variable polynomial into linear and irreducible factors, e.g. x² − 5x + 6 becomes (x − 2)(x − 3), with GCF and root steps.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

Enter a single-variable polynomial to factor it over the rationals.

Enter a polynomial above to factor it.

About this tool

The Polynomial Factoring Calculator rewrites a single-variable polynomial as a product of simpler factors with integer or rational coefficients. It works in the standard order: first it pulls out the greatest common factor — the gcd of all coefficients together with the lowest common power of the variable — so 2x³ − 8x becomes 2x(x² − 4). Then it searches for rational roots using the Rational Root Theorem, testing every candidate ±p/q where p divides the constant term and q divides the leading coefficient.

Each rational root r = p/q found by synthetic division contributes a factor (qx − p), and the quotient is reduced and searched again. Patterns like the difference of squares a² − b² = (a − b)(a + b) fall out of this process automatically as two rational roots, so x² − 4 factors to (x − 2)(x + 2). Whatever remains after all rational roots are removed is a quadratic or higher factor with no rational roots; it is irreducible over the rationals and is left in place and clearly labeled.

All coefficients are handled as exact fractions and everything runs locally in your browser with an eval-free parser. Enter a polynomial such as '2x^3 - 8x' or 'x^2 - 5x + 6' and read the extracted GCF, each linear factor, any irreducible remainder, and the fully factored product form.

Frequently asked questions

How does it factor a polynomial?
It extracts the greatest common factor first, then applies the Rational Root Theorem — testing ±p/q where p divides the constant and q divides the leading coefficient — and divides out each root as a linear factor (qx − p) by synthetic division.
Does it handle special patterns?
Yes, implicitly. Difference of squares, perfect-square trinomials, and sum/difference of cubes all produce rational or integer roots, so they are factored automatically. For example x³ + 8 factors to (x + 2)(x² − 2x + 4).
What if the polynomial cannot be fully factored?
Any quadratic or higher piece with no rational roots is irreducible over the rationals. The tool leaves it as a single factor and notes that the factorization is partial, so you still get the maximum integer/rational factoring.
Are fractional coefficients supported?
Yes. Rational coefficients are cleared to a common integer polynomial for factoring and the scaling factor is shown out front, so both the input and the result stay mathematically exact.

More tools