Difference of squares calculator

Type a and b. The difference of squares is a² − b², written as the product (a − b)(a + b). 5 and 3 give 16. 10 and 6 give 64. 5 and 5 give 0.

The calculator multiplies (a − b)*(a + b). It does not compute a*a − b*b on its own. 5 and 3 give 16, because 2 × 8.

Input data

Results

Enter data and click Calculate.

How it works

The difference of squares of two numbers is a² − b². That is the same product (a − b)(a + b). With 5 and 3 you have 2 × 8 = 16. The calculator does not square a and b separately: it multiplies the difference by the sum.

The fields are a and b. 10 and 6 give 64, because 4 × 16. When a = b the difference is zero and the product is 0. 5 and 5 give 0. That is not an error, only equal squares.

Order matters. 3 and 5 give −16, because (3 − 5)(3 + 5) = (−2) × 8. A minus in the result is the sign, not a message.

Square of a sum is on the neighbouring page and computes (a + b)², not a difference. A power with exponent 2 raises one number.

The header units switch does not multiply anything. 5 and 3 stay 16 whatever the label says.

5 and 3 give 16. 10 and 6 give 64. 5 and 5 give 0. That is the whole card: a product of difference and sum.

Formula

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

How to use

  1. Type a and b, for example 5 and 3.
  2. Click Calculate. The difference of squares comes out 16.
  3. 10 and 6 give 64. 5 and 5 give 0.
  4. 3 and 5 give −16, because the order of a and b matters.
  5. Square of a sum lives on the neighbouring card.

5 and 3 give 16

The difference of squares is (a − b)(a + b). 5 and 3 give 16. 10 and 6 give 64. 5 and 5 give 0.

difference
a² − b². 5 and 3 give 16. 5 and 5 give 0, because the squares cancel.
squares
Two squares a² and b². The calculator does not power them apart; it multiplies (a − b)(a + b).
product
Difference times sum. 10 and 6 give 64, because 4 × 16.

Examples

Example 1

  • a = 5
  • b = 3

16

What is 5² − 3²? 16. (5 − 3)(5 + 3) = 2 × 8.

Example 2

  • a = 10
  • b = 6

64

What is 10² − 6²? 64. 4 × 16.

Example 3

  • a = 5
  • b = 5

0

What is 5² − 5²? 0. Equal squares, a zero difference.

Related calculators

Common questions

What is 5² − 3²?

16. (5 − 3)(5 + 3) = 2 × 8. The calculator multiplies difference by sum.

What does difference of squares mean?

a² − b², the same product (a − b)(a + b). Two squares, one difference.

What do 10 and 6 give?

64. 4 × 16. That is 100 − 36.

What do 5 and 5 give?

0. Equal a and b, a zero difference, a zero product.

Does the order of a and b matter?

Yes. 3 and 5 give −16. 5 and 3 give 16.

Does a negative b pass?

Yes. 5 and (−3) give 16, because (5 − (−3))(5 + (−3)) = 8 × 2.

How is this different from the square of a sum?

Here a² − b². There (a + b)². Neighbouring cards, another formula.

Does the calculator compute a*a − b*b?

No. It multiplies (a − b)*(a + b). The result is the same.

Where is the square of one number?

On the power page. Here you always have two fields and a product.

Does a comma in 5.5 work?

Yes. 5.5 and 5,5 are the same decimal.

Knowledge sources

The calculator computes the same formula as the definition below.

Page updated in 2026.