Perfect Square Trinomial Calculator
Check whether a trinomial is a perfect square. The calculator tests the first term, last term, and middle term, then factors the expression as a binomial squared when the pattern matches.
What is a perfect square trinomial?
A perfect square trinomial is a trinomial that comes from squaring a binomial. That means it has the shape a² + 2ab + b² or a² - 2ab + b². When it fits the pattern, it factors into one binomial squared, such as (x + 5)² or (3x - 2)².
OpenStax teaches this pattern in its factoring special products section, together with the difference of squares. Recognizing the pattern can save several steps compared with trial-and-error factoring.
Perfect square trinomial formulas
The first and last terms must be squares. The middle term must be exactly twice the product of the two square roots. If the middle term is too large, too small, or has the wrong sign, the trinomial is not a perfect square.
Worked example: factor 9x² + 12x + 4
The square roots give the two pieces of the binomial. The sign of the middle term tells you whether the binomial uses plus or minus.
Perfect square trinomial vs ordinary trinomial
Every perfect square trinomial is factorable, but not every factorable trinomial is a perfect square. For example, x² + 5x + 6 factors as (x + 2)(x + 3), but it is not a perfect square because the two binomial factors are different. A perfect square trinomial has matching binomial factors.
Common perfect square examples
| Trinomial | Factored form | Middle check |
|---|---|---|
| x² + 10x + 25 | (x + 5)² | 2·x·5 = 10x |
| 4x² - 12x + 9 | (2x - 3)² | 2·2x·3 = 12x |
| 25x² + 20x + 4 | (5x + 2)² | 2·5x·2 = 20x |
Common questions
-
Check three things. The first term must be a perfect square, the last term must be a perfect square, and the middle term must equal plus or minus twice the product of the two square roots. For example, x² + 14x + 49 works because x² is x squared, 49 is 7 squared, and 2·x·7 = 14x.
-
Find the square root of the first term and the square root of the last term. Put those two pieces inside one binomial. Use a plus sign if the middle term is positive and a minus sign if the middle term is negative. Then square the binomial. For example, 4x² - 20x + 25 becomes (2x - 5)².
-
A normal factorable trinomial can have two different binomial factors, such as (x + 2)(x + 3). A perfect square trinomial has the same binomial factor twice, such as (x + 5)(x + 5), which is written as (x + 5)². The middle-term test is what confirms whether the repeated-factor pattern is present.
-
Yes. A negative middle term gives the pattern a² - 2ab + b² = (a - b)². The first and last terms are still positive squares, but the binomial uses a minus sign. For example, x² - 8x + 16 factors as (x - 4)².
-
When a real expression is squared, the square is nonnegative. In a basic perfect square trinomial, the last term comes from b², so it should be positive or zero. If the last term is negative, the expression may still factor by another method, but it will not be a real perfect square trinomial in the usual algebra pattern.
-
Then the trinomial is not a perfect square trinomial. For example, x² + 8x + 9 has square first and last terms, but 2·x·3 = 6x, not 8x. It may factor another way or not factor nicely, but it does not fit the binomial-square shortcut.
-
Yes. Completing the square is based on creating a perfect square trinomial. You take half of the x coefficient, square it, and add that value to form a trinomial that factors as a binomial squared. This is why recognizing perfect square trinomials is useful beyond ordinary factoring.
-
Expand the squared binomial. For example, (3x - 2)² means (3x - 2)(3x - 2). Multiplying gives 9x² - 12x + 4. If the expanded form matches the original trinomial, the factorization is correct.