Factoring Calculator
Factor any polynomial in x — not just quadratics. Enter an expression like 6x+9, x²−5x+6, or x³−6x²+11x−6, and this calculator pulls out the greatest common factor, applies the quadratic formula, and uses the rational root theorem for cubics and beyond, showing every step, a graph with the real roots marked, and a plain-language explanation of what the result means.
Background
Factoring rewrites a polynomial as a product of simpler pieces — a constant, a common factor of x, and one or more linear (or occasionally an unfactorable quadratic) pieces. Every method below comes down to the same two moves: pull out whatever's common to every term, then find roots (values of x that make the expression zero) and turn each one into a factor.
How to use this calculator
- Type any polynomial in x — a plain linear expression, a quadratic, or a cubic (or higher, up to exponent 8).
- Click Factor to see the fully factored form, a graph with every real root marked, a diagram of each piece, and the full step-by-step reasoning.
- If a piece can't be resolved — an irreducible quadratic, or a higher-degree factor with no rational root — the calculator says exactly why, instead of guessing.
How this calculator works
First, pull out the greatest common factor (GCF) of every term's coefficient, and any common power of x shared by every term.
If what's left is linear (degree 1), its root is immediate: ax + b = 0 → x = −b/a.
If what's left is quadratic (degree 2), the discriminant D = b² − 4ac decides everything: D ≥ 0 gives two real roots (factor immediately); D < 0 means it's irreducible over the reals — its two roots are a complex-conjugate pair.
If what's left is degree 3 or higher, the calculator searches for a rational root using the rational root theorem (any rational root must be ±(a divisor of the constant term) ÷ (a divisor of the leading coefficient)), then divides it out with synthetic division and repeats.
If no rational root exists for a degree-3-or-higher piece, the calculator says so plainly rather than guessing — a real root (likely irrational) may still exist, it's just not one this method can pin down exactly.
When a root turns out to be a fraction p/q, the matching factor is shown as (qx − p) rather than (x − p/q) — e.g. 2x²−3x−5 factors as (2x−5)(x+1), not 2(x−5/2)(x+1) — which is the standard textbook form.
Formulas & Equations Used
Discriminant (quadratics): D = b² − 4ac
Quadratic formula: x = [−b ± √(b²−4ac)] / 2a
Rational root theorem (degree ≥ 3): every rational root of aₙxₙ + … + a₀ equals ±p/q, where p divides a₀ and q divides aₙ
Complex roots of an irreducible quadratic: x = −b/2a ± [√(4ac−b²)/2a]i
Example Problems & Step-by-Step Solutions
Example 1 — Greatest common factor
Factor 6x + 9.
Step: The GCF of 6 and 9 is 3: 6x+9 = 3(2x+3).
Result: 3(2x + 3).
Example 2 — A quadratic with fractional roots
Factor 2x² − 3x − 5.
Step: D = (−3)² − 4(2)(−5) = 49. Roots: x = 5/2 and x = −1.
Result: (2x − 5)(x + 1) — the fractional root 5/2 becomes the integer-coefficient factor (2x−5).
Example 3 — A cubic with three rational roots
Factor x³ − 6x² + 11x − 6.
Step: The rational root theorem finds x=1. Synthetic division leaves x²−5x+6, which factors into (x−2)(x−3).
Result: (x − 1)(x − 2)(x − 3).
Example 4 — A repeated root
Factor x³ − 3x² + 3x − 1.
Step: x=1 is a root; dividing it out twice more shows the same root each time.
Result: (x − 1)³ — a single factor, tripled.
Example 5 — Irreducible over the reals
Factor x² + 2x + 5.
Step: D = 2² − 4(1)(5) = −16 < 0.
Result: This doesn't factor over the reals; its roots are the complex pair x = −1 ± 2i.
Example 6 — No rational root
Factor x³ + x + 1.
Step: The only candidates from the rational root theorem are ±1, and neither works.
Result: This calculator can't fully factor it — it likely has one irrational real root beyond what this method can pin down exactly.
Frequently Asked Questions
Does this only work for quadratics?
No — it factors any polynomial in x up to exponent 8: linear expressions (for their GCF), quadratics (via the discriminant), and cubics or higher that have at least one rational root (via the rational root theorem and synthetic division).
Why does it show (2x − 5)(x + 1) instead of 2(x − 5/2)(x + 1)?
Both are mathematically identical, but factors with fraction-free integer coefficients are the standard way this is written — so a fractional root p/q is folded into its own factor as (qx − p) rather than left as (x − p/q).
What does "irreducible over the reals" mean?
It means a quadratic factor's discriminant is negative, so it has no real roots at all — it can't be split into real linear factors. It still has two roots, but they're a complex-conjugate pair, which this calculator will show.
What happens with a cubic (or higher) that has no rational root?
The calculator says so directly rather than guessing. For an odd-degree factor, a real root is guaranteed to exist (every odd-degree polynomial crosses the x-axis somewhere) — it's just irrational, and finding an exact irrational root isn't something the rational root theorem can do. For an even-degree factor, there's no such guarantee — it might have real roots this method just couldn't pin down, or it might have none at all, like x²+1.
Is there a limit on how large the polynomial can be?
Exponents are supported up to 8. Coefficients can be any plain number or simple fraction like 3/4.
How is a repeated root shown?
A root that shows up more than once is shown with an exponent on its factor, like (x−1)³ for a root of multiplicity 3 — and flagged with a badge, since a repeated root also means the graph only touches the x-axis there instead of crossing it (for even multiplicities).