Skip to content
Omnikalc

FOIL method calculator: expand (ax + b)(cx + d)

Enter the numbers a, b, c and d of two binomials to get the first, outer, inner and last products, the expanded quadratic and its discriminant.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Value of the product at x

-14.00

First terms: ac
2
Outer terms: ad
-8
Inner terms: bc
3
Last terms: bd
-12
Discriminant
121
Real roots
2
The product has two real roots

Multiplying two binomials is one of the first skills of algebra, and the FOIL method turns it into four small products. This FOIL method calculator takes the numbers a, b, c and d of (ax + b)(cx + d) and gives the first, outer, inner and last products, the expanded quadratic, its value at x and the discriminant.

How the calculation works

  • First × first: a × c, the coefficient of x².
  • Outer × outer: a × d. Inner × inner: b × c. These two give the x terms, and the coefficient of x is a × d + b × c.
  • Last × last: b × d, the constant term. The product is ac x² + (ad + bc) x + bd.
  • Value at x: (ax + b)(cx + d) with your x. It equals the expanded form, which is a good check of the expansion.
  • Discriminant = (ad + bc)² − 4 × ac × bd. It is positive for two real roots, zero for one repeated root and negative for none. When a or c is zero, the product is not a quadratic and has one root.

Example

Multiply (2x + 3)(x − 4). First: 2 × 1 = 2. Outer: 2 × (−4) = −8. Inner: 3 × 1 = 3. Last: 3 × (−4) = −12. The product is 2x² − 5x − 12. At x = 2 it is (7)(−2) = −14, and 2 × 4 − 10 − 12 gives the same. The discriminant is 25 + 96 = 121, so there are two real roots, 4 and −1.5.

Why it matters

Expanding products is the first step of solving quadratic equations, simplifying expressions and graphing parabolas. Seeing the four products separately helps to avoid the usual sign mistakes, and the check at a chosen x catches errors before you hand in a homework.

Good to know

Watch the signs. A negative number inside a binomial gives negative products, and two negatives multiply to a positive. The outer and inner products are added into one x term, and if they cancel, the middle term disappears, as in (x + 3)(x − 3) = x² − 9. The method needs two binomials and does not apply to a binomial times a trinomial, which has six products.

The binomial expansion calculator handles powers of a binomial and the quadratic calculator solves the equation that comes from the product.

Frequently asked questions

What does FOIL stand for?

FOIL stands for First, Outer, Inner, Last. It is a way to remember the four products when you multiply two binomials: the first terms, the two outer terms, the two inner terms and the last terms. Then you add the products and combine the terms that have the same power of x.

Does FOIL work for any two binomials?

It works for two binomials, which have two terms each, like (3x + 2)(x − 5). For larger expressions, use the distributive law and multiply each term of the first factor by each term of the second. FOIL is that law in a special case with four products.

How can I check my answer?

Pick a value of x, calculate the product of the two binomials, and compare it with the expanded expression. If they match for a couple of different values, the expansion is very likely right. The calculator shows the value of the product at the x you enter.

What is the discriminant for?

For the quadratic ax² + bx + c, the discriminant b² − 4ac tells how many real solutions the equation has. Because you started from a product of two binomials, the roots are simply the values of x that make each binomial zero, x = −b ÷ a and x = −d ÷ c, so you can read them from the factors.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.