FOIL Calculator

Multiply two brackets (ax + b)(cx + d) with the FOIL method and see all four products, or factor a difference of two squares and check it.

Product2x² − 5x − 12

In (2x + 3), a is 2.

In (2x + 3), b is 3.

In (x − 4), c is 1.

In (x − 4), d is −4. Use a minus sign for take-away.

Product

2x² − 5x − 12

  • First (ax · cx)2x²
  • Outer (ax · d)−8x
  • Inner (b · cx)3x
  • Last (b · d)−12

FOIL is the distributive property applied to two binomials; each term of the first binomial multiplies each term of the second.

How this was calculated

  1. These are the two brackets to multiply. FOIL stands for First, Outer, Inner, Last: the four pairs of terms we multiply.(ax + b)(cx + d)Put in your numbers: (2x + 3)(x − 4)
  2. First: multiply the first term of each bracket.First = ax × cxPut in your numbers: (2x) × (x)Answer: 2x²
  3. Outer: multiply the two terms on the outside ends.Outer = ax × dPut in your numbers: (2x) × (−4)Answer: −8x
  4. Inner: multiply the two terms in the middle.Inner = b × cxPut in your numbers: 3 × (x)Answer: 3x
  5. Last: multiply the last term of each bracket.Last = b × dPut in your numbers: 3 × (−4)Answer: −12
  6. Add the four answers. The Outer and Inner terms both have x, so they are like terms (same letter, same power) and join into one.Combine like termsPut in your numbers: 2x² + (−8 + 3)x + (−12)Answer: 2x² − 5x − 12

FOIL in simple words

FOIL is a way to multiply two brackets that each have two terms, like (2x + 3)(x − 4). The letters stand for First, Outer, Inner, Last: the four pairs you multiply.

First: the first term in each bracket, 2x × x = 2x². Outer: the two ends, 2x × (−4) = −8x. Inner: the two middle terms, 3 × x = 3x. Last: the last term in each bracket, 3 × (−4) = −12.

Then add the four answers and join the terms that have the same letter and power (like terms): −8x + 3x = −5x. So (2x + 3)(x − 4) = 2x² − 5x − 12.

The calculator can also go the other way for a difference of two squares, turning 9x² − 25 into (3x + 5)(3x − 5).

The FOIL method

FOIL is the distributive property applied to two binomials. Multiply the First terms, the Outer terms, the Inner terms and the Last terms, then combine the like terms: (ax + b)(cx + d) = acx² + (ad + bc)x + bd.

Example: (2x + 3)(x − 4). First 2x·x = 2x², Outer 2x·(−4) = −8x, Inner 3·x = 3x, Last 3·(−4) = −12. Combined, that is 2x² − 5x − 12.

Difference of two squares

A²x² − B² factors as (Ax + B)(Ax − B). When you FOIL the factors back out, the outer and inner terms cancel. Example: 9x² − 25 = (3x + 5)(3x − 5), and FOIL gives 9x² − 15x + 15x − 25 = 9x² − 25.

If P or Q is not a perfect square, the factors contain square roots, for example 5x² − 4 = (√5x + 2)(√5x − 2). Over the integers, such an expression does not factor.

How to use the FOIL Calculator

Pick a mode and enter the coefficients.

  1. Choose the mode

    Multiply two binomials, or factor Px² − Q.

  2. Enter the numbers

    For FOIL, enter a, b, c and d from (ax + b)(cx + d). For squares, enter P and Q.

  3. Read the result

    See the expanded or factored form, with each FOIL product.

Frequently asked questions

Is FOIL only for binomials?

Yes. FOIL names the four products of two two-term factors. For longer polynomials, multiply every term of one factor by every term of the other.

Why does the middle term vanish in a difference of squares?

The outer product −ABx and the inner product +ABx are opposites, so they add to zero.

Can I use decimals or negative coefficients?

Yes. Enter any real coefficients; negative signs are carried through each product.

References

Last updated . Results are estimates for informational purposes only.