🧮
🧮 Math & statistics

Perfect Square Trinomial Calculator (check & factor a² ± 2ab + b²)

Results update as you type.

Your numbers

Understanding the perfect square trinomial calculator — concept and principle

This calculator checks whether a quadratic ax² + bx + c is a perfect square trinomial, factors it as a squared binomial when it is, and otherwise tells you which c or b would make it one. Use it for factoring practice, completing the square, and checking algebra homework.

Perfect square trinomial as an area(2x − 3)² = 4x² − 12x + 94x²6x6x92x3middle term2·2x·3 = 12xb² − 4ac144 − 144 = 0
A square of side 2x + 3 splits into 4x², two 6x strips and 9; with a minus sign the strips are subtracted.

How it is calculated

The principle

Squaring a binomial (px + q) gives p²x² + 2pqx + q². So the first and last terms must be squares, and the middle coefficient must be twice the product of their roots. That condition is the same as the discriminant b² − 4ac being 0, which also means the quadratic has one repeated root and its graph just touches the x-axis. Completing the square uses this idea: choose c = b²/(4a) so the expression becomes a perfect square.

Worked example

Default inputs: a = 4, b = −12, c = 9.

  1. √(4x²) = 2x and √9 = 3.
  2. Middle term needed: ±2 × 2x × 3 = ±12x. The actual middle term is −12x, which matches.
  3. Discriminant: (−12)² − 4 × 4 × 9 = 144 − 144 = 0.
  4. Because the middle term is negative, the result is (2x − 3)², so it is a perfect square trinomial: yes.
  5. Check: (2x − 3)² = 4x² − 12x + 9. The c that would make it a square is 144 ÷ 16 = 9, and b would be ±12.

How to read the result

"Yes" with a factored form gives the exact factorisation and the double root x = −b/(2a) (here x = 1.5). "No" means the trinomial is not a square; use the suggested c or b to see how far off it is. A negative discriminant means no real roots; a positive one means two different roots.

Common mistakes

Keep in mind: The tool expects numeric coefficients. Expressions with several variables, such as 9x² + 12xy + 4y², follow the same pattern but must be entered with care or checked by hand.

Frequently asked questions

Is x² + 6x + 9 a perfect square trinomial?

Yes. 6² − 4 × 1 × 9 = 0, and it factors as (x + 3)².

How is this related to completing the square?

Completing the square adds the constant b²/(4a) that turns ax² + bx into a perfect square trinomial.

What does a zero discriminant mean on a graph?

The parabola touches the x-axis at exactly one point, its vertex.

Sources: OpenStax, Elementary Algebra 2e (2020), §7.4 Factor Special Products

Checked 9 Nov 2026. OpenStax, Elementary Algebra 2e (2020), §7.4 Factor Special Products — “Factor Perfect Square Trinomials” (a² + 2ab + b² = (a + b)², a² − 2ab + b² = (a − b)²; first and last terms squares, middle term 2ab; check the GCF first).

🧮 All math & statistics tools →🌍 Calculators by country →