Factor Polynomials Calculator

Factor any polynomial in \(x\) over the rationals — instantly

Overview

This free calculator factors polynomials over the rationals — that is, it writes the input as a product of linear factors and irreducible quadratic factors with rational (typically integer) coefficients. If the polynomial is already irreducible over the rationals, the calculator returns it unchanged.

To learn the underlying methods, see factoring polynomials, factoring by common factor, factoring by grouping, and factoring using the Rational Root Theorem.

Scope: Factoring over the reals is a broader problem and may involve irrational roots — that's outside this calculator's scope. Factoring over the complex numbers is broader still (every polynomial splits into linear factors over ℂ).

Interactive Factoring Calculator

Enter a polynomial \( P(x) \) using +, -, *, ^, /, and parentheses. Example: 2*x^2 + 3*x - 5.



Example — Factor \(P(x) = x^4 + x^3 + 7x^2 + 9x - 18\)

Step-by-Step Solution

Step 1 — Test rational roots. By the Rational Root Theorem, any rational root is of the form \( \pm p/q \) where \( p \mid 18 \) and \( q \mid 1 \), so the candidates are \( \pm 1, \pm 2, \pm 3, \pm 6, \pm 9, \pm 18 \). Testing gives:

\[ P(1) = 1 + 1 + 7 + 9 - 18 = 0 \] \[ P(-2) = 16 - 8 + 28 - 18 - 18 = 0 \]

So \( (x - 1) \) and \( (x + 2) \) are factors.

Step 2 — Divide out the linear factors. Their product is \( (x - 1)(x + 2) = x^2 + x - 2 \). Polynomial long division:

\[ P(x) \div (x^2 + x - 2) = x^2 + 9 \]

Verify: \( (x^2 + x - 2)(x^2 + 9) = x^4 + x^3 + 7x^2 + 9x - 18 \) ✓

Step 3 — Test the remaining quadratic. The discriminant of \( x^2 + 9 \) is \( 0^2 - 4(1)(9) = -36 < 0 \), so it has no real roots and cannot be factored further over the reals (or over the rationals).

Final answer:

\[ P(x) = (x - 1)(x + 2)(x^2 + 9) \]

Syntax Examples

Copy any of the following into the calculator and click Factor Polynomial:

Common Input Errors

Frequently Asked Questions

What does it mean to factor a polynomial?

Factoring a polynomial means writing it as a product of simpler polynomials. For example, \(x^2 + 2x - 3 = (x+3)(x-1)\). A polynomial is "fully factored over the rationals" when every factor is linear (degree 1) or irreducible over the rationals (e.g., \(x^2 + 1\)).

Why does my polynomial come back unchanged?

If the calculator returns the same expression you entered, the polynomial is already irreducible over the rationals. For example, \(x^2 + 1\) and \(x^4 + 4\) have no rational roots and no rational factorizations.

What is the Rational Root Theorem?

The Rational Root Theorem states that any rational root of a polynomial with integer coefficients must be of the form \( \pm p/q \), where \( p \) divides the constant term and \( q \) divides the leading coefficient. It narrows the list of possible rational roots for testing.

What syntax does the calculator accept?

Use +, -, *, ^, /, and parentheses. The variable must be x. Example: 2*x^2 + 3*x - 5.

More Tutorials and Practice

Last updated: October 17, 2026