Factor Calculator
Factor polynomials and expressions using GCF, grouping, quadratic patterns, and difference of squares.
Try these examples:
Staring at $x^2 + 7x + 12$ and not sure where to start? Factoring is one of those algebra skills that feels like magic when it clicks—but frustrating when it doesn't. Whether you're solving equations, simplifying expressions, or finding zeros of polynomials, factoring is an essential tool you'll use throughout algebra, precalculus, and calculus.
This comprehensive guide will teach you everything about polynomial factoring: the fundamental patterns, step-by-step techniques, common mistakes to avoid, and how to verify your work—with real examples you can follow.
🎯 Try it now: Use our free interactive Factor Calculator to factor polynomials instantly with step-by-step CAS-verified solutions showing GCF, difference of squares, and trinomial patterns.
💡 Pro tip: Always check for a Greatest Common Factor (GCF) first before trying other factoring methods. Factoring out the GCF simplifies the remaining expression and makes other patterns easier to spot.
📸 Ready to get unstuck? Try MathPad Free →
What is Factoring?
Factoring is the process of breaking down a polynomial into a product of simpler polynomials. It's the reverse of expanding (multiplying out).
Expanding (forward): $$(x + 2)(x + 3) = x^2 + 5x + 6$$
Factoring (reverse): $$x^2 + 5x + 6 = (x + 2)(x + 3)$$
Why Factor?
Factoring is more than a mechanical skill—it's essential for:
1. Solving Equations The Zero Product Property states: If $ab = 0$, then $a = 0$ or $b = 0$.
Example: Solve $x^2 + 5x + 6 = 0$
- Factor: $(x + 2)(x + 3) = 0$
- Apply zero product: $x + 2 = 0$ or $x + 3 = 0$
- Solutions: $x = -2$ or $x = -3$
2. Simplifying Rational Expressions $$\frac{x^2 - 4}{x - 2} = \frac{(x-2)(x+2)}{x-2} = x + 2 \quad (x \neq 2)$$
3. Finding Zeros and Graphing The factored form immediately shows where a function crosses the x-axis.
4. Calculus Applications
- Integration by partial fractions
- Analyzing function behavior
- Finding critical points
Real-World Applications
- Engineering: Analyzing stability of systems (roots of characteristic equations)
- Physics: Projectile motion, wave equations
- Economics: Break-even analysis, revenue optimization
- Computer Graphics: Curve modeling with Bézier polynomials
The Five Core Factoring Patterns
Mastering factoring means recognizing patterns instantly. Here are the five essential patterns:
Pattern 1: Greatest Common Factor (GCF)
Always check first! Factor out the largest expression that divides all terms.
Formula: $$ab + ac = a(b + c)$$
Examples:
- $6x^2 + 9x = 3x(2x + 3)$ (GCF is $3x$)
- $15x^3 - 10x^2 + 5x = 5x(3x^2 - 2x + 1)$ (GCF is $5x$)
- $4x^2y + 8xy^2 = 4xy(x + 2y)$ (GCF is $4xy$)
Strategy: Find the GCF of coefficients, then find the lowest power of each variable.
Pattern 2: Difference of Squares
Formula: $$a^2 - b^2 = (a + b)(a - b)$$
Key features:
- Two terms (binomial)
- Both are perfect squares
- Minus sign between them
Examples:
- $x^2 - 9 = x^2 - 3^2 = (x + 3)(x - 3)$
- $4x^2 - 25 = (2x)^2 - 5^2 = (2x + 5)(2x - 5)$
- $x^4 - 16 = (x^2)^2 - 4^2 = (x^2 + 4)(x^2 - 4) = (x^2 + 4)(x + 2)(x - 2)$
Note: Sum of squares $a^2 + b^2$ does not factor over real numbers!
Pattern 3: Perfect Square Trinomial
Formulas: $$a^2 + 2ab + b^2 = (a + b)^2$$ $$a^2 - 2ab + b^2 = (a - b)^2$$
How to recognize:
- First and last terms are perfect squares
- Middle term is twice the product of the square roots
- Check: Is middle term $= 2\sqrt{\text{first}} \cdot \sqrt{\text{last}}$?
Examples:
- $x^2 + 6x + 9 = x^2 + 2(3x) + 3^2 = (x + 3)^2$
- $4x^2 - 12x + 9 = (2x)^2 - 2(2x)(3) + 3^2 = (2x - 3)^2$
- $x^2 + 10x + 25 = (x + 5)^2$
Pattern 4: Difference/Sum of Cubes
Formulas: $$a^3 - b^3 = (a - b)(a^2 + ab + b^2)$$ $$a^3 + b^3 = (a + b)(a^2 - ab + b^2)$$
Mnemonic: "Same, Opposite, Always Positive" (SOAP)
- First binomial: same sign as the middle sign
- Second trinomial: opposite sign, then always positive
Examples:
- $x^3 - 8 = x^3 - 2^3 = (x - 2)(x^2 + 2x + 4)$
- $x^3 + 27 = x^3 + 3^3 = (x + 3)(x^2 - 3x + 9)$
- $8x^3 - 125 = (2x)^3 - 5^3 = (2x - 5)(4x^2 + 10x + 25)$
Pattern 5: Trinomial Factoring (ax² + bx + c)
The most common—and trickiest—pattern.
When $a = 1$ (simple trinomials):
Factor $x^2 + bx + c$ into $(x + m)(x + n)$ where:
- $m + n = b$ (sum equals middle coefficient)
- $m \cdot n = c$ (product equals constant term)
Example: $x^2 + 7x + 12$
- Need two numbers that multiply to 12 and add to 7
- Factors of 12: 1×12, 2×6, 3×4
- $3 + 4 = 7$ ✓ and $3 \times 4 = 12$ ✓
- Answer: $(x + 3)(x + 4)$
When $a \neq 1$ (complex trinomials):
Use the AC method:
- Multiply $a \times c$
- Find two numbers that multiply to $ac$ and add to $b$
- Split the middle term
- Factor by grouping
Example: $6x^2 + 11x + 3$
- $ac = 6 \times 3 = 18$
- Find factors of 18 that add to 11: $9 + 2 = 11$ ✓
- Split: $6x^2 + 9x + 2x + 3$
- Group: $3x(2x + 3) + 1(2x + 3) = (3x + 1)(2x + 3)$
Factoring by Grouping
Use when you have four terms (or an even number of terms).
Strategy:
- Group terms in pairs
- Factor out GCF from each pair
- Factor out the common binomial
Example: Factor $x^3 + 3x^2 + 2x + 6$
Solution:
- Group: $(x^3 + 3x^2) + (2x + 6)$
- Factor each group: $x^2(x + 3) + 2(x + 3)$
- Factor out common binomial: $(x + 3)(x^2 + 2)$
Answer: $(x + 3)(x^2 + 2)$
Step-by-Step Factoring Examples
Example 1: GCF Only
Problem: Factor $12x^3 - 18x^2 + 6x$
Solution:
Step 1: Find GCF of coefficients: $\gcd(12, 18, 6) = 6$
Step 2: Find lowest power of variables: $x^1$
Step 3: GCF = $6x$
Step 4: Factor out: $$12x^3 - 18x^2 + 6x = 6x(2x^2 - 3x + 1)$$
Check: Expand to verify: $6x(2x^2 - 3x + 1) = 12x^3 - 18x^2 + 6x$ ✓
Answer: $6x(2x^2 - 3x + 1)$
Example 2: Difference of Squares
Problem: Factor $9x^2 - 64$
Solution:
Step 1: Recognize the pattern: both terms are perfect squares
- $9x^2 = (3x)^2$
- $64 = 8^2$
- Minus sign between them ✓
Step 2: Apply difference of squares: $a^2 - b^2 = (a+b)(a-b)$
$$9x^2 - 64 = (3x)^2 - 8^2 = (3x + 8)(3x - 8)$$
Check: $(3x + 8)(3x - 8) = 9x^2 - 24x + 24x - 64 = 9x^2 - 64$ ✓
Answer: $(3x + 8)(3x - 8)$
Example 3: Simple Trinomial (a = 1)
Problem: Factor $x^2 + 5x - 14$
Solution:
Step 1: Need two numbers that:
- Multiply to $c = -14$
- Add to $b = 5$
Step 2: List factor pairs of -14:
- $1 \times (-14) = -14$, $1 + (-14) = -13$ ❌
- $2 \times (-7) = -14$, $2 + (-7) = -5$ ❌
- $7 \times (-2) = -14$, $7 + (-2) = 5$ ✓
Step 3: Write factors: $$x^2 + 5x - 14 = (x + 7)(x - 2)$$
Check: $(x + 7)(x - 2) = x^2 - 2x + 7x - 14 = x^2 + 5x - 14$ ✓
Answer: $(x + 7)(x - 2)$
Example 4: Complex Trinomial (a ≠ 1, AC Method)
Problem: Factor $6x^2 + 11x + 3$
Solution:
Step 1: Calculate $ac = 6 \times 3 = 18$
Step 2: Find two numbers that multiply to 18 and add to 11:
- Factors of 18: 1×18, 2×9, 3×6
- $9 + 2 = 11$ ✓ and $9 \times 2 = 18$ ✓
Step 3: Split the middle term using 9 and 2: $$6x^2 + 11x + 3 = 6x^2 + 9x + 2x + 3$$
Step 4: Factor by grouping: $$(6x^2 + 9x) + (2x + 3)$$ $$= 3x(2x + 3) + 1(2x + 3)$$ $$= (2x + 3)(3x + 1)$$
Check: $(2x + 3)(3x + 1) = 6x^2 + 2x + 9x + 3 = 6x^2 + 11x + 3$ ✓
Answer: $(2x + 3)(3x + 1)$
Example 5: Difference of Cubes
Problem: Factor $x^3 - 27$
Solution:
Step 1: Recognize difference of cubes: $x^3 - 3^3$
Step 2: Apply formula: $a^3 - b^3 = (a - b)(a^2 + ab + b^2)$
Where $a = x$ and $b = 3$:
$$x^3 - 27 = (x - 3)(x^2 + 3x + 9)$$
Check: The trinomial $x^2 + 3x + 9$ doesn't factor further (discriminant: $9 - 36 = -27 < 0$)
Answer: $(x - 3)(x^2 + 3x + 9)$
📸 Ready to get unstuck? Try MathPad Free →
Common Factoring Mistakes
Mistake 1: Forgetting to Check for GCF First
Wrong: Factoring $6x^2 + 30x + 36$ directly as $(6x + 6)(x + 6)$ ❌
Right: Factor out GCF first: $$6x^2 + 30x + 36 = 6(x^2 + 5x + 6) = 6(x + 2)(x + 3)$$ ✓
Always check for GCF before trying other methods!
Mistake 2: Sign Errors in Trinomials
Problem: Factor $x^2 - 5x + 6$
Wrong: $(x + 2)(x + 3)$ ❌ (This gives $x^2 + 5x + 6$)
Right: Need two numbers that multiply to +6 and add to -5:
- Both must be negative: $(-2) \times (-3) = 6$ and $(-2) + (-3) = -5$ ✓
- Answer: $(x - 2)(x - 3)$ ✓
Sign rules for $x^2 + bx + c$:
- If $c > 0$: both factors have the same sign (same as $b$)
- If $c < 0$: factors have opposite signs (larger one matches sign of $b$)
Mistake 3: Not Factoring Completely
Wrong: $x^4 - 16 = (x^2 + 4)(x^2 - 4)$ and stopping ❌
Right: $x^2 - 4$ factors further! $$x^4 - 16 = (x^2 + 4)(x^2 - 4) = (x^2 + 4)(x + 2)(x - 2)$$ ✓
Always check if factors can be factored further.
Mistake 4: Trying to Factor Sum of Squares
Wrong: Attempting to factor $x^2 + 9$ as $(x + 3)(x + 3)$ ❌
Right: $x^2 + 9$ is prime over the real numbers (doesn't factor) ✓
Remember:
- $a^2 - b^2$ factors ✓ (difference of squares)
- $a^2 + b^2$ does not factor over real numbers ❌
Mistake 5: Incorrect AC Method Splitting
Problem: Factor $2x^2 + 7x + 3$
Wrong: $ac = 6$, using 2 and 3 because $2 + 3 = 5 \neq 7$ ❌
Right: $ac = 6$, need numbers that add to 7: $6 + 1 = 7$ ✓ $$2x^2 + 7x + 3 = 2x^2 + 6x + 1x + 3 = 2x(x + 3) + 1(x + 3) = (x + 3)(2x + 1)$$
Checking Your Factorization
Method 1: Expand and Verify
The most reliable method: Multiply your factors and see if you get the original expression.
Example: Verify $(x + 3)(x + 4) = x^2 + 7x + 12$
Expand: $(x + 3)(x + 4) = x^2 + 4x + 3x + 12 = x^2 + 7x + 12$ ✓
If they match, your factorization is correct!
Method 2: Test with Specific Values
Quick check: Pick a value for $x$ and evaluate both the original and factored forms.
Example: For $x^2 + 7x + 12 = (x + 3)(x + 4)$, try $x = 1$:
- Original: $1^2 + 7(1) + 12 = 1 + 7 + 12 = 20$
- Factored: $(1 + 3)(1 + 4) = 4 \times 5 = 20$ ✓
Note: This doesn't prove correctness (coincidences can happen), but it's a good quick check.
Method 3: Use MathPad's CAS Verification
Input your factored form and let MathPad's Computer Algebra System verify it symbolically—catching errors before they cost you points.
Using MathPad for Factoring
Factoring requires pattern recognition and careful algebraic manipulation—plenty of room for mistakes. Here's how MathPad helps:
CAS-Verified Factorization
The problem with pure AI: Language models can make factoring errors because they're pattern-matching, not computing symbolically. They might:
- Miss the GCF
- Make sign errors in trinomial factoring
- Forget to factor completely
- Apply the AC method incorrectly
- Factor expressions that are already prime
MathPad's solution: Every factorization is verified by a Computer Algebra System (CAS):
- AI proposes the factoring strategy
- CAS verifies algebraically that the factorization is correct
- CAS checks that the factorization is complete (fully factored)
- You get mathematically verified, fully factored expressions
This means no confident-but-wrong answers. Every factorization is symbolically verified. Learn more about our accuracy approach →
How MathPad Accelerates Learning
- SnapSolve for textbook problems: Math-specific OCR reads polynomial expressions instantly
- Step-by-step solutions: See which pattern to use and why, with each step explained
- Step Checker for homework: Input your factorization and verify it's correct before submitting
- AI Tutor for understanding: Ask "Why doesn't this factor further?" or "How do I know when to use grouping?"
- Practice problem generator: Get unlimited factoring problems organized by type
Try factoring polynomials in MathPad →
Practice Problems
Test your factoring skills with these problems organized by difficulty:
GCF Only:
- $15x^3 + 10x^2 - 5x$
- $8x^2y^2 - 12xy^3 + 4xy$
Special Patterns: 3. $x^2 - 49$ (difference of squares) 4. $x^2 + 14x + 49$ (perfect square trinomial) 5. $8x^3 + 27$ (sum of cubes)
Simple Trinomials (a = 1): 6. $x^2 + 9x + 20$ 7. $x^2 - 3x - 18$ 8. $x^2 + x - 12$
Complex Trinomials (a ≠ 1): 9. $3x^2 + 10x + 8$ 10. $4x^2 - 12x + 9$
Grouping: 11. $x^3 + 2x^2 + 3x + 6$ 12. $xy + 3x + 2y + 6$
Challenge: 13. $x^4 - 81$ (difference of squares twice!) 14. $6x^2 - 11x - 10$ (requires AC method)
Want instant step-by-step solutions? Solve these in MathPad and see detailed explanations for each pattern.
Frequently Asked Questions
How do I know which factoring method to use?
Follow this decision tree:
- Always check for GCF first (factor it out)
- Count the terms:
- 2 terms → difference of squares or sum/difference of cubes
- 3 terms → trinomial factoring or perfect square
- 4+ terms → grouping
- For trinomials:
- If $a = 1$, use simple trinomial method (find two numbers)
- If $a \neq 1$, use AC method
- Always check if factors can be factored further
What if nothing works?
The expression might be prime (unfactorable over real numbers). Common prime expressions:
- $x^2 + 1$ (sum of squares)
- $x^2 + x + 1$ (discriminant negative)
- $x^2 - 3$ (would need irrational factors)
If you've tried all methods and nothing works, it's likely prime. You can verify using the discriminant: if $b^2 - 4ac < 0$ for a trinomial, it doesn't factor over real numbers.
Do I always need to factor out the GCF?
Yes, when there is one! Factoring out the GCF:
- Simplifies the remaining expression
- Makes other patterns easier to spot
- Gives you the fully factored form (which is what instructors expect)
Failing to factor out the GCF is one of the most common mistakes.
What's the difference between factoring and expanding?
- Expanding: Multiply out to remove parentheses: $(x + 2)(x + 3) = x^2 + 5x + 6$
- Factoring: Reverse process: $x^2 + 5x + 6 = (x + 2)(x + 3)$
They're inverse operations, like multiplication and division.
How do I factor trinomials when a ≠ 1?
Use the AC method:
- Multiply $a \times c$ to get $ac$
- Find two numbers that multiply to $ac$ and add to $b$
- Split the middle term using those two numbers
- Factor by grouping
This systematic approach works every time, even when trial-and-error fails.
Can all polynomials be factored?
Over the complex numbers, yes (Fundamental Theorem of Algebra). But over real numbers, some polynomials are prime (unfactorable). Example: $x^2 + 1$ doesn't factor over reals, but equals $(x + i)(x - i)$ over complex numbers.
In algebra courses, "factor" usually means "factor over real numbers with integer coefficients."
Why does factoring help solve equations?
The Zero Product Property: If $ab = 0$, then $a = 0$ or $b = 0$.
Example: Solve $x^2 + 5x + 6 = 0$
- Factor: $(x + 2)(x + 3) = 0$
- Apply property: $x + 2 = 0$ or $x + 3 = 0$
- Solutions: $x = -2$ or $x = -3$
Factoring transforms a hard problem (solving a quadratic) into easy problems (solving linear equations).
What's the difference between sum of squares and difference of squares?
- Difference of squares ($a^2 - b^2$): Factors as $(a+b)(a-b)$ ✓
- Sum of squares ($a^2 + b^2$): Does not factor over real numbers ❌
This is a crucial distinction. Many students waste time trying to factor $x^2 + 9$—it's prime!
How do I check if my factorization is correct?
Expand your answer (multiply it out). If you get back the original expression, your factorization is correct.
Example: Check if $x^2 + 7x + 12 = (x + 3)(x + 4)$
Expand: $(x + 3)(x + 4) = x^2 + 4x + 3x + 12 = x^2 + 7x + 12$ ✓ Correct!
This verification method never fails.
✨ Start solving smarter Try Free →
Related Topics
Want to strengthen your algebra skills? Check out these related guides:
- Quadratic Formula Calculator - Solve equations using the quadratic formula
- Algebra Calculator with Steps - Master fundamental algebra concepts
- Khan Academy: Factoring - Free video lessons on factoring
- See all MathPad features - AI Tutor, Step Checker, and practice generators
Conclusion
Factoring is a cornerstone algebra skill that opens doors to solving equations, simplifying expressions, and understanding polynomials deeply. The key is pattern recognition:
✓ Always check for GCF first ✓ Recognize special patterns (difference of squares, perfect squares, cubes) ✓ Master trinomial factoring (both $a = 1$ and $a \neq 1$ cases) ✓ Always verify by expanding your answer
With practice, you'll start recognizing patterns automatically. What once took minutes will take seconds.
If you want to accelerate your learning with instant feedback and CAS-verified step-by-step solutions for every factorization, try MathPad's free version and experience AI-powered algebra tutoring.
Have questions about factoring? Contact our team or start solving problems at mathpad.ai/app.