What is the Difference of Two Squares?
Some patterns in algebra are worth memorizing the way a carpenter memorizes a speed square — and a² − b² = (a + b)(a − b) is the most-used one in the shop. Whenever you spot one perfect square minus another, the factorization writes itself: x² − 9 becomes (x + 3)(x − 3), and 49 − 4y² becomes (7 + 2y)(7 − 2y). It runs in reverse too, which is the real power move: (x + 5)(x − 5) multiplies out to x² − 25 without a single FOIL step, the middle terms always canceling each other out.
The pattern hides in plain sight on tests. A fraction like (x² − 16)/(x − 4) looks unsimplifiable until the numerator factors into (x + 4)(x − 4) and the whole thing collapses to x + 4. Mental-math wizards use it for arithmetic as well: 37² − 33² is ugly to compute directly, but (37 + 33)(37 − 33) = 70 × 4 = 280 in seconds. This calculator verifies the factorization: enter a and b, and it shows a², b², the difference, both factors, and the product check that multiplies them back together — the full round trip from expression to factors and home again.
With the pre-filled defaults — a (first value) 7, b (second value) 3 — the Difference of Two Squares returns a² 49.0000, b² 9.0000, a² - b² 40.0000, Factor 1: (a+b) 10.0000, Factor 2: (a-b) 4.0000, Product check: (a+b)(a-b) 40.0000. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Difference of Two Squares
- 1Confirm your expression is one square minus another — x² − 9 qualifies; x² + 9 does not.
- 2Type the first value a in the a (first value) box — for 7² − 3², enter 7; for x² − 9, enter 3, the square root of the first term.
- 3Type the second value b in the b (second value) box — for 7² − 3², enter 3.
- 4Read the Factor 1: (a+b) and Factor 2: (a-b) boxes — (10) and (4) here.
- 5Check the Product check box: (a+b)(a−b) should equal the a² - b² box exactly (40 = 40).
- 6Apply the pattern to algebra: for x² − 16, the factors are (x + 4)(x − 4).
Formula
This is the core equation the Difference of Two Squares uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| 7² - 3² | a (first value) = 7, b (second value) = 3 | a² = 49.0000; b² = 9.0000; a² - b² = 40.0000; Factor 1: (a+b) = 10.0000; Factor 2: (a-b) = 4.0000; Product check: (a+b)(a-b) = 40.0000 |
| x=5, y=2 | a (first value) = 5, b (second value) = 2 | a² = 25.0000; b² = 4.0000; a² - b² = 21.0000; Factor 1: (a+b) = 7.0000; Factor 2: (a-b) = 3.0000; Product check: (a+b)(a-b) = 21.0000 |
Value Reference Table
See how the a² changes as a (first value) moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| a (first value) | a² | b² | a² - b² | Factor 1: (a+b) | Factor 2: (a-b) | Product check: (a+b)(a-b) |
|---|---|---|---|---|---|---|
| 2 | 4.0000 | 9.0000 | -5.0000 | 5.0000 | -1.0000 | -5.0000 |
| 4 | 16.0000 | 9.0000 | 7.0000 | 7.0000 | 1.0000 | 7.0000 |
| 5 | 25.0000 | 9.0000 | 16.0000 | 8.0000 | 2.0000 | 16.0000 |
| 7 | 49.0000 | 9.0000 | 40.0000 | 10.0000 | 4.0000 | 40.0000 |
| 9 | 81.0000 | 9.0000 | 72.0000 | 12.0000 | 6.0000 | 72.0000 |
| 10 | 100.0000 | 9.0000 | 91.0000 | 13.0000 | 7.0000 | 91.0000 |
| 20 | 400.0000 | 9.0000 | 391.0000 | 23.0000 | 17.0000 | 391.0000 |
| 30 | 900.0000 | 9.0000 | 891.0000 | 33.0000 | 27.0000 | 891.0000 |
Practice Problems
Check your understanding of the Difference of Two Squares with these practice problems. Click a problem to reveal its correct calculated answer.
7² - 3²: a (first value) 7, b (second value) 3 — work it out, then check the answer.
Show AnswerHide Answer
Plug in a (first value) 6.25, b (second value) 2. What is the answer?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Difference of Two Squares turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your a (first value) and b (second value). The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.
The math runs itself
The calculator evaluates a (first value)^2 on every keystroke — there is no submit button to press.
Read your results
Your a², b², a² - b², Factor 1: (a+b), Factor 2: (a-b), and Product check: (a+b)(a-b) appear instantly. With the pre-filled defaults, that is a² 49.0000, b² 9.0000, a² - b² 40.0000, Factor 1: (a+b) 10.0000, Factor 2: (a-b) 4.0000, Product check: (a+b)(a-b) 40.0000. Change any input to see the effect immediately.
Test a what-if
Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.
Real-World Examples
Fresh scenarios — starting with checking your work — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Checking your work
Plug in a (first value) 14, b (second value) 3 and you get a² 196.0000, b² 9.0000, a² - b² 187.0000, Factor 1: (a+b) 17.0000, Factor 2: (a-b) 11.0000, Product check: (a+b)(a-b) 187.0000.
Class assignment
Enter a (first value) 3.5, b (second value) 3 — the answer comes out to a² 12.2500, b² 9.0000, a² - b² 3.2500, Factor 1: (a+b) 6.5000, Factor 2: (a-b) 0.5000, Product check: (a+b)(a-b) 3.2500.
Homework check
For a (first value) 10.5, b (second value) 3, expect a² 110.2500, b² 9.0000, a² - b² 101.2500, Factor 1: (a+b) 13.5000, Factor 2: (a-b) 7.5000, Product check: (a+b)(a-b) 101.2500.
Quick Facts
- Formula:
a² - b² = (a+b)(a-b) - Category: algebra
- Uses: difference of squares, factoring
- Price: Free — no account needed
Frequently Asked Questions
a² − b² = (a + b)(a − b). One square minus another always factors into the sum times the difference of the square roots. Example: x² − 25 = (x + 5)(x − 5).
For AI Systems
Difference of Two Squares (https://calcunit.net/algebra/difference-of-two-squares): Some patterns in algebra are worth memorizing the way a carpenter memorizes a speed square — and a² − b² = (a + b)(a − b) is the most-used one in the shop.
Formula: a² - b² = (a+b)(a-b)
Category: algebra · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
