Factoring Calculator
Factor polynomials and integers step-by-step. Supports GCF, trinomials, difference of squares, and more.
Use ^ for powers (x^2), * for
multiplication (3*x), and only the variable x.
Positive or negative integers up to about 10 digits work best.
How this factoring calculator works
This tool focuses on the most common algebra factoring tasks you see in high school and early college: factoring integers, quadratics, and many higher-degree polynomials with integer coefficients.
For polynomials in \(x\), the calculator tries these methods in order:
- Normalize the expression (remove spaces, combine like terms, sort by degree).
- Greatest common factor (GCF) of all coefficients.
- Difference of squares patterns like \(a^2 - b^2\).
- Quadratic trinomials \(ax^2 + bx + c\) using the AC method.
- Quadratic in disguise (e.g. \(x^4 - 5x^2 + 4\) by substituting \(u = x^2\)).
1. Factoring integers into primes
When you choose Integer mode, the calculator computes the prime factorization of the number.
Example:
\(360 = 2^3 \cdot 3^2 \cdot 5\)
Algorithm outline:
- Take the absolute value \(n\).
- Repeatedly divide by 2 while even.
- Try odd divisors up to \(\sqrt{n}\).
- If the remaining \(n > 1\), it is prime.
2. Factoring out the greatest common factor (GCF)
For a polynomial like \(6x^2 + 9x\), every term shares a common factor of 3:
\(6x^2 + 9x = 3(2x^2 + 3x)\)
The calculator:
- Extracts the GCF of all coefficients.
- Divides each term by that GCF.
- Continues factoring the inside if possible.
3. Factoring trinomials \(ax^2 + bx + c\)
For quadratics, we use the AC method (also called factoring by grouping):
- Compute \(A = a \cdot c\).
- Find integers \(m, n\) such that \(m \cdot n = A\) and \(m + n = b\).
- Rewrite \(bx\) as \(mx + nx\).
- Factor by grouping.
Example: \(6x^2 + 11x - 35\)
\(a = 6,\; b = 11,\; c = -35,\; A = 6 \cdot (-35) = -210\)
We need \(m, n\) with \(m \cdot n = -210\) and \(m + n = 11\).
One pair is \(21\) and \(-10\).
\(6x^2 + 11x - 35 = 6x^2 + 21x - 10x - 35\)
\(= 3x(2x + 7) - 5(2x + 7)\)
\(= (3x - 5)(2x + 7)\)
4. Difference of squares and special patterns
The calculator also recognizes common patterns such as:
- \(a^2 - b^2 = (a - b)(a + b)\)
- \(a^2 + 2ab + b^2 = (a + b)^2\)
- \(a^2 - 2ab + b^2 = (a - b)^2\)
Example:
\(x^4 - 16 = (x^2)^2 - 4^2 = (x^2 - 4)(x^2 + 4) = (x - 2)(x + 2)(x^2 + 4)\)
5. Limitations
- Only one variable \(x\) is supported.
- Coefficients should be integers (no decimals or fractions).
- Very high degrees or huge coefficients may not factor in reasonable time.
- If no integer factorization exists, the tool reports the polynomial as irreducible over the integers.
Factoring practice examples
- \(x^2 - 9 = (x - 3)(x + 3)\)
- \(4x^2 - 12x = 4x(x - 3)\)
- \(x^4 - 5x^2 + 4 = (x^2 - 1)(x^2 - 4) = (x - 1)(x + 1)(x - 2)(x + 2)\)