How to Calculate Difference of Two Squares
Factor expressions in the form a² - b².
The Formula
a² - b² = (a+b)(a-b)The difference of two squares formula uses the mathematical relationship: a² - b² = (a+b)(a-b). Each variable in the formula represents a measurable quantity that affects the final result.
What Each Variable Means
Every value in the difference of two squares formula, what it measures, and the value used in the worked example on this page:
| Variable | Type | Example value |
|---|---|---|
| a (first value) | Input (you provide) | 7 |
| b (second value) | Input (you provide) | 3 |
| a² | Result (calculated) | — |
| b² | Result (calculated) | — |
| a² - b² | Result (calculated) | — |
| Factor 1: (a+b) | Result (calculated) | — |
| Factor 2: (a-b) | Result (calculated) | — |
| Product check: (a+b)(a-b) | Result (calculated) | — |
Step-by-Step Method
- 1Write down the values you know: a (first value), b (second value).
- 2Substitute your known values into the formula: a² - b² = (a+b)(a-b).
- 3Work through the arithmetic in the standard order of operations — parentheses first, then exponents, then multiplication and division, then addition and subtraction.
- 4Check that your result carries the correct unit and falls in a reasonable range for the problem.
- 5Verify your answer with the interactive Difference of Two Squares — it solves the same formula instantly.
Worked Example
Take a concrete case: a (first value) = 4, with the other inputs at the typical values from the variables table above. Substituting into the formula gives a² = 16.0000, b² = 9.0000, a² - b² = 7.0000, factor 1: (a+b) = 7.0000, factor 2: (a-b) = 1.0000, product check: (a+b)(a-b) = 7.0000. These numbers are solved by the same engine that powers the Difference of Two Squares calculator, so you can reproduce them exactly by entering the same inputs there.
| 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 |
How each result changes as a (first value) changes, holding the other inputs constant.
Practice Problems
1. 7² - 3²: a (first value) 7, b (second value) 3 — work it out, then check the answer.
Answer: With a (first value) 7, b (second value) 3, the results are a² 49.0000, b² 9.0000, a² - b² 40.0000, Factor 1: (a+b) 10.0000, Factor 2: (a-b) 4.0000, and 1 more more results.
2. Plug in a (first value) 6.25, b (second value) 2. What is the answer?
Answer: Entering a (first value) 6.25, b (second value) 2 gives a² 39.0625, b² 4.0000, a² - b² 35.0625, Factor 1: (a+b) 8.2500, Factor 2: (a-b) 4.2500, and 1 more more results.
Frequently Asked Questions
What is the formula for difference of two squares?
The formula is: a² - b² = (a+b)(a-b). Factor expressions in the form a² - b².
What values do I need to calculate difference of two squares?
You need a (first value), b (second value). The calculator produces a², b², a² - b², factor 1: (a+b), factor 2: (a-b), product check: (a+b)(a-b) from those inputs.
What is the difference of two squares when a (first value) is 4?
With a (first value) = 4, the result is a² = 16.0000, b² = 9.0000, a² - b² = 7.0000, factor 1: (a+b) = 7.0000, factor 2: (a-b) = 1.0000, product check: (a+b)(a-b) = 7.0000. This is worked through in full in the example on this page.
Related Topics
Use the Interactive Calculator
Skip the manual math — get instant results with our free Difference of Two Squares calculator.
