Multiplying Binomials Calculator
Enter two binomials and get the expanded polynomial, the four FOIL products laid out in a grid, and the working written out line by line.
Type the coefficients, not the expression
Each box takes a whole number, a decimal or a fraction such as 3/4, and the arithmetic stays exact — no rounding anywhere in the result.
Expanded product
Enter four coefficients to expand the product.
Leading term
--
Middle term
--
Constant term
--
Degree
--
The area model
--Result check
What the expansion does and does not settle.
Numeric check
--
The four products, term by term
| Step | Terms multiplied | Product | Goes to |
|---|
Step-by-step working
Notes on the method will appear here.
Special form
--
Whether this product matches one of the patterns worth memorising.
Read backwards
--
The same line read right to left is the factored form of the polynomial.
How the multiplying binomials calculator works
A multiplying binomials calculator expands expressions containing two binomials, such as (x + 2)(x + 3). Multiply each term in the first binomial by each term in the second, then combine like terms. For example, (x + 2)(x + 3) expands to x² + 5x + 6.
Four products go in and three terms come out, and the middle one is where the work happens. In that example the four products are x², 3x, 2x and 6 — and because 3x and 2x carry the same power of the variable, they are like terms and add to the 5x in the answer. Written with letters instead of numbers, the same collapse turns (ax + b)(cx + d) into the trinomial acx² + (ad + bc)x + bd, where that ad + bc is the pair of products meeting in the middle.
The calculator works from the coefficients rather than from typed algebra, so there is nothing to parse and nothing to get wrong. It keeps every value as an exact fraction: enter 1/2 and you get 1/2 back, not 0.5 and not a rounded decimal. It also handles the two cases a plain quadratic template cannot — unequal powers such as (2x³ + 1)(3x² − 4), where the middle terms refuse to combine and the answer keeps all four, and two-variable products such as (2x + 3y)(x − y).
Each term of one bracket meets each term of the other — the distributive property, applied twice.
The Outer and Inner products share a power, so they add into a single middle term.
Put a number in for the variable: the factored and expanded forms must give the same value.
FOIL, one letter at a time
FOIL is a mnemonic for the order in which the four products are taken. It is not a separate rule — it is the distributive property with a memorable name — but it does stop you leaving one of the four out.
F — First
2x · 4x = 8x²
The first term of each bracket. This one sets the degree of the answer.
O — Outer
2x · 5 = 10x
The two terms on the outside of the whole expression.
I — Inner
3 · 4x = 12x
The two terms nearest the middle. Added to the Outer product, it becomes the middle term.
L — Last
3 · 5 = 15
The last term of each bracket, giving the constant.
Putting it together: (2x + 3)(4x + 5) = 8x² + 10x + 12x + 15 = 8x² + 22x + 15. The middle coefficient 22 is ad + bc — two products added, which is exactly the step people skip when they write 8x² + 15 and move on.
Method reference: the coefficient form (a₁x + a₀)(b₁x + b₀) and the resulting c₂, c₁, c₀ follow Omni Calculator's Multiplying Binomials Calculator; the FOIL ordering and the vertical alternative are set out in OpenStax's Elementary Algebra 2e, Multiply Polynomials.
Worth memorising
Special products
A handful of products turn up so often that recognising them is faster than expanding them. Each one is still just FOIL — the pattern only says what happens to the middle term.
| Pattern | Expansion | Example | What the middle term does |
|---|---|---|---|
| (a + b)² | a² + 2ab + b² | (x + 4)² = x² + 8x + 16 | Doubles |
| (a − b)² | a² − 2ab + b² | (3x − 2)² = 9x² − 12x + 4 | Doubles, and turns negative |
| (a + b)(a − b) | a² − b² | (x + 5)(x − 5) = x² − 25 | Cancels — only two terms left |
| (x + p)(x + q) | x² + (p + q)x + pq | (x + 3)(x + 7) = x² + 10x + 21 | Sum of the two constants |
| (ax + b)(cx + d) | acx² + (ad + bc)x + bd | (2x + 3)(4x + 5) = 8x² + 22x + 15 | Two cross products added |
| (ax + by)(cx + dy) | acx² + (ad + bc)xy + bdy² | (2x + 3y)(x − y) = 2x² + xy − 3y² | Becomes an xy term |
(a + b)² is not a² + b². The squares of the two terms are only the First and Last products; the Outer and Inner ones are both ab, and they are what makes the middle term 2ab. Dropping them is the single most common error in algebra.
Pattern reference: the difference of squares, both perfect-square forms and the warning that (a + b)² ≠ a² + b² are covered in Paul's Online Notes, Algebra — Polynomials (Lamar University).
The picture behind the rule
Why the area model is the better mental image
Draw a rectangle whose width is 2x + 3 and whose height is 4x + 5. Split each side at the plus sign and the rectangle falls into four smaller rectangles, with areas 8x², 10x, 12x and 15. The whole area is the sum of the parts, and that sum is the expansion. Nothing has been memorised; the four products are simply there to be counted.
It survives bigger polynomials
FOIL has exactly four letters, so it stops working the moment a bracket has three terms. A grid does not care: a trinomial times a binomial is a 3 × 2 grid with six boxes, and the method is unchanged.
It makes the middle term obvious
The two boxes on the anti-diagonal are the Outer and Inner products. Seeing them sit next to each other is a better argument for adding them than any acronym.
It matches long multiplication
The same grid multiplies 23 × 45 as 20 + 3 by 40 + 5. Binomial multiplication is arithmetic you already do, with the place values left as letters.
It reverses cleanly
Factoring a trinomial is the same grid solved backwards: you know the four areas and are hunting for the side lengths.
Negative terms still work: a box holding −12x is not a negative area so much as a subtraction from the total. The bookkeeping is identical, which is why (x + 5)(x − 5) loses its middle term entirely — the two middle boxes are −5x and +5x.
The same skill in reverse
Factoring is this calculator read right to left
Every line the calculator produces can be read in either direction. (2x + 3)(4x + 5) = 8x² + 22x + 15 expands left to right and factors right to left, and the second reading is the one exams ask for more often.
Expanding is mechanical
Four multiplications and one addition, in a fixed order, with a guaranteed answer. There is no searching involved.
Factoring is a search
You need two numbers multiplying to ac and adding to b, and for many trinomials no whole numbers exist at all.
A use for this calculator you may not expect: checking your factoring. Factor a trinomial by hand, put your two brackets into the calculator, and if the expansion is not the trinomial you started with, the factoring is wrong — no rearranging, no second opinion needed.
Factoring reference: recognising a perfect-square trinomial or a difference of squares in order to factor it is worked through in Mathematics LibreTexts, Factor Special Products.
Where FOIL runs out
Three things the acronym will not do for you
FOIL is a memory aid for one particular shape of problem, and it is worth knowing where that shape ends.
More than two terms
(x² + 2x + 1)(x + 3) has six products, not four. FOIL has no letter for them; the distributive property and a grid do.
More than two brackets
(x + 1)(x + 2)(x + 3) has to be done in stages — multiply two, then multiply the result by the third.
Understanding why
FOIL tells you the order, never the reason. The reason is that multiplication distributes over addition — which is what still applies when the acronym does not.
Interesting fact
FOIL is younger than the algebra it describes
The rule is ancient; the acronym is not. Expanding a product of two sums was routine for Islamic and Renaissance algebraists centuries before anyone thought to name the steps, and the four-letter mnemonic only appears in 1929, in the American textbook Algebra for Today by William Betz — a mathematics educator who spent his career trying to make school algebra easier to hold on to. It worked, perhaps too well: FOIL is now so firmly attached to the topic that students often meet it before they meet the distributive property it is a special case of, and then find themselves stuck the first time a bracket contains three terms. The teaching argument that followed has been running for the best part of a century, and the area model is the compromise most curricula have settled on — it gives you FOIL for free when there are two terms, and it keeps working when there are more.
In practice
Four worked expansions
(2x + 3)(4x + 5)
8x² + 10x + 12x + 15
= 8x² + 22x + 15
The ordinary case: two cross products add into the middle term.
(x + 5)(x − 5)
x² − 5x + 5x − 25
= x² − 25
The cross products cancel, leaving a difference of squares.
(3x − 2)²
9x² − 6x − 6x + 4
= 9x² − 12x + 4
The cross products are equal, so the middle term doubles.
(2x³ + 1)(3x² − 4)
6x⁵ − 8x³ + 3x² − 4
Different powers, so nothing combines and all four terms survive.
Checking without redoing the work: substitute a number. At x = 2, (2x + 3)(4x + 5) is 7 · 13 = 91, and 8x² + 22x + 15 is 32 + 44 + 15 = 91. Agreement at one value is not proof, but disagreement is instant proof of an error — and this catches almost every sign slip. Avoid x = 0 and x = 1, which are too forgiving.
Common mistakes to avoid
Squaring term by term. (a + b)² is a² + 2ab + b². Writing a² + b² throws away both cross products.
Losing a minus sign. In (3x − 2)(x − 4) the Last product is (−2)(−4) = +8, not −8. Two negatives make a positive here too.
Adding terms that are not alike. 3x² and 5x cannot be combined, however tempting it looks when they sit next to each other.
Using FOIL where it does not apply. With a trinomial in either bracket the acronym is one letter short of the job. Multiply out systematically instead.
Frequently Asked Questions
How do you multiply two binomials?
Multiply every term of the first bracket by every term of the second, then add the results and combine anything alike. For (2x + 3)(4x + 5) that means 2x · 4x = 8x², 2x · 5 = 10x, 3 · 4x = 12x and 3 · 5 = 15, which add to 8x² + 10x + 12x + 15 and tidy up to 8x² + 22x + 15. In general (ax + b)(cx + d) = acx² + (ad + bc)x + bd, so the expansion of two linear brackets is always a quadratic expression. The order you take the four products in does not matter, only that you take all four — which is the entire point of the FOIL mnemonic. It is also the simplest case of polynomial multiplication: longer brackets follow the same reasoning, with more products to collect at the end.
What does FOIL stand for?
First, Outer, Inner, Last — the four pairs of terms you multiply when two binomials are side by side. First takes the first term of each bracket, Outer the outer term on each side of the expression, Inner the inner term nearest the middle, and Last the last term of each. It is one of the first acronyms anyone meets in algebra, and it is a memory aid rather than a rule of its own: the mathematics underneath the FOIL method is the distributive property, and the acronym only fixes the order in which that property is applied when both brackets happen to have exactly two terms.
Why does multiplying two binomials usually give three terms?
Because two of the four products are like terms. The Outer and Inner products both end up with a single power of the variable — 10x and 12x in the example above — so they add together into one middle term, and four products become the three terms of a trinomial. That last step is the simplification, and it is the only part of the work that is not straight multiplication. It does not always happen: if the exponents differ, as in (2x³ + 1)(3x² − 4), nothing combines and the answer keeps all four terms. And if the two middle products are equal and opposite, as in (x + 5)(x − 5), they cancel completely and only two terms are left.
What is (a + b) squared?
It is a² + 2ab + b², not a² + b². Squaring an algebraic expression means multiplying it by itself, so the four products are a·a, a·b, b·a and b·b; the two middle ones are both ab, and together they make the 2ab that gets left out so often. The equation (a + b)² = a² + 2ab + b² holds for every value of a and b, which is what makes it worth memorising, and the subtraction version behaves the same way: (a − b)² = a² − 2ab + b². A quick numerical test settles any doubt — at a = 3 and b = 4, (a + b)² is 49 while a² + b² is only 25.
Can this calculator handle fractions and negative coefficients?
Yes, and it keeps them exact. Type 1/2, −3/4 or a decimal like 2.5 into any coefficient box and every step is carried out as symbolic calculation on fractions rather than in decimals, so the answer comes back as a fraction rather than a rounded figure. Negative values need nothing special — write −5 for the constant and the sign is carried through all four products, which is exactly where hand working most often goes wrong.
How do you multiply binomials with two different variables?
Exactly the same way, but the middle terms carry both letters. (2x + 3y)(x − y) gives 2x² for the First product, −2xy for the Outer, 3xy for the Inner and −3y² for the Last, and the two middle products combine into xy, so the answer is 2x² + xy − 3y². Each of those four multiplications is really one monomial times another: multiply the coefficients, then add the exponents of any letter the two share. The general pattern is (ax + by)(cx + dy) = acx² + (ad + bc)xy + bdy². Switch the calculator to its two-variable mode and it lays out the same four products with the second letter in place.
Is FOIL the same as the distributive property?
FOIL is a special case of it. The distributive property says a(b + c) = ab + ac, and applying it twice to (a + b)(c + d) produces the four products FOIL names. The difference matters as soon as one factor has more than two terms: FOIL has four letters and therefore four products, so it simply stops working on (x² + 2x + 1)(x + 3), where the first factor is a trinomial and there are six products to take. The distributive property, or the area-model grid that pictures it, carries on unchanged for a polynomial of any length — which is a good reason to treat FOIL as a convenience rather than the thing you actually learned.
Before you write the answer down
- All four products taken, none skipped
- Signs carried through every multiplication
- Only genuinely like terms combined
- Terms written in descending order of power
- Degree of the answer equal to the degrees added
- A number substituted in as a final check
Other useful calculators
Permutation Calculator
Count the ways a set of items can be arranged in order.
Expected Value Calculator
Weigh outcomes by probability to get the long-run average.
Punnett Square Calculator
Cross two genotypes and read off the inheritance ratios.
Percentage Calculator
Turn fractions and ratios into percentages and back.
Ski Size Calculator
Size skis and poles from height, weight and ability.
Stride Length Calculator
Find your step length and turn step counts into distance.
Disclaimer
This calculator expands the product of exactly two binomials. It is a learning and checking aid, not a computer algebra system: it will not factor, solve, simplify a rational expression, or handle brackets with three or more terms.
Coefficients are held as exact fractions throughout, so nothing is rounded and no floating-point error creeps in. The trade-off is a limit on size — very large numerators or denominators, or high exponents combined with large coefficients, can exceed what the arithmetic can represent exactly. Results that look implausible in that territory should be checked by hand.
The exponents accepted are whole numbers from 1 to 20. Negative and fractional exponents describe rational and radical expressions, which follow different rules for combining like terms and are outside what this page covers.
The numeric check substitutes one value and compares the two forms. Agreement at a single point is strong evidence and catches nearly every sign error, but it is not a proof; two different polynomials can agree at one value, which is why it is worth avoiding x = 0 and x = 1 as test values.
Notation varies between countries and textbooks. Some write the middle coefficient as ad + bc and some as bc + ad; some teach FOIL and some teach the box or grid method or the vertical layout, and some deliberately teach none of them in favour of the distributive property alone. All reach the same answer. Where your course or exam board sets out a required layout for the working, follow that layout — the marks are usually for the method, not only for the final line.
Finally, a note on what a calculator is for. Expanding binomials is a skill that examinations test without one, and the value of this page is in the working it shows rather than the answer it produces. Use it to check what you have done, to see where a sign went missing, or to watch what happens to the middle term when the numbers change — not as a substitute for being able to do it on paper.
Last updated
Formulas, patterns, and references checked on this date.