Difference of Two Squares Calculator

QuickCalculators factors expressions of the form a squared minus b squared into (a plus b)(a minus b) and shows the pattern match before the factors appear. Enter a difference of squares, confirm both terms are perfect squares with a minus between them, and read the binomial pair with a FOIL check that expands back to the original.

01 calculator

Result

    Worked solution

    QuickCalculators factors expressions of the form a squared minus b squared into (a plus b)(a minus b) and shows the pattern match before the factors appear. Enter a difference of squares, confirm both terms are perfect squares with a minus between them, and read the binomial pair with a FOIL check that expands back to the original.

    Factor a difference of two squares

    Concept diagram: Inputs leads to Factor a difference of two squares leads to ResultInputsFactor a difference oftwo squaresResult
    Factor a difference of two squares.

    A difference of two squares is a perfect square minus another perfect square. The factoring formula rewrites that difference as a product of a sum and a difference of the same roots. Classroom algebra uses the pattern for middle-term-free quadratics and numeric cases such as 49 minus 9. The calculator returns the factor pair when the pattern fits.

    If the expression is a sum of squares, or if either piece is not a perfect square over the chosen number system, the special formula does not apply. QuickCalculators states when the input is not a difference of squares instead of forcing unrelated factorizations.

    Recognize the pattern

    Concept diagram: Inputs leads to pattern leads to ResultInputspatternResult
    Recognize the pattern.

    Recognition comes before formula recall. Look for exactly two terms, a minus sign between them, and perfect-square structure on both sides. Variable examples look like x squared minus 9 or 4y squared minus 25. Numeric examples look like 81 minus 16. Spotting the squares first prevents treating every binomial as if it shared this identity.

    The squares can hide coefficients: 4x squared is (2x) squared. Constant squares are integers such as 9, 16, or 25. When both sides qualify and the operation is subtraction, the pattern is ready for the factoring formula on this page.

    Apply the factoring formula

    Formula result = f(inputs), with variables: in is inputs, f is formula, out is resultresult = f(inputs)ininputsfformulaoutresult
    Apply the factoring formula.

    The identity says a squared minus b squared equals (a plus b)(a minus b). Identify a as the square root of the first term and b as the square root of the second, then write the sum and difference factors. QuickCalculators prints those roots beside the factors so the substitution is checkable against the original squares.

    Signs matter: the original expression must be a difference. Swapping to a sum of squares leaves the real-number factoring pattern unused. The order (a plus b)(a minus b) multiplies back to a squared minus b squared with the middle terms canceling.

    Verify the factors by FOIL

    Concept diagram: Inputs leads to Verify factors by FOIL leads to ResultInputsVerify factors by FOILResult
    Verify the factors by FOIL.

    Verification multiplies the proposed factors with FOIL or distribution and checks that Outer and Inner cancel while First and Last restore the squares. That check catches sign errors and root mistakes before answers are submitted. The calculator runs the expansion automatically so the factors and the original expression stay linked on one screen.

    For (x plus 3)(x minus 3) the products are x squared, negative 3x, 3x, and negative 9. The linear terms cancel, leaving x squared minus 9. Matching that result confirms the factoring step.

    Factor x squared minus 9

    Concept diagram: Inputs leads to Factor x squared minus 9 leads to ResultInputsFactor x squared minus9Result
    Factor x squared minus 9.

    The engine-aligned example factors x squared minus 9 into (x plus 3)(x minus 3). Read 9 as 3 squared, apply the sum-and-difference formula, then FOIL to verify. The same steps apply whenever both terms are perfect squares separated by minus.

    1. Recognize x squared and 9 as perfect squares with a minus between them.
    2. Take square roots: a equals x, b equals 3.
    3. Write (x plus 3)(x minus 3).
    4. FOIL to confirm: x squared minus 9 after the middle terms cancel.

    QuickCalculators presents that factor pair as the primary result for this classic case.

    Avoid this common mistake

    Concept diagram: Inputs leads to Avoid this common mistake leads to ResultInputsAvoid this commonmistakeResult
    Avoid this common mistake.

    The misconception named "x squared minus 9 equals (x minus 3) squared" collapses a difference of squares into a single squared binomial. Expanding (x minus 3) squared produces x squared minus 6x plus 9, which still has a middle term and a plus constant.

    The correct factors are (x plus 3)(x minus 3), which cancel the middle terms. Always FOIL to catch that mix-up.

    Frequently asked questions

    What is a difference of two squares?

    A difference of two squares is an expression with two perfect-square terms separated by subtraction. It factors as (a plus b)(a minus b) when the first square is a squared and the second is b squared. QuickCalculators detects that pattern and returns the factor pair.

    How do you factor x squared minus 9?

    Factoring x squared minus 9 uses a equals x and b equals 3, so the factors are (x plus 3)(x minus 3). FOIL expands those factors back to x squared minus 9 after the linear terms cancel. Enter the same expression here to see that check.

    What is the difference of squares formula?

    The difference of squares formula states that a squared minus b squared equals (a plus b)(a minus b). Identify the square roots of both terms, then write the sum and difference factors. The identity fails for a sum of squares over the real numbers in the same simple way.

    How do you verify the factors?

    Verifying the factors means expanding them with FOIL or distribution and matching the original expression. Outer and Inner should cancel for a pure difference of squares. The calculator performs that expansion beside the factored form.

    Can a sum of squares factor the same way?

    A sum of squares does not factor over the reals with the same (a plus b)(a minus b) pattern. That pattern requires subtraction between the squares. Complex factorizations exist in other courses, but this page targets the real difference identity.

    What if a term is not a perfect square?

    If a term is not a perfect square, the classic two-square pattern does not apply in integer-coefficient form. Other factoring methods may still help, such as factoring out a greatest common factor first. The tool reports when the difference-of-squares pattern is absent.

    Summary

    QuickCalculators factors a squared minus b squared into (a plus b)(a minus b) after confirming both terms are perfect squares with a minus between them. The worked case x squared minus 9 becomes (x plus 3)(x minus 3), and FOIL verifies the middle terms cancel.

    Recognition of the pattern comes before formula use, and expanding the factors catches the false rewrite into a single squared binomial.