Difference of Two Squares Calculator

Difference of Two Squares Calculator | Factor a² − b²

Difference of Two Squares Calculator

Factor any a² − b² expression instantly with full step-by-step working.

Factor Difference of Two Squares

Examples: x²-9  |  4x²-25y²  |  36-49a⁴  |  16x²-81

Factored Form
StepWorking

Common Difference of Two Squares Examples

ExpressionabFactored Form
x² − 1x1(x + 1)(x − 1)
x² − 4x2(x + 2)(x − 2)
x² − 9x3(x + 3)(x − 3)
x² − 16x4(x + 4)(x − 4)
x² − 25x5(x + 5)(x − 5)
4x² − 92x3(2x + 3)(2x − 3)
9x² − 163x4(3x + 4)(3x − 4)
25x² − 495x7(5x + 7)(5x − 7)
x⁴ − 11(x² + 1)(x + 1)(x − 1)
16 − x²4x(4 + x)(4 − x)

What Is the Difference of Two Squares?

The difference of two squares is a fundamental concept in algebra that describes any expression written in the form a² − b², where both terms are perfect squares and a subtraction sign separates them. This pattern appears throughout mathematics, from basic algebra to calculus and beyond.

The core identity that makes factoring possible is:

a² − b² = (a + b)(a − b)

This identity works because when you expand (a + b)(a − b), the middle terms cancel out: you get a² − ab + ab − b², which simplifies to a² − b².

How to Identify Perfect Squares

A term is a perfect square if its coefficient is a perfect square number (1, 4, 9, 16, 25 …) and every variable it contains is raised to an even power. For example, 9x⁴ is a perfect square because 9 = 3² and x⁴ = (x²)².

When the Identity Does Not Apply

The difference of two squares identity requires subtraction between two perfect square terms. If the sign between the terms is addition (a sum of two squares), the expression cannot be factored over the real numbers. Similarly, if either term is not a perfect square, the identity does not apply directly.

How to Factor Using the Identity

Factoring the difference of two squares follows a clear three-step process that you can apply to any qualifying expression.

Step 1: Factor Out the GCF

Before applying the identity, always check whether both terms share a greatest common factor (GCF). Factoring out the GCF first simplifies the remaining expression. For example, in 4x² − 36, the GCF is 4, giving 4(x² − 9).

Step 2: Find the Square Roots

Once the expression is in the form a² − b², find the square root of each term. For x² − 9, we get a = x and b = 3.

Step 3: Write the Factored Form

Substitute a and b into (a + b)(a − b). For x² − 9, the factored form is (x + 3)(x − 3). Always verify by expanding to confirm you get the original expression.

Repeated Factoring

If either factor is still a difference of two squares, factor it again. For x⁴ − 1, after one step you get (x² + 1)(x² − 1). The second factor x² − 1 factors further to (x + 1)(x − 1), giving the complete factorisation (x² + 1)(x + 1)(x − 1).

Real World Uses of This Identity

Real world uses of this algebraic identity appear in many areas beyond a school mathematics class.

In mental arithmetic, the difference of two squares lets you compute products like 19 × 21 quickly. Notice that 19 = 20 − 1 and 21 = 20 + 1, so 19 × 21 = 20² − 1² = 400 − 1 = 399.

In engineering and physics, the identity appears when simplifying expressions involving resistance, velocity, or energy differences. In computer science and cryptography, the factoring of large numbers underpins several security algorithms, and the difference of two squares is a key tool in integer factorisation methods.

In geometry, the identity is used to calculate the area of a ring or annulus by computing the difference between the area of two circles, each expressed as a perfect square.

Frequently Asked Questions

The difference of two squares is an algebraic expression in the form a² − b², where both terms are perfect squares and a subtraction sign separates them. It factors into (a + b)(a − b) using a standard algebraic identity.

The formula is a² − b² = (a + b)(a − b). To use it, identify the square roots of each term, then write two binomial factors: one with addition and one with subtraction.

To factor the difference of two squares: first check that both terms are perfect squares and separated by subtraction. Then find the square root of each term (call them a and b). Finally write the factored form as (a + b)(a − b).

Yes. If either factor (a + b) or (a − b) is itself a difference of two squares, it can be factored again. This process continues until no factor can be reduced further. For example, x⁴ − 1 factors into (x² + 1)(x + 1)(x − 1).

No. The sum of two squares, written as a² + b², cannot be factored over the real numbers. Only the difference a² − b² has a real factored form.

GCF stands for greatest common factor. Before applying the difference of two squares identity, always factor out any GCF that both terms share. This simplifies the remaining expression and makes factoring easier. For example, 4x² − 36 has a GCF of 4, leaving 4(x² − 9) before final factoring.

You can use it to multiply two numbers that are equidistant from a round number. For example, 18 × 22 = (20 − 2)(20 + 2) = 20² − 2² = 400 − 4 = 396. This trick works for any pair of numbers of the form (n − k)(n + k).