Math
Perfect Square Trinomial Calculator
A perfect square trinomial is the expansion of a squared binomial: (px + q)^2 = p^2 x^2 + 2pq x + q^2.
Type a trinomial and the calculator tests b^2 = 4ac, takes the square roots of a and c, matches the sign of b, and writes the factored form. Switch modes to find the constant, middle, or leading term that turns an incomplete trinomial into a perfect square.
Any quadratic ax^2 + bx + c. Fractions and decimals are fine.
Try an example
Result
Result
—
- Factored form
- —
- b² = 4ac test
- —
- p = √a
- —
- q (sign from b)
- —
- Completed trinomial / note
- —
- Expansion check
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the perfect square trinomial calculator solves
Squaring a binomial always produces the same shape: the square of the first term, twice the product of the two terms, and the square of the last term. Recognising that shape lets you factor instantly and is the idea behind completing the square.
Three checks to do by hand
- Is the first term a perfect square? 4x^2 = (2x)^2, yes.
- Is the last term a perfect square? 9 = 3^2, yes.
- Is the middle term twice the product of those roots? 2 × 2x × 3 = 12x, and the sign of b picks the sign inside: 4x^2 - 12x + 9 = (2x - 3)^2.
| Trinomial | Perfect square? | Factored |
|---|---|---|
| x^2 + 6x + 9 | yes | (x + 3)^2 |
| 4x^2 - 12x + 9 | yes | (2x - 3)^2 |
| x^2 + 5x + 9 | no (25 ≠ 36) | — |
| x^2 + 6x + 8 | no (36 ≠ 32) | (x + 2)(x + 4) |
How to use it
- Choose Check to test and factor a typed trinomial, or a Find mode to compute the missing The number multiplying a variable, like the 3 in 3x..
- Enter the trinomial (or the two known coefficients).
- Read the result and the b^2 = 4ac test, then the expansion check in the steps.
How to read the answer
If b^2 = 4ac, the trinomial is (px + q)^2 with p = √a and q = ±√c, the sign matching b. Its The b² − 4ac part of the quadratic formula; its sign tells you how many real solutions exist. is 0, so it has one double root at x = -q/p. If the test fails, the trinomial is not a square; the calculator tells you which constant would fix it. In the Find modes the answer is the exact coefficient that makes the test true (b has two options, ±).
Common mistakes and edge cases
- Forgetting the middle term: (x + 3)^2 is x^2 + 6x + 9, not x^2 + 9.
- Ignoring the sign of b: x^2 - 6x + 9 = (x - 3)^2, and x^2 + 6x + 9 = (x + 3)^2.
- Accepting a trinomial with a negative constant: c = q^2 can never be negative, so x^2 + 6x - 9 is not a square.
- Checking only that a and c are squares. x^2 + 5x + 9 has square ends but fails b^2 = 4ac.
Worked examples
Perfect square with leading coefficient
4x^2 - 12x + 9 = (2x - 3)^2
Result
(2x - 3)^2
Monic perfect square
x^2 + 6x + 9 = (x + 3)^2
Result
(x + 3)^2
Not a perfect square
x^2 + 5x + 9 fails the test
Result
Not a perfect square trinomial
Fraction coefficients
x^2 + x + 1/4 = (x + 1/2)^2
Result
(x + 1/2)^2
Find the missing constant
a = 4, b = -12 → c = 9
Result
9
Find the middle term
a = 1, c = 25 → b = ±10
Result
b = ±10
Find the leading coefficient
b = 12, c = 9 → a = 4
Result
4
Wrong degree
x^3 + 1 is not a trinomial in x^2
Result
Error
Frequently asked questions
How do I know if a trinomial is a perfect square?+
Check that a and c are perfect squares and that b^2 = 4ac. Equivalently, the middle term must be twice the product of the square roots of the first and last terms.
What is the factored form?+
(√a·x ± √c)^2, with the sign matching the sign of b. For 4x^2 - 12x + 9 that is (2x - 3)^2.
What constant completes the square for x^2 + bx?+
(b/2)^2. For x^2 + 10x add 25 to get (x + 5)^2. For ax^2 + bx in general, c = b^2/(4a).
Can the constant term be negative?+
No. The constant is q^2, a square, so it is never negative. A trinomial with a negative constant is never a perfect square (unless you factor out -1 from an all-negative trinomial).
Why does a perfect square trinomial have only one root?+
Because b^2 - 4ac = 0, the quadratic formula gives a single (double) root, x = -q/p, where the parabola just touches the x-axis.
Does the calculator handle fractions?+
Yes. Coefficients such as 1/4 or 0.25 are exact, and roots like √(1/4) = 1/2 are found exactly.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
References
- OpenStax, Elementary Algebra 2e, Section 7.4 “Factor Special Products” — Recognising and factoring perfect square trinomials.
- OpenStax, Intermediate Algebra 2e, Section 9.2 “Solve Quadratic Equations by Completing the Square”
Related calculators
Completing the Square Calculator
Complete the square on ax^2 + bx + c step by step: every algebraic line shown, exact fractions, vertex form a(x - h)^2 + k, the vertex, and the roots as simplified radicals.
Factoring Trinomials Calculator
Factor ax^2 + bx + c over the integers with the ac-method: the full factor-pair search table, splitting the middle term, grouping, and the roots when it does not factor.
Multiply Binomials Calculator
Multiply binomials with FOIL or expand any product of polynomials. Type (2x + 3)(x - 4) and see the First, Outer, Inner, Last products, like terms combined, and the expanded polynomial.
Discriminant Calculator
Find the discriminant b^2 - 4ac of a quadratic, classify the roots as rational, irrational, repeated, or complex, and preview the exact roots with steps.
Vertex Form Calculator
Convert a quadratic between standard form ax^2 + bx + c and vertex form a(x - h)^2 + k in either direction, with the vertex, axis of symmetry, direction, intercepts, and steps.
Complex Number Calculator
Add, subtract, multiply, divide, and raise complex numbers to powers exactly. Shows the modulus, argument in degrees and radians (with exact π fractions), conjugate, polar and exponential forms, De Moivre's theorem, and the point on the complex plane.
Last updated: September 4, 2026