Factoring Calculator with Steps
Factor signed integers into primes or factor supported one-variable polynomial expressions over rational numbers. Review exact factors, multiplicities, methods and an expansion or product check.
Last Updated: July 26, 2026
Factor an Integer or Polynomial
Choose a mode, enter one value or expression, then review the canonical factorization and exact reconstruction check.
Your exact factors will appear here.
- Input type
- —
- Expanded form
- —
- Exact factors
- —
- Polynomial degree
- —
- Rational content
- —
- Common x factor
- —
- Rational zeros
- —
- Completion status
- —
- Verification
- —
Calculation steps
- Enter an integer or polynomial expression and calculate.
Factor details
| Factor | Multiplicity | Degree or role | Classification |
|---|---|---|---|
| Calculate to see the factor details. | |||
Recent calculations
- Your last six results will appear here.
How to Use This Factoring Calculator
- Choose Polynomial expression when you want to factor an expression in x. Choose Signed integer when you need prime factors.
- Enter one expression or integer. Polynomial input may contain parentheses, rational coefficients and implicit multiplication such as 3x.
- Select Factor Polynomial or Factor Integer. The result appears below the buttons.
- Review the normalized input, exact factors, multiplicities, status and calculation steps.
- Check the verification card. A polynomial result is expanded again coefficient by coefficient. Integer prime factors are multiplied back to the original number.
Use the result as a learning and checking aid. Keep the exact factor form when later algebra depends on it. An expression is not an equation, so do not add = 0 unless your next task is to solve for x.
What This Calculator Factors
The calculator covers two related meanings of factoring. Integer mode writes a signed whole number as a product of primes. Polynomial mode rewrites a supported one-variable expression as a rational coefficient, a common power of x and primitive polynomial factors.
Polynomial calculations use exact rational coefficients. Finite decimals and scientific notation are converted to fractions before expansion. The tool completely factors the remaining primitive polynomial over the rational numbers when its degree is 4 or lower. A common power of x is extracted first, so a monomial or an expression such as x4(x4 + 5x2 + 4) remains within the supported residual-degree limit.
This page does not solve an equation, graph a function or provide irrational and complex linear factors. Use the Equation Calculator for a typed equation and the Quadratic Equation Calculator for roots, discriminant and vertex details.
Prime Factorization of Integers
A prime number is a positive integer greater than 1 with exactly two positive divisors, 1 and itself. The fundamental theorem of arithmetic states that every integer greater than 1 has one prime factorization apart from factor order. The calculator sorts the prime factors and combines repeats with exponents.
The exponents show multiplicity. Here 2 occurs three times, 3 occurs twice and 5 occurs once. The number of positive divisors is (3 + 1)(2 + 1)(1 + 1) = 24. A negative integer adds a factor of -1. The values 1 and -1 are units, not primes. Zero has no prime factorization because every nonzero integer divides zero.
What Factoring Over Rational Numbers Means
Polynomial mode factors over Q[x], the polynomials in x whose coefficients are rational numbers. A rational number is a fraction of integers with a nonzero denominator. Integer coefficients are included because every integer is rational.
The chosen domain matters. The polynomial x2 - 2 has no factorization into lower-degree polynomials with rational coefficients, so it is irreducible over Q. Over the real numbers it factors using √2. The polynomial x2 + 1 is also irreducible over Q and over the reals, although it factors over the complex numbers. This calculator keeps those expressions as irreducible rational factors instead of turning approximate roots into false exact factors.
Extracting the GCF, Rational Content and x Power
The first polynomial step is to expand the input and combine like terms. The calculator then clears coefficient denominators and finds the greatest common divisor of the resulting integers. This produces a signed rational content and a primitive integer polynomial with positive leading coefficient.
The smallest exponent attached to a nonzero term identifies a common power of x. For 6x3 + 9x2, the numerical GCF is 3 and the common variable factor is x2. Removing both leaves 2x + 3, so the complete factorization is 3x2(2x + 3).
Extracting the content and monomial first makes later searches smaller. It also keeps the displayed form canonical, with the signed rational content first, the x power second and primitive factors after them.
Factoring Quadratic Trinomials
A quadratic trinomial has form ax2 + bx + c. It factors over the rational numbers when its discriminant b2 - 4ac is a nonnegative perfect square after rational coefficients are cleared. The resulting rational zeros correspond to exact linear factors.
For 6x2 + 11x + 3, the discriminant is 121 - 72 = 49. Its exact roots are -3/2 and -1/3, which produce primitive factors 2x + 3 and 3x + 1.
The calculator reports factors only after exact polynomial division succeeds. It then multiplies the displayed factors to confirm every coefficient, including the middle term.
Difference of Squares and Cubes
Special products provide familiar shortcuts, but the exact engine does not depend on recognizing how an expression looks. A difference of squares follows a2 - b2 = (a - b)(a + b). Thus x2 - 9 becomes (x - 3)(x + 3).
For cubes, a3 - b3 = (a - b)(a2 + ab + b2) and a3 + b3 = (a + b)(a2 - ab + b2). Therefore x3 - 8 factors as (x - 2)(x2 + 2x + 4). The quadratic factor remains irreducible over Q.
Repeated Factors and Multiplicity
A factor may occur more than once. The exponent on a factor states its multiplicity. For x2 + 6x + 9, the factor x + 3 occurs twice, so the result is (x + 3)2. For x3 + 3x2 + 3x + 1, it occurs three times, giving (x + 1)3.
The factor table keeps multiplicity separate from degree. A repeated quadratic such as (x2 + 1)2 has one distinct nonconstant factor of degree 2 and total multiplicity 2.
Quartics Without Rational Zeros
Testing rational zeros alone does not completely factor every fourth-degree polynomial. The expression x4 + 5x2 + 4 has no rational linear zero, but it is reducible. Treat y = x2. Then y2 + 5y + 4 = (y + 1)(y + 4).
The calculator performs an exact quadratic-by-quadratic search for quartics after checking rational linear factors. This closes the gap that would otherwise mislabel a reducible quartic as irreducible. Each candidate pair must pass exact integer polynomial multiplication.
Worked Example: Factor 2x Cubed Minus 8x
Start with 2x3 - 8x. Both terms contain 2x, so extract it.
The remaining binomial is a difference of squares because x2 - 4 = x2 - 22. Factor it into conjugates.
The rational zeros are -2, 0 and 2. Expanding 2x[(x - 2)(x + 2)] gives 2x(x2 - 4), then 2x3 - 8x. The exact reconstruction matches the original polynomial.
Irreducible Polynomial Factors
A nonconstant polynomial is irreducible over Q when it cannot be written as a product of lower-degree nonconstant polynomials with rational coefficients. Linear factors are already irreducible. A quadratic is irreducible over Q when it has no rational root. A cubic is reducible over Q only if it has a rational root.
For a quartic, the calculator checks both rational linear factors and possible integer quadratic pairs after rational content is removed. A quartic is labeled irreducible only after both exhaustive checks fail. Inputs beyond the supported residual degree are rejected rather than shown as a guessed or partial completed factorization.
Input Rules and Calculation Limits
Polynomial input accepts one variable named x, plus +, -, *, /, ^, parentheses and implicit multiplication. Integers, finite decimals, written fractions and scientific notation are supported. Division is allowed only by a nonzero constant expression. This permits (x + 2)/2 but rejects 1/x because a variable denominator creates a rational expression.
The parser expands powers up to degree 8. After the common x power is removed, the remaining primitive polynomial must have degree 4 or lower for a complete rational factorization. Each entered number may have up to 50 significant digits, and scientific exponents must stay from -100 through 100. For cubic and quartic searches, the absolute primitive leading and constant coefficients must not exceed 1018. Other bounded exact-integer work limits still apply. If a limit is reached, the calculator returns an error and does not present an incomplete answer as complete.
Integer mode accepts signed whole numbers with absolute value at most 1018. It rejects commas, decimal points and scientific notation. Deterministic primality checks and exact integer products validate the result within this range.
Common Factoring Mistakes
- Forgetting to extract the numerical GCF before factoring the primitive part.
- Missing a common power of x shared by every nonzero term.
- Changing signs when a negative leading coefficient is moved into the content.
- Using rounded decimal roots as though they were exact rational factors.
- Stopping after a rational-root test and calling every remaining quartic irreducible.
- Writing an equation solution when the task asks only for an expression factorization.
- Failing to multiply the factors back to verify the original coefficients.
Method and Review Basis
The workflow begins with the GCF, follows exact special-product and trinomial principles, and finishes with multiplication as a check. This matches the general approach in OpenStax Intermediate Algebra 2e.
Rational linear candidates follow the Rational Zero Theorem and are confirmed using exact division, consistent with OpenStax College Algebra 2e. The implementation uses a defined parser rather than executing entered text as code. Every successful factorization is reconstructed with exact rational or integer arithmetic before display.
Related Calculators
Frequently Asked Questions
What does this factoring calculator factor?
It finds prime factors of signed integers and completely factors supported one-variable polynomial expressions over rational numbers.
Does it factor quadratic trinomials?
Yes. It factors a supported quadratic over rational numbers when exact rational linear factors exist and verifies them by multiplication.
What does factoring over rational numbers mean?
It means the coefficient and every displayed polynomial factor use rational coefficients, without approximate irrational or complex linear factors.
Why does x squared minus 2 remain unfactored?
Its roots are irrational, so x squared minus 2 is irreducible over rational numbers even though it factors over the real numbers.
Does it extract the greatest common factor?
Yes. It extracts a signed rational coefficient content and the largest power of x shared by every nonzero term.
Does it recognize a difference of squares?
Yes. Exact factor searches produce the two conjugate factors when both square terms lead to rational polynomial factors.
Does it factor sums and differences of cubes?
Yes, when the expanded polynomial stays within the supported degree and exact-work limits.
How are repeated factors displayed?
Repeated factors are combined and shown with an exponent, while the factor table reports their multiplicity separately.
Are fractions and decimals supported?
Polynomial mode accepts written fractions, finite decimals and scientific notation and converts them to exact rational coefficients.
Can I enter an equation?
No. Enter a polynomial expression without an equals sign. Use the Equation Calculator when you need to solve for x.
What happens with the zero polynomial?
The calculator reports that zero has no unique polynomial factorization because every nonzero polynomial divides the zero polynomial.
Is the calculation performed in my browser?
Yes. Parsing, exact factoring, verification and recent calculation history run in the current browser page.
Disclaimer: This calculator provides general mathematical results for learning and checking work. Verify notation, coefficient domains, factor requirements and course instructions before using a result for academic, scientific, engineering or other important work.