FOIL Calculator

Multiply two binomials with the FOIL method and see each of the four products, or factor a difference of two squares and check it by multiplying back.

Product2x² − 5x − 12

-1000000 – 1000000

-1000000 – 1000000

-1000000 – 1000000

-1000000 – 1000000

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

(2x + 3)(x − 4)

First: (2x) × (x) = 2x²

Outer: (2x) × (−4) = −8x

Inner: 3 × (x) = 3x

Last: 3 × (−4) = −12

Combine like terms: 2x² + (−8 + 3)x + (−12) = 2x² − 5x − 12.

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.

References

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.

Last updated . Results are estimates for informational purposes only.