Three terms — and a number for exactly what leaving the middle one out costs.
Square a binomial
Three terms, and the middle one is the whole point.
Sign
(x + 3)²
x² + 6x + 9
Three terms — and the middle one is twice the product.
Square the first term
x²
Twice the product of the two terms
6x
= 2 × (3x)
Square the last term
9
The same square, cut into four pieces
A square of side (a + b) cut into an a-square, a b-square and two a-by-b rectangles
x²
3x
3x
9
The two highlighted rectangles are identical, and together they are the middle term. That is why it is doubled, and why leaving it out is geometrically obvious once you have seen the square cut up.
The mistake, priced
Writing x² + 9 instead of x² + 6x + 9 leaves out 6x. At x = 2 the square is 25, while a² + b² alone gives 13 — short by 12, which is exactly the 2ab that was dropped.
The identity next door
(x + 3)(x − 3) = x² − 9. Change the sign between the factors and the two middle products cancel instead of doubling — which is why a difference of squares has no middle term at all. Same two pieces, opposite behaviour, and the sign is the only difference.
The cube, for when that is the next question: x³ + 9x² + 27x + 27
What this tool shows
Three terms, and the middle one is what everybody drops — so it gets its own line, its own picture and its own price.
The three terms named individually, with the middle one as its own line
A 2 × 2 area model showing why the middle term is doubled
A numeric instance of the (a + b)² = a² + b² error
The sum-times-difference identity beside it, for contrast
The area model, cut into four The middle term named separately Any number of variables Free, no signup
Updated 6 September 2026 · Works in any browser, no installation
(a + b)² = a² + 2ab + b², and the 2ab is the term people leave out. (x + 3)² = x² + 6x + 9. Writing x² + 9 instead is short by 6x — At x = 2 the square is 25, while a² + b² alone gives 13 — short by 12, which is exactly the 2ab that was dropped.
At a glance
Formula shown
(a + b)\u00b2 = a\u00b2 + 2ab + b\u00b2, and (a \u2212 b)\u00b2 = a\u00b2 \u2212 2ab + b\u00b2. The last term is a square, so it is positive either way.
Scenario support
Any two terms, in any number of variables, with rational coefficients.
Educational estimate
Planning support from the values you enter — not professional advice.
The middle term is the whole topic
Squaring the two pieces is not the hard part. The error is always the same: writing (a + b)² as a² + b², which is short by exactly 2ab.
It is worth seeing that as a number rather than a rule. For (2x + 3y)², At x = 2, y = 3 the square is 169, while a² + b² alone gives 97 — short by 72, which is exactly the 2ab that was dropped. That is not a rounding difference or a subtlety — the wrong answer is roughly half the right one.
The reason the error is so persistent is that the notation invites it. Squaring distributes over multiplication — (ab)² really is a²b² — and it does not distribute over addition. The two look alike written down and behave completely differently.
The picture that makes it obvious
Draw a square of side (a + b) and cut it at the point where a ends. You get four pieces: an a×a square, a b×b square, and two a×b rectangles — one above and one beside.
The total area is the square of the side, which is (a + b)². Add the pieces and you get a² + ab + ab + b². There are two rectangles, so the cross term is doubled, and the identity is a statement about a picture rather than a rule to memorise.
Once the picture is in your head the error stops being available: leaving out 2ab means claiming a square is made of only its two corner squares, with two whole rectangles unaccounted for. The grid beside the calculator is that cut, with the two identical rectangles highlighted.
Squaring a difference changes one sign, not two
(a − b)² = a² − 2ab + b². The middle term goes negative and the last term does not, because b² is a square and squares are never negative.
(x − 5)² = x² − 10x + 25. The +25 at the end catches people who flip both signs by reflex — but (−5)×(−5) is +25, and no amount of the binomial being a difference changes that.
(3a − 2b)² = 9a² − 12ab + 4b² is the same thing with coefficients on both terms: 3² = 9 in front, 2² = 4 at the back, and the middle is −2×3×2 = −12 with the ab attached.
Why a sum times a difference has no middle term
The identity next door is (a + b)(a − b) = a² − b², and the contrast is instructive. Same two pieces, same four products — but the two cross terms are now +ab and −ab, which cancel instead of doubling.
For x and 3: (x + 3)(x − 3) = x² − 9. Two terms, not three. Change the sign between the factors and the two middle products cancel instead of doubling — which is why a difference of squares has no middle term at all. Same two pieces, opposite behaviour, and the sign is the only difference.
So the sign between the brackets decides whether the middle term is doubled or destroyed, and it is the only thing that does. That single fact accounts for both of the two most common special products in algebra.
a and b can be anything at all
The identity is not about x and a number. It holds for any two quantities, because its proof uses only distribution — and distribution does not care what it is distributing over.
(x²y + 3z)² = x⁴y² + 6x²yz + 9z². The first term is a two-variable monomial and nothing about the method changes: square it, double the product, square the other.
((1/2)x + 4)² = (1/4)x² + 4x + 16 shows the same with a fraction, kept exact rather than turned into 0.5. This matters when the result feeds a further step, where a rounded coefficient quietly stops being a perfect square.
The cube, and where the pattern comes from
The natural next question is (a + b)³, and the answer is a³ + 3a²b + 3ab² + b³. For (x + 3)³ that is x³ + 9x² + 27x + 27.
The coefficients 1, 2, 1 for the square and 1, 3, 3, 1 for the cube are rows of Pascal’s triangle, and that is not a coincidence: the coefficient of akbn−k counts the ways to choose which brackets contribute the b. Squaring gives two ways to get one b, cubing gives three.
Which is why the middle term is doubled rather than being some other multiple. The Binomial Coefficient Calculator computes those counts for any power, and the same argument explains all of them at once.
Sources and methodology
The special products are standard identities; the reference below is where their canonical form lives.
Method. Every figure on this page comes from src/lib/square-of-a-binomial.ts over the multivariate term algebra in src/lib/algebra/parse.ts, which stores a term as an exact rational coefficient and a map of variable to exponent — so two variables and fractional coefficients are ordinary cases rather than extensions. The numeric counterexample is evaluated from the same term lists that produce the expansion. That engine is verified on every change against 51 hand-written assertions, including that the three named terms always re-collect to the direct product of the bracket with itself, and that the reported gap equals the middle term exactly. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
FOILMultiply two binomials with all four products named — First, Outer, Inner, Last — shown as a grid too, with difference of squares and perfect squares recognised.
Perfect Square TrinomialTest whether a trinomial is a perfect square against all three conditions, name which one failed, and give the constant that would fix it — plus the difference-of-squares answer when that is what you actually have.
Multiplying PolynomialsMultiply polynomials of any size in any number of variables, by grid, vertical or term-by-term layout, with the product count that catches a dropped term.
Completing the SquareRewrite ax² + bx + c as a(x − h)² + k with every step shown, solve by the method, or find the constant that completes a square — all in exact fractions.
Factoring TrinomialsFactor a trinomial by the AC method with every factor pair of ac listed, the common factor taken out first, and the answer multiplied back out to check it.
Binomial Coefficientn choose k exactly on big integers, by the multiplicative formula that never builds a number bigger than the answer — with Pascal's rule, the row it sits in, and permutations beside it.
Squaring a binomial is one of four polynomial operations, and each has its own characteristic slip. Adding, Multiplying and Dividing Polynomials — the Four Operations covers all of them, including the product count that catches a dropped term in a longer expansion.
Educational use disclaimer
This calculator expands the square of a binomial exactly, over rational coefficients and any number of variables. It expands rather than solves: an equation with an unknown belongs on one of the solving pages. The identity shown holds for any two quantities at all — numbers, variables, or whole expressions.