Perfect Square Trinomial Calculator

Check whether ax² + bx + c is a perfect square and see its binomial factor instantly.

Check a trinomial
Enter the three coefficients from ax² + bx + c.

About perfect square trinomials

A perfect square trinomial is a three-term polynomial produced when a binomial is multiplied by itself. The familiar identities (p + q)² = p² + 2pq + q² and (p - q)² = p² - 2pq + q² explain its structure. In ax² + bx + c, the first and last terms must be squares and the middle coefficient must equal either positive or negative twice the product of their square roots. Recognizing this pattern turns a quadratic expression into a compact factored form. This calculator tests the equivalent discriminant condition b² - 4ac = 0 while also requiring a positive leading coefficient and a nonnegative constant. A zero discriminant means the associated quadratic equation has one repeated real root. That is exactly what happens when a binomial factor occurs twice. Once the test succeeds, the calculator reports the factor as (sqrt(a)x + sqrt(c))² when b is positive or (sqrt(a)x - sqrt(c))² when b is negative. For example, x² + 6x + 9 has square end terms x² and 9. Their roots are x and 3, and twice their product is 6x, matching the middle term. Therefore the expression factors as (x + 3)². Likewise, 4x² - 12x + 9 uses 2x and 3 as the square roots of its end terms. Twice their product is 12x, and the negative middle term selects subtraction, giving (2x - 3)². The coefficient test also works when roots are not integers. An expression can still be a perfect square over the real numbers even if its factored form contains decimal or irrational coefficients. The displayed factor is rounded for readability, while the decision uses the coefficients directly with a small numerical tolerance. This avoids rejecting a mathematically valid result merely because browser arithmetic cannot represent every decimal exactly. Perfect square trinomials appear in completing the square, solving quadratic equations, graphing parabolas, simplifying rational expressions, and deriving geometric formulas. Factoring one reveals the parabola's vertex and repeated x-intercept immediately. Use the calculator to verify your pattern recognition, then compare the reported discriminant and factor with your own algebra. It is designed as a quick checking aid while preserving the two key ideas: square outer terms and a middle term equal to twice their product.

Perfect square trinomial examples

Compare coefficients and the resulting repeated binomial.

TrinomialResultWhy
x² + 6x + 9(x + 3)²The middle coefficient is 2 × 1 × 3.
4x² - 12x + 9(2x - 3)²The negative middle term selects subtraction.
9x² + 12x + 4(3x + 2)²The discriminant is zero.

How to check a perfect square trinomial

  1. Read the coefficients a, b, and c from the trinomial ax² + bx + c.
  2. Enter each coefficient, preserving the sign of the middle term.
  3. Select Check trinomial to test the perfect-square condition.
  4. Review the repeated binomial factor and discriminant.

Perfect square trinomial FAQ

What makes a trinomial a perfect square?

Its first and last terms are squares, and its middle term is twice their product with either sign. Equivalently, its quadratic discriminant is zero.

Can the middle coefficient be negative?

Yes. A negative middle coefficient corresponds to a squared difference such as (x - 3)². The first and last terms remain nonnegative.

Why does a zero discriminant matter?

A zero discriminant gives one repeated real root. The quadratic therefore has the same linear factor twice, making it a perfect square.

Can coefficient a be something other than one?

Yes. For example, 4x² + 12x + 9 equals (2x + 3)². The leading coefficient only needs to be a positive square over the chosen number system.

Does this calculator factor every quadratic?

No. It specifically identifies quadratics that are squares of binomials. Other quadratics may factor into two different binomials or may not factor over the real numbers.