Prime Factorization of Polynomials Calculator

Advanced polynomial factorization with exact arithmetic, smart detection, and clear steps. Handles rational roots, grouping, squares, cubes, and repeated factors robustly too well. See fully factored forms, multiplicities, and intermediate quotient polynomials with explanations included. Export CSV or PDF with one click, done right.

Use one variable (like x). Fractions allowed, e.g., 3/2x^2 - 1/3.
Formulae and Techniques Used
  • Content extraction: factor out gcd of coefficients to get a primitive polynomial.
  • Rational Root Theorem: possible roots are ± p/q where p|a0, q|an.
  • Factor Theorem: if r is a root, then (x − r) divides the polynomial.
  • Exact division by (q x − p): integer synthetic division checks remainder zero.
  • Special identities: a2 − b2 = (a−b)(a+b); a3 ± b3 = (a±b)(a2 ∓ ab + b2).
  • Quadratic check: discriminant b2−4ac detects reducible quadratics over the rationals.
How to Use This Calculator
  1. Enter your polynomial using one variable (e.g., x). Fractions allowed.
  2. Optionally set the variable letter; otherwise, it auto-detects.
  3. Click Factorize to compute the complete factorization over the rationals.
  4. Review normalized form, extracted content, and factors with multiplicities.
  5. Export the results: download CSV, or print/save as PDF.

Supported Degrees and Factor Forms

Designed for single-variable polynomials up to moderate degree. Extracts all rational linear factors and detects common identities including difference of squares and sum/difference of cubes when applicable.

Limitations and Notes

Example Data

# Polynomial Variable Expected Factorization (over ℚ) Notes
1 x^2 - 5x + 6 x (x - 2)(x - 3) Two rational roots
2 2x^3 + x^2 - 8x - 4 x (2x + 1)(x - 2)(x + 2) Three rational roots
3 x^4 - 1 x (x - 1)(x + 1)(x^2 + 1) Difference of squares twice
4 8x^3 - 27 x (2x - 3)(4x^2 + 6x + 9) Difference of cubes
5 6x^2 + 5x - 6 x (3x - 2)(2x + 3) Quadratic with rational factorization

Factorization Patterns Reference

Pattern Algebraic Form Factors (over ℚ) Example
Difference of squares a2 − b2 (a − b)(a + b) x4 − 1 → (x2 − 1)(x2 + 1)
Sum of cubes a3 + b3 (a + b)(a2 − ab + b2) x3 + 8 → (x + 2)(x2 − 2x + 4)
Difference of cubes a3 − b3 (a − b)(a2 + ab + b2) 8x3 − 27 → (2x − 3)(4x2 + 6x + 9)
Perfect square trinomial a2 ± 2ab + b2 (a ± b)2 x2 + 6x + 9 → (x + 3)2
Quadratic reducibility ax2 + bx + c Rational roots exist if Δ = b2 − 4ac is a rational square 6x2 + 5x − 6 → (3x − 2)(2x + 3)
Grouping (four terms) ax3 + bx2 + cx + d Group pairs to expose a common binomial factor 2x3 + x2 − 8x − 4 → (2x + 1)(x − 2)(x + 2)

Rational Root Candidates — Counts

For a primitive polynomial with leading coefficient |an| and constant term |a0|, candidates are ±p/q where p | |a0| and q | |an|. The maximum number of candidates is 2·τ(|a0|)·τ(|an|), where τ(n) counts the positive divisors of n.

|a0| |an| τ(|a0|) τ(|an|) Max Candidates 2·τ(|a0|)·τ(|an|) Notes
11112Only ±1
61418±1, ±2, ±3, ±6
624216Denominators 1 or 2
1236224Many ratios reduce
3068464Large candidate set

FAQs

It means factors use integer coefficients and rational numbers only. Complex or irrational factors are left inside irreducible polynomial blocks.

Yes. The parser multiplies by the least common multiple of denominators to clear fractions before factorization.

Repeated factors are automatically consolidated and displayed with exponents indicating multiplicity.

No. If no rational factors exist, the remaining polynomial is shown as an irreducible factor over the rationals.

Difference of squares, sum and difference of cubes, and simple grouping for some four-term polynomials.

No. Terms are parsed and combined by exponent. The calculator outputs a normalized polynomial and sorts terms by degree automatically.
Tip: For a quick PDF, use the red button below. Your browser’s print dialog lets you “Save as PDF.”

Related Calculators

Proportion and Ratio Calculatorsquare root calculator with stepsnegative square root calculatorfraction square root calculatorsquare root division calculatordecimal to square root calculatorderivative of square root calculatorharmonic mean calculatorbinomial distribution mean calculatordiscrete random variable mean calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.