Algebra 1 Intermediate

Difference of Squares

Recognize and factor expressions of the form a² − b² = (a+b)(a−b), with step-by-step identification, FOIL verification, and repeated factoring for higher-degree expressions.

Factor or expand — two modes
Step-by-step perfect-square checks
FOIL verification built in
Handles repeated factoring (e.g. 16x⁴−1)
Live
Input
Polynomial Expression
Enter a binomial like x^2 - 25, 4x^2 - 9, or 16x^4 - 1. Use ^ for exponents.
Examples
Enter values for a and b to expand (a+b)(a−b) = a²−b².
a =
b =
Both a and b can be numbers or simple expressions like 2x.
Examples
Result
Enter an expression above and press Calculate to see the factored form and step-by-step work.
Factored Form
Cannot Factor as Difference of Squares
Repeated Factoring Possible
a
b
Pattern
Step-by-Step Solution
The Difference of Squares Pattern
a² − b² = (a + b)(a − b)

A difference of squares is any expression of the form a² − b², where both terms are perfect squares and they are subtracted (differenced).

Three conditions must all be true:

  • • The expression has exactly 2 terms
  • Both terms are perfect squares (coefficients and degrees)
  • • The sign between them is subtraction (−)

Geometric interpretation: Imagine a large square of area a² with a smaller square b² cut from its corner. The remaining L-shaped region has area a² − b², which can be rearranged into a rectangle of dimensions (a+b) by (a−b).

a b a b = (a+b)(a−b)
To verify your factoring, always FOIL — the middle terms will cancel, leaving only the first and last terms: (a+b)(a−b) = a² − ab + ab − b² = a² − b².
Common Mistakes — Watch Out!

1. Sum of squares does NOT factor

a² + b² cannot be factored over the real numbers. There is no real factoring for x² + 25. Students often incorrectly write (x+5)² — that is x² + 10x + 25, not x² + 25.

  • a² + b² — prime over reals, no real factors
  • a² − b where b is not a perfect square — does NOT apply
  • (a − b)² — that is a perfect square trinomial, not this pattern
  • a³ − b³ — that is a difference of cubes, a different formula

2. The degree must be even

x³ − 25 does not fit the pattern because x³ is not a perfect square. Both terms need even exponents (0, 2, 4, …).

3. Don't forget to check for repeated factoring

After factoring 16x⁴ − 1 = (4x²+1)(4x²−1), notice that 4x²−1 is itself a difference of squares: (2x+1)(2x−1)!

Always check if any factor can be factored again — this calculator shows all layers automatically.

Factoring giving you trouble?

One-on-one Algebra 1 tutoring makes difference of squares, trinomials, and all factoring patterns click — we work through your exact problems and build pattern recognition that sticks for tests.

Book a Free Consultation →