Factoring Calculator
The tool below factors an algebraic expression: it rewrites the expression as a product of simpler factors and shows every step. Enter a polynomial and watch the calculator work through the factoring.
Type naturally or click ⌨ in the box to use the math keyboard.
Examples: x^2 for x², x^2 + 5x + 6 for a trinomial, x^2 - 9 for a difference of squares.
To factor an expression means to rewrite it as a product. For example, \(x^2 + 5x + 6\) factors as \((x+2)(x+3)\) — multiply those binomials and you get back the original. Factoring is the reverse of expanding, and it's the key first step in solving most quadratic equations.
Worked Examples
Three examples worked by hand — the same logic the calculator uses, just spelled out so you can follow it on paper.
Example 1: Factor \(x^2 + 7x + 12\)
Look for two numbers that multiply to \(12\) and add to \(7\). The factor pairs of 12 are \((1, 12)\), \((2, 6)\), and \((3, 4)\). The pair \((3, 4)\) adds to \(7\). ✓
\[x^2 + 7x + 12 = (x + 3)(x + 4)\]
Check by expanding: \((x+3)(x+4) = x^2 + 4x + 3x + 12 = x^2 + 7x + 12\). ✓
Example 2: Factor \(9x^2 - 25\) (difference of squares)
Recognize the form \(a^2 - b^2\) with \(a = 3x\) and \(b = 5\), since \((3x)^2 = 9x^2\) and \(5^2 = 25\). The difference-of-squares pattern gives:
\[9x^2 - 25 = (3x + 5)(3x - 5)\]
For more on this pattern, see Factoring Simple Polynomials.
Example 3: Factor \(2x^2 + 7x + 3\) (leading coefficient ≠ 1)
Use the AC method. Multiply \(a \cdot c = 2 \cdot 3 = 6\). Find two numbers that multiply to \(6\) and add to \(7\) — the pair \((1, 6)\) works. Split the middle term:
\[2x^2 + 7x + 3 = 2x^2 + x + 6x + 3\]
Group the terms in pairs and factor each pair:
\[= x(2x + 1) + 3(2x + 1) = (2x + 1)(x + 3)\]
Check: \((2x+1)(x+3) = 2x^2 + 6x + x + 3 = 2x^2 + 7x + 3\). ✓
What Does it Mean to Factor?
Factoring rewrites an expression as a product of simpler expressions. Done completely, factoring breaks an expression down as far as it will go using integer (or rational) coefficients — pulling out a greatest common factor first, then applying special patterns or the AC method to what remains.
Factoring matters because it makes equations easier to solve. If \((x+2)(x+3) = 0\), then one of those factors has to be zero, so \(x = -2\) or \(x = -3\). That's the zero product property at work, and it only works once the expression is factored.
Try These Examples
x^2 + 5x + 6— trinomialx^2 - 9— difference of squares2x^2 + 7x + 3— leading coefficient ≠ 1x^3 - 8— difference of cubesx^2 - 4x + 4— perfect square6x^2 + 11x - 10— needs the AC method
Common Factoring Patterns
A quick reference for the patterns this calculator looks for:
| Pattern | Factored form |
|---|---|
| \(x^2 + (a+b)x + ab\) | \((x+a)(x+b)\) |
| \(a^2 - b^2\) | \((a+b)(a-b)\) |
| \(a^2 + 2ab + b^2\) | \((a+b)^2\) |
| \(a^2 - 2ab + b^2\) | \((a-b)^2\) |
| \(a^3 + b^3\) | \((a+b)(a^2 - ab + b^2)\) |
| \(a^3 - b^3\) | \((a-b)(a^2 + ab + b^2)\) |
For polynomials that don't match a pattern directly, the calculator tries pulling out a greatest common factor first, then attempts grouping or the AC method for trinomials with a leading coefficient other than 1.
Tips for Using the Calculator
- For powers, use
^:x^3means \(x^3\) - For multiplication, you can use
*or just write terms together:2xor2*x - The virtual math keyboard gives one-click access to all common symbols
- If you're factoring a number rather than a polynomial, the calculator will return its prime factorization
If your goal is to solve a quadratic equation rather than just factor it, try the Equation Solver — it factors when it can, and falls back to the quadratic formula when it can't.
Frequently Asked Questions
What's the difference between factoring and solving?
Factoring rewrites an expression as a product. Solving uses that factored form to find values that make an equation true. Factoring \(x^2 + 5x + 6\) produces \((x+2)(x+3)\); solving \(x^2 + 5x + 6 = 0\) gives \(x = -2\) or \(x = -3\).
Can every polynomial be factored?
Every polynomial can be factored over the complex numbers, but not every polynomial factors nicely over the integers or rationals. If the calculator reports that an expression is "irreducible," it means there's no way to break it down into simpler factors with integer coefficients.
What does "factor completely" mean?
It means keep factoring until nothing can be factored further. Start by pulling out the greatest common factor, then check for special patterns (difference of squares, perfect squares, sum or difference of cubes), then factor whatever trinomial is left. For example, \(2x^2 - 8\) factors completely as \(2(x-2)(x+2)\), not just \(2(x^2 - 4)\).
How do I factor when the leading coefficient isn't 1?
Use the AC method (shown in Example 3 above): multiply the leading coefficient by the constant term, find two numbers that multiply to that product and add to the middle coefficient, split the middle term, then group.
Is factoring the same as simplifying?
Not quite. Simplifying usually means combining like terms or reducing a fraction. Factoring specifically means writing an expression as a product. They overlap when simplifying a rational expression requires factoring the numerator and denominator first so common factors can cancel.