FOIL Calculator — Multiply Two Binomials Step by Step (Free)
AlgebraFreeNo sign-up
FOIL multiplies two binomials by adding four products: First, Outer, Inner and Last. For (2x + 3)(x − 5): First 2x · x = 2x², Outer 2x · (−5) = −10x, Inner 3 · x = 3x, Last 3 · (−5) = −15. Combining the like terms gives 2x² − 7x − 15. The FOIL calculator shows each product, the box method and a check.
Show steps (7)
- First Multiply the first terms of each binomial: 2x · x = 2x2.
- Outer Multiply the outer terms (first of the first, last of the second): 2x · (−5) = −10x.
- Inner Multiply the inner terms (last of the first, first of the second): 3 · x = 3x.
- Last Multiply the last terms of each binomial: 3 · (−5) = −15.
- Add the products (2x + 3)(x − 5) = 2x2 − 10x + 3x − 15.
- Combine like terms Like terms have the same letters with the same powers: −10x + 3x = −7x. Result: 2x2 − 7x − 15.
- Check Substitute x = 2: the factors give 7 · (−3) = −21, and 2x2 − 7x − 15 gives −21 ✓.
| × | x | −5 |
|---|---|---|
| 2x | 2x2 | −10x |
| 3 | 3x | −15 |
How to use the FOIL calculator
- Type one binomial in each box, for example 2x + 3 and x – 5. Use ^ for powers, such as x^2. Fractions such as 1/2x and decimals are kept exact.
- To square a binomial, type the same binomial in both boxes, or type (x + 4)^2 in the first box and leave the second empty.
- For a trinomial or longer polynomial, open the Polynomials tab. If you prefer coefficients, the (ax + b)(cx + d) tab takes a, b, c and d.
- Read the answer, then open Show steps. The FOIL diagram and the box grid show where each product comes from, and the last step checks the answer with a number.
What FOIL means
FOIL is a memory aid for the distributive property when both factors have two terms. For (a + b)(c + d):
| Letter | Multiply | In (a + b)(c + d) | In (2x + 3)(x − 5) |
|---|---|---|---|
| F: First | first term × first term | ac | 2x · x = 2x² |
| O: Outer | first term × last term | ad | 2x · (−5) = −10x |
| I: Inner | last term × first term | bc | 3 · x = 3x |
| L: Last | last term × last term | bd | 3 · (−5) = −15 |
So (a + b)(c + d) = ac + ad + bc + bd. FOIL works because each term of the first binomial is distributed to each term of the second. The order of the four products does not matter, but FOIL makes sure that none is missed.
The FOIL formula for (ax + b)(cx + d)
When both binomials are linear, the outer and inner products are always like terms, so the answer has three terms:
(ax + b)(cx + d) = ac·x² + (ad + bc)x + bd
Worked example: (2x + 1)(x + 4)
First: 2x · x = 2x². Outer: 2x · 4 = 8x. Inner: 1 · x = x. Last: 1 · 4 = 4. Add the outer and inner terms, 8x + x = 9x, to get 2x² + 9x + 4. With the formula, ac = 2, ad + bc = 8 + 1 = 9 and bd = 4.
Worked example: (3x − 2)(x + 5)
Treat the minus sign as part of the term: the second term of the first binomial is −2. First: 3x². Outer: 3x · 5 = 15x. Inner: −2 · x = −2x. Last: −2 · 5 = −10. Then 15x − 2x = 13x, so the product is 3x² + 13x − 10.
Worked example with fractions: (½x + 4)(2x − ⅓)
First: ½x · 2x = x². Outer: ½x · (−⅓) = −x/6. Inner: 4 · 2x = 8x. Last: 4 · (−⅓) = −4/3. Combine −x/6 + 8x = 47x/6, so the product is x² + 47x/6 − 4/3.
Special products to recognize
- Square of a sum: (a + b)² = a² + 2ab + b². Example: (x + 4)² = x² + 8x + 16.
- Square of a difference: (a − b)² = a² − 2ab + b². Example: (2x − 3)² = 4x² − 12x + 9.
- Difference of squares: (a + b)(a − b) = a² − b². The outer and inner products cancel. Example: (x + 7)(x − 7) = x² − 49.
The calculator names these patterns when it finds them. Recognizing them saves time, and they are the patterns you reverse when factoring.
Multiplying larger polynomials: the box method
FOIL only covers two binomials. For a binomial times a trinomial, or any two polynomials, multiply every term of the first by every term of the second. A box (area) grid keeps track: write one polynomial across the top and the other down the side, and fill each cell with a product.
For (x + 2)(x² + 3x + 1), the first row is x³, 3x², x and the second row is 2x², 6x, 2. Adding like terms gives x³ + 5x² + 7x + 2. A product of an m-term and an n-term polynomial has m × n products before combining, so 2 × 3 = 6 here.
Like terms and exponents
When you multiply terms, multiply the coefficients and add the exponents of the same letter: x² · 3x = 3x³ and 3y · (−2y) = −6y². Like terms must have the same letters raised to the same powers. So 2x and −7x combine, while x² and x stay separate. With two letters, (x² + 3y)(x − 2y) = x³ − 2x²y + 3xy − 6y² has no like terms at all.
Common FOIL mistakes
- Dropping a negative sign. In (x − 5), the last term is −5, so the Last product with 3 is −15, not 15.
- Forgetting the middle term when squaring: (x + 4)² is not x² + 16.
- Adding exponents when you should multiply coefficients, or the reverse: 2x · 3x = 6x², not 5x² or 6x.
- Using FOIL on a trinomial and missing products. Count them: 2 × 3 = 6.
- Combining unlike terms, such as x² and x.
How to check a FOIL answer
Substitute a small number for x in both forms. For (2x + 1)(x + 4) with x = 1, the factors give 3 · 5 = 15 and 2x² + 9x + 4 gives 2 + 9 + 4 = 15. If the two results differ, a product or a sign is wrong. The calculator checks every answer this way at x = 2.
FOIL method practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
First x², Outer 6x, Inner 2x, Last 12. The outer and inner terms combine: 6x + 2x = 8x.
Outer means the first term of the first binomial times the last term of the second: 3x · (−5) = −15x.
(x + 5)(x + 5) = x² + 5x + 5x + 25. Squaring each term separately misses the middle term 2ab = 10x.
This is a difference of squares: (a + b)(a − b) = a² − b² with a = 2x and b = 3. The outer and inner products, −6x and 6x, cancel.
Distribute x: x³ − x² + 3x. Distribute 2: 2x² − 2x + 6. Combine: x³ + x² + x + 6.
Each of the 2 terms is multiplied by each of the 3 terms: 2 × 3 = 6 products.
First ½x · 4x = 2x², Outer ½x · (−6) = −3x, Inner 2 · 4x = 8x, Last 2 · (−6) = −12. Then −3x + 8x = 5x.
Quiz complete
Frequently asked questions
How do you use the FOIL method in math?
Multiply the first terms, the outer terms, the inner terms and the last terms of two binomials, then add the four products and combine like terms. For (x + 3)(x + 4): x² + 4x + 3x + 12 = x² + 7x + 12.
How do you check the FOIL method?
Substitute a value such as x = 1 or x = 2 into the original product and into your answer. Both must give the same number. You can also factor your answer and see whether you get the original binomials back.
How do you do FOIL on a calculator?
Most graphing calculators do not expand expressions. You can enter y₁ = (2x + 1)(x + 4) and y₂ = 2x² + 9x + 4 and compare their tables. Calculators with a computer algebra system have an expand command. The calculator on this page shows the full working.
What is reverse FOIL?
Reverse FOIL is factoring a trinomial back into two binomials. For x² + 7x + 12, find two numbers that multiply to 12 and add to 7: 3 and 4, so x² + 7x + 12 = (x + 3)(x + 4). The factoring calculator does this with steps.
Can you use FOIL with a trinomial?
Not directly, because FOIL only names four products. Use the distributive property or the box method instead. For (x + 2)(x² + 3x + 1), distribute x and then 2 to get x³ + 5x² + 7x + 2.
Related calculators
- Factoring calculator: reverse FOIL with steps
- Algebra calculator: simplify, expand and solve
- Polynomial division calculator
- Exponent rules calculator
- Quadratic equation solver
More algebra calculators
Related to This Article
More math articles
- Top 10 PSAT 10 Math Practice Questions
- The Best Algebra 1 Book for New Jersey Students
- Properties of Absolute Value: A Deep Dive
- Monopoly Demand and Marginal Revenue: Price and Profit
- What Kind of Math Is on the ASVAB Test?
- Statuses and the Status Set
- The Ultimate HiSET Math Course (+FREE Worksheets & Tests)
- 3rd Grade MEA Math Worksheets: FREE & Printable
- Budgetary controls
- How to Help Your 5th Grade Student Prepare for the Michigan M-STEP Math Test




What people say about "FOIL Calculator: Multiply Two Binomials Step by Step"?
No one replied yet.