Beginner

Perfect Square Trinomial Calculator — (a ± b)²

Expand (a + b)² or (a − b)² instantly and see the three-term result a² ± 2ab + b² broken out step by step with the parabola graph of the resulting expression.

Sign

Expanded value
25

(3 + 2)² = 9 + 12 + 4

9
+ 2ab
12
+ b²
4
Step-by-step expansion
1

Apply the perfect square formula

(a + b)² = a² + 2ab + b²
2

a² = (3)²

= 9
3

2ab = 2 × 3 × 2

= 12 (add)
4

b² = (2)²

= 4
=

Sum all three terms

9 + 12 + 4 = 25
Step by step
  1. 1

    (3)² = 9
  2. 2

    + 2ab

    2 × 3 × 2 = 12
  3. 3

    + b²

    (2)² = 4
  4. 4

    Expanded value

    9 + 12 + 4 = 25
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Squaring the binomial (a ± b) gives the three terms a², ±2ab, and b² — a perfect square trinomial. Enter a and b and choose + or −; the calculator computes each term and the total, with step-by-step working showing the formula, substitution, and sum.

Formula
(a + b)² = a² + 2ab + b² • (a − b)² = a² − 2ab + b²
How this is calculated

A perfect square trinomial is produced by squaring a binomial. Expanding (a + b)(a + b) by FOIL gives a·a + a·b + b·a + b·b = a² + 2ab + b². The middle term 2ab is the key feature — it is twice the product of the two terms — and is what gets missed when students mistakenly write (a + b)² = a² + b² (the "freshman's dream" error).

For the difference form (a − b)², replacing b with −b gives a² − 2ab + b². The outer terms are always positive because any real number squared is non-negative; only the middle term changes sign.

Recognising perfect square trinomials is essential for factoring quadratics, completing the square, and solving equations: if a quadratic fits the pattern a² ± 2ab + b², it factors immediately as (a ± b)². The plotted curve y = (x + s·b)² shows the vertex form of the resulting parabola.

Frequently asked questions

Check three things: the first and last terms must be perfect squares, the middle term must equal ±2 × (√first) × (√last), and its sign must match the sign inside the binomial. If all three hold, the expression factors as (√first ± √last)².

Expanding (a + b)² by FOIL gives a² + ab + ab + b² = a² + 2ab + b². The cross-term 2ab is non-zero whenever a ≠ 0 and b ≠ 0. Omitting it is one of the most common algebra mistakes.

Yes — the formula holds for any real numbers. Squaring a negative value yields a positive result, so a² and b² are always non-negative. Fractional or irrational values work identically, though the intermediate terms may look less "clean".

Also known as

expand a plus b squared
expand a minus b squared
perfect square trinomial formula
square of a binomial calculator
a plus b whole square calculator
binomial squared expansion
foil method binomial squared
perfect square algebra calculator

APA

TG we-Calculate Editorial Team. (2026). Perfect Square Trinomial Calculator — (a ± b)² [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/perfect-square-trinomial-calculator

Chicago

TG we-Calculate Editorial Team. "Perfect Square Trinomial Calculator — (a ± b)²." TG we-Calculate. 2026. https://we-calculate.com/calculator/perfect-square-trinomial-calculator.

IEEE

TG we-Calculate Editorial Team, "Perfect Square Trinomial Calculator — (a ± b)²," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/perfect-square-trinomial-calculator

BibTeX

@misc{wecalculate_perfect_square_trinomial_calculator, title = {Perfect Square Trinomial Calculator — (a ± b)²}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/perfect-square-trinomial-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?