FOIL Calculator

FOIL multiplies two binomials: First, Outer, Inner, Last. For (2x + 3)(x − 4) the terms are 2x², −8x, 3x and −12, which combine to 2x² − 5x − 12, a quadratic with discriminant 121.

Last updated · By · Runs in your browser, nothing is uploaded

Result

Step-by-Step Solution

Enter your values above to see the full working.

What Is FOIL?

FOIL is a memory aid for multiplying two binomials, expressions with two terms each. The letters stand for the four products you must add: First terms, Outer terms, Inner terms and Last terms. It is simply the distributive law applied carefully, so that every term in the first bracket multiplies every term in the second.

Expanding brackets is one of the first algebra skills, and it is the reverse of factoring. If you can multiply (2x + 3)(x − 4) into 2x² − 5x − 12, then you can learn to go backwards from 2x² − 5x − 12 to the brackets.

The Four Products

LetterWhich termsFor (2x + 3)(x − 4)Product
FirstFirst term of each bracket2x × x2x²
OuterThe outside pair2x × (−4)−8x
InnerThe inside pair3 × x3x
LastLast term of each bracket3 × (−4)−12

FOIL Formula

(ax + b)(cx + d) = ac·x² + (ad + bc)·x + bd
  • ac is the coefficient of x² (First).
  • ad + bc is the coefficient of x, from the Outer and Inner products combined.
  • bd is the constant term (Last).
  • The discriminant of the result, (ad + bc)² − 4ac·bd, tells you about the roots of the expanded quadratic.

Special products come up so often they are worth memorising: (x + k)² = x² + 2kx + k² and (x + k)(x − k) = x² − k². For longer expressions or higher powers, use the polynomial calculator or the binomial expansion calculator.

How Is It Calculated? Worked Examples

(2x + 3)(x − 4)

  1. First: 2x · x = 2x².
  2. Outer: 2x · (−4) = −8x.
  3. Inner: 3 · x = 3x.
  4. Last: 3 · (−4) = −12.
  5. Combine the x terms: −8x + 3x = −5x.
  6. Result: 2x² − 5x − 12.
  7. Discriminant: (−5)² − 4(2)(−12) = 25 + 96 = 121, a perfect square, so the result factors over the integers and the roots are x = 4 and x = −3/2.

More Products

ProductExpandedNote
(x + 3)(x + 3)x² + 6x + 9Perfect square, discriminant 0
(x + 5)(x − 5)x² − 25Difference of squares, no x term
(3x − 2)(2x + 5)6x² + 11x − 10Discriminant 361

Area Application

A rectangle has sides (x + 3) and (x + 5). Its area is (x + 3)(x + 5) = x² + 8x + 15. If x = 2, the sides are 5 and 7 and the area is 35, which matches 4 + 16 + 15 = 35 ✓.

Special Products and Mental Maths

PatternExpansion
(a + b)²a² + 2ab + b²
(a − b)²a² − 2ab + b²
(a + b)(a − b)a² − b²

These patterns make arithmetic faster. 23 × 17 = (20 + 3)(20 − 3) = 400 − 9 = 391, and 52² = (50 + 2)² = 2,500 + 200 + 4 = 2,704. When the leading coefficient is negative, the same steps apply: (−x + 2)(x + 3) = −x² − 3x + 2x + 6 = −x² − x + 6.

How to Use This FOIL Calculator

  1. Enter a and b for the first bracket (ax + b).
  2. Enter c and d for the second bracket (cx + d). Use negative numbers for subtraction.
  3. Read the expanded product, the x², x and constant coefficients, and the discriminant.

To go backwards, from an expanded quadratic to brackets, use the factoring quadratic calculator.

Where FOIL and Expansion Are Used

  • Algebra: simplifying expressions, solving equations and preparing to factor.
  • Geometry: expressing areas of rectangles whose sides contain variables.
  • Calculus: expanding before differentiating or integrating.
  • Mental arithmetic: computing 23 × 17 as (20 + 3)(20 − 3) = 400 − 9 = 391.
  • Probability and finance: expanding expressions such as (1 + r)(1 + s).

What Are the Most Common Mistakes With the FOIL Calculator?

  • Skipping the Outer and Inner terms. (x + 3)² is not x² + 9. It is x² + 6x + 9.
  • Sign errors with negatives. (−4) × 3 = −12, and (x − 4) means b or d is −4.
  • Not combining like terms. The Outer and Inner products both contain x and must be added.
  • Applying FOIL to more than two terms. It works only for two binomials. Use the distributive law for larger brackets.
  • Assuming a = 0. If a or c is zero, the result is not a quadratic.
  • Confusing expanding with factoring. They are opposite operations.

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

What does FOIL stand for?

First, Outer, Inner, Last: the four products you add when multiplying two binomials.

What is (2x + 3)(x − 4)?

2x² − 5x − 12. First 2x², Outer −8x, Inner 3x, Last −12.

Does FOIL work for trinomials?

No. For expressions with more terms, multiply every term of the first bracket by every term of the second, as the polynomial calculator does.

What is the formula behind FOIL?

(ax + b)(cx + d) = acx² + (ad + bc)x + bd.

How is FOIL related to factoring?

Factoring reverses FOIL: it turns an expanded quadratic back into a product of two brackets.

What does the discriminant of the product tell me?

It shows the nature of the roots of the expanded quadratic. A perfect-square discriminant like 121 means the quadratic factors over the integers or rationals.