Square of a Binomial Calculator

Square of a Binomial Calculator

Expand a binomial square such as (x + 3)^2, (2x - 5)^2, or (ax + b)^2 with coefficients, formula steps, and a simplified result.

Expand a binomial square in standard form

A square of a binomial calculator expands expressions in the form (ax + b)^2. It uses the identity (p + q)^2 = p^2 + 2pq + q^2, where p is the first term and q is the second term.

Calculate the square of a binomial by applying the formula (a + b)^2 = a^2 + 2ab + b^2 or (a - b)^2 = a^2 - 2ab + b^2. For example, (x + 3)^2 simplifies to x^2 + 6x + 9, and (y - 5)^2 simplifies to y^2 - 10y + 25.

Enter the coefficient of the variable term, the variable name, and the signed constant. The calculator returns the original binomial, the expanded trinomial, the middle term, and a step-by-step explanation.

This tool is useful for algebra homework, checking factoring work, simplifying equations, and recognizing perfect square trinomials.

The coefficient in ax.

Use x, y, t, n, or another short variable.

Use a negative value for subtraction.

Controls the emphasis in the result.

Solve (ax + b)^2 = y for the variable.

Quadratic view

The same expansion can be read as y = a^2x^2 + 2abx + b^2.

The result includes vertex, intercepts, range, and optional target solutions.

Positive binomial

(p + q)^2 = p^2 + 2pq + q^2

Negative binomial

(p - q)^2 = p^2 - 2pq + q^2

Perfect square

First square, twice product, last square

How to use the square of a binomial calculator

  1. Enter the first coefficient: For (2x - 5)^2, the first coefficient is 2.
  2. Enter the variable: Use a simple variable such as x, y, t, or n.
  3. Enter the constant: Use a positive number for addition and a negative number for subtraction.
  4. Calculate: The calculator expands the binomial into a perfect square trinomial.
  5. Review the steps: Check the first square, middle term, last square, and final simplified expression.

Square of a binomial formula

Squaring a binomial means multiplying the binomial by itself. The middle term is not optional: it comes from multiplying the two outer and inner products.

(p + q)^2 = p^2 + 2pq + q^2

(p - q)^2 = p^2 - 2pq + q^2

(ax + b)^2 = a^2x^2 + 2abx + b^2

The final term b^2 is always nonnegative because it is a square. The middle term can be positive or negative depending on the sign of b.

Formula reference: Richland College - The Binomial Theorem.

Common binomial square patterns

Swipe to view the table
Binomial Expanded result Middle term Note
(x + 3)^2 x^2 + 6x + 9 2 * x * 3 = 6x Positive constant gives a positive middle term.
(x - 4)^2 x^2 - 8x + 16 2 * x * -4 = -8x The last term is still positive.
(2x + 5)^2 4x^2 + 20x + 25 2 * 2x * 5 = 20x Remember to square the coefficient 2.
(3y - 2)^2 9y^2 - 12y + 4 2 * 3y * -2 = -12y Works the same with any variable.

Expansion practice reference: mathcentre - expanding and removing brackets.

How to recognize a perfect square trinomial

A perfect square trinomial is the expanded form of a squared binomial. It has a first term that is a square, a last term that is a square, and a middle term equal to twice the product of the square roots of those terms.

Check the first term

For 4x^2 + 20x + 25, the first term 4x^2 is (2x)^2.

Check the last term

The last term 25 is 5^2. Last terms are always positive in a binomial square.

Check the middle term

Twice the product of 2x and 5 is 20x, so the trinomial factors as (2x + 5)^2.

Area model for a binomial square

A binomial square can be visualized as the area of a square whose side length is split into two parts. If the side is p + q, the whole area is (p + q)^2.

p^2
pq
pq
q^2

The two matching pq rectangles combine to make 2pq. That is why the expanded result has three parts: first square, twice the product, and last square.

Reverse check: factor the trinomial back

After expanding a binomial square, you can check the answer by factoring the trinomial back into its original binomial. This is especially useful when the first coefficient is not 1.

Expanded form

9x^2 - 30x + 25

The first term is (3x)^2 and the last term is 5^2. The middle term is 2 * 3x * -5 = -30x.

Factored form

(3x - 5)^2

Because all three checks match, the trinomial is a perfect square and factors back to the original binomial.

Factoring reference: Lumen Learning College Algebra - factoring perfect square trinomials.

When to use a binomial square

Swipe to view the table
Situation Expression Why it matters Expanded form
Square with changed side length (s + 4)^2 Models a square area after each side grows by 4 units. s^2 + 8s + 16
Completing the square x^2 + 10x + 25 Rewrites a quadratic as a perfect square to solve or graph it. (x + 5)^2
Distance and coordinate algebra (x - 7)^2 Appears in squared distance, circle equations, and vertex form. x^2 - 14x + 49
Mental math 103^2 = (100 + 3)^2 Turns a large square into easy pieces. 10,000 + 600 + 9 = 10,609

Common mistakes when squaring a binomial

The most common mistake is writing (p + q)^2 as p^2 + q^2. That misses the middle term 2pq, which comes from multiplying the binomial by itself.

Incorrect

(x + 5)^2 = x^2 + 25

The middle term 10x is missing.

Correct

(x + 5)^2 = x^2 + 10x + 25

Use first square, twice product, last square.

Another common issue is the sign of the last term. In (x - 5)^2, the last term is +25, not -25, because (-5)^2 is positive.

Interesting fact

The square of a binomial is the n = 2 case of the binomial theorem. That means the expansion has exactly 3 terms, with coefficients 1, 2, and 1 from Pascal's triangle. Those numbers explain why (p + q)^2 becomes p^2 + 2pq + q^2 instead of just p^2 + q^2. Source: OpenStax Precalculus 2e - Binomial Theorem.

Frequently Asked Questions

What is the square of a binomial in algebra?

The square of a binomial is the result of multiplying a two-term algebra expression by itself. For example, (x + 3)^2 means (x + 3)(x + 3), which expands to the polynomial x^2 + 6x + 9. The calculator uses the identity (p + q)^2 = p^2 + 2pq + q^2 and shows each step of the expansion.

Why does the expansion have a middle term?

The middle term comes from the two cross-products when the binomial is multiplied by itself. In (p + q)(p + q), the products pq and qp combine to 2pq. Leaving out that term changes the equation and is the most common math mistake when squaring binomial expressions.

How do I expand (ax + b)^2 step by step?

Square the first term to get a^2x^2, multiply the two terms and double the product to get 2abx, then square the constant term to get b^2. The final result is a^2x^2 + 2abx + b^2, where a is the coefficient and x is the variable. If b is negative, the middle term becomes negative during simplification.

Is (x - 4)^2 the same expression as x^2 - 16?

No. (x - 4)^2 equals x^2 - 8x + 16. The expression x^2 - 16 is a difference of squares, not a square of a binomial. The calculator separates these algebra patterns so the final answer keeps the correct middle term and exponent structure.

Can a binomial square result have a negative last term?

Not when the last term comes from squaring a real constant. In (ax + b)^2, the last term is b^2, so it is zero or positive. A negative last term usually means the expression is not a perfect square trinomial polynomial.

How can I tell if a polynomial came from a binomial square?

Check whether the first and last terms are perfect squares, then test the middle term. For example, 9x^2 - 24x + 16 has first square (3x)^2 and last square 4^2. Since 2 * 3x * -4 = -24x, the polynomial matches the binomial-square formula and factors back to (3x - 4)^2.

Does the binomial formula work when the coefficient is not 1?

Yes. Treat the whole variable term as the first part of the binomial. For (4x + 3)^2, the first square is 16x^2, the middle term is 2 * 4x * 3 = 24x, and the last square is 9. The expansion result is 16x^2 + 24x + 9.

What is the difference between a binomial square and a difference-of-squares identity?

A binomial square has the form (p + q)^2 or (p - q)^2 and expands to three terms. A difference-of-squares identity has the form p^2 - q^2 and factors as (p + q)(p - q). For example, (x - 6)^2 is x^2 - 12x + 36, while x^2 - 36 is (x + 6)(x - 6), so the solution pattern is different.

Disclaimer: This square of a binomial calculator is for general educational and informational use only. It provides algebraic expansion based on user-entered coefficients and variable notation. It is not a substitute for classroom instructions, textbook requirements, exam formatting rules, or professional mathematical verification. Always confirm the required notation, exact form, and simplification style for your course, worksheet, or project.

Last updated: May 22, 2026