Skip to main content

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.

Enter your polynomial

Step 1 — What do you want to factor?

Use x for the variable, ^ for exponents, and +/- between terms — e.g. 2x^3-5x^2+3. Exponents up to 8 are supported.

Leave blank to skip. Plugs the value into the original polynomial and marks it on the graph.

Learning options

Result

No result yet. Enter a polynomial above and click 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

1

First, pull out the greatest common factor (GCF) of every term's coefficient, and any common power of x shared by every term.

2

If what's left is linear (degree 1), its root is immediate: ax + b = 0 → x = −b/a.

3

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.

4

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.

5

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.

6

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).

The Quadratic Formula
5. BONUS: Mathematical Operations and Functions
10 problems
Topic
5. BONUS: Mathematical Operations and Functions
5 topics 15 problems
Chapter
Factoring Polynomials
0. Review of Algebra
7 problems
Topic
Callie
The Quadratic Formula
1. Equations & Inequalities
6 problems
Topic
Callie
Intro to Quadratic Equations
1. Equations & Inequalities
4 problems
Topic
Callie
Choosing a Method to Solve Quadratics
1. Equations & Inequalities
7 problems
Topic
Callie
Zeros of Polynomial Functions
4. Polynomial Functions
4 problems
Topic
Callie
0. Review of Algebra - Part 1 of 2
5 topics 10 problems
Chapter
Callie
0. Review of Algebra - Part 2 of 2
3 topics 10 problems
Chapter
Callie
1. Equations & Inequalities - Part 1 of 3
4 topics 11 problems
Chapter
Callie
1. Equations & Inequalities - Part 2 of 3
4 topics 10 problems
Chapter
Callie
1. Equations & Inequalities - Part 3 of 3
4 topics 10 problems
Chapter
Callie
4. Polynomial Functions
5 topics 11 problems
Chapter
Callie
Factoring Polynomials
0. Fundamental Concepts of Algebra
3 problems
Topic
The Quadratic Formula
1. Equations and Inequalities
6 problems
Topic
Intro to Quadratic Equations
1. Equations and Inequalities
4 problems
Topic
Choosing a Method to Solve Quadratics
1. Equations and Inequalities
5 problems
Topic
0. Fundamental Concepts of Algebra
10 topics 10 problems
Chapter
1. Equations and Inequalities - Part 1 of 2
7 topics 13 problems
Chapter
1. Equations and Inequalities - Part 2 of 2
5 topics 12 problems
Chapter
The Quadratic Formula
BONUS: Mathematical Operations and Functions
4 problems
Topic
BONUS: Mathematical Operations and Functions - Part 1 of 2
4 topics 9 problems
Chapter
BONUS: Mathematical Operations and Functions - Part 2 of 2
1 topic 2 problems
Chapter
Solving Quadratic Equations
0. Review of College Algebra
1 problem
Topic
0. Review of College Algebra - Part 1 of 2
4 topics 9 problems
Chapter
Patrick
0. Review of College Algebra - Part 2 of 2
5 topics 10 problems
Chapter
Patrick
Factoring Trinomials of the Form ax² + bx + c
7. Factoring
5 problems
Topic
ErnestBlazevic
Factoring Trinomials of the Form x² + bx + c
7. Factoring
5 problems
Topic
ErnestBlazevic
Quadratic Equations & Applications
7. Factoring
5 problems
Topic
ErnestBlazevic
7. Factoring - Part 1 of 2
4 topics 12 problems
Chapter
JustinRaimundo
7. Factoring - Part 2 of 2
1 topic 3 problems
Chapter
ErnestBlazevic
Function Analyzer Calculator
Analyze functions with graphs, derivatives, extrema, limits, asymptotes, and step-by-step explanations
Quadratic Equation Calculator
Solve quadratic equations with exact roots, steps, and graph
Eigenvalue and Eigenvector Calculator
Calculate eigenvalues, eigenvectors, characteristic polynomials, and diagonalization with steps
Fraction Calculator
Calculate fractions step by step with mixed numbers, decimals, LCD/LCM, comparisons, and conversions
Inequality Solver
Solve linear, compound, quadratic, rational, and absolute value inequalities with steps and graphs
Equation Solver
Solve algebra equations step by step with checks, visuals, and multiple equation types
Rational Equation Solver
Solve rational equations with domain restrictions, LCD clearing, extraneous checks
Discriminant Calculator
Find the discriminant of a quadratic, cubic, or conic equation to classify its roots or curve shape
Conic Sections Calculator
Identify and convert circle, parabola, ellipse, and hyperbola equations with steps
Simplify Expression Calculator
Simplify, expand, factor, and reduce algebraic expressions step by step
Multiplying Polynomials Calculator
Multiply two polynomials and simplify the result step by step
Graphing Calculator
Graph functions, compare equations, trace coordinates, and explore graph features step by step
Laplace Transform Calculator
Calculate Laplace transforms, inverse transforms, differential equations, and circuit responses step by step
Rational Expression Calculator
Simplify, multiply, divide, add, subtract, solve, and find the domain of rational expressions — with full steps
FOIL Calculator (Binomial Multiplication)
Multiply two binomials with FOIL, spot perfect squares and differences of squares - with visual diagrams and steps
Simplify Fractions Calculator
Reduce fractions to lowest terms with steps and alternate forms
Limit Calculator
Calculate two-sided, one-sided, infinity, and piecewise limits with steps
Completing the Square Calculator
Solve quadratics, convert to vertex form, or compare with the quadratic formula - with area and parabola diagrams
Complex Numbers Calculator
Add, subtract, multiply, and divide complex numbers — with Argand diagrams and step-by-step solutions
SAT / ACT Score Calculator & Predictor
Calculate SAT and ACT scores, compare test equivalents, predict improvements, and plan score goals
Rational Zeros Calculator
Find rational zeros using the Rational Root Theorem and synthetic division
Slope / Slope-Intercept Calculator
Find slope, line equations, intercepts, and graph linear equations with steps
Mathematical Induction Proof Helper
Build induction proofs step by step with base case, hypothesis, induction step, and final conclusion
Back to all calculatorsAll calculators