FOIL Calculator
Multiply two binomials (ax + b)(cx + d) with the FOIL method. See First, Outer, Inner, Last products, combined like terms, and the expanded polynomial.
The FOIL method
FOIL is a memory aid for multiplying two binomials — expressions with exactly two terms, like and . The letters stand for the four pairs of terms to multiply, in order:
| Letter | Terms multiplied | Produces |
|---|---|---|
| First | the term | |
| Outer | one term | |
| Inner | another term | |
| Last | the constant term |
Adding all four products together expands the product of two binomials into a trinomial:
The Outer and Inner products are both multiples of , so they combine into the single middle term .
Worked example
Multiply , so , , , .
- First: .
- Outer: .
- Inner: .
- Last: .
- Combine like terms: .
- Result: .
Worked example with a negative coefficient
Multiply , so , , , .
- First: .
- Outer: .
- Inner: .
- Last: .
- Combine like terms: .
- Result: .
The sign on carries through the Inner and Last products, so tracking signs carefully matters as much as the multiplication itself.
When the middle term disappears
Multiply , so , , , .
- First: .
- Outer: .
- Inner: .
- Last: .
- Combine like terms: — the Outer and Inner terms cancel.
- Result: .
This is the difference of two squares pattern: whenever the two binomials are , the middle term always cancels, leaving . See the Difference of Two Squares calculator to go the other direction — recognizing and factoring that pattern.
FOIL is the reverse of factoring
FOIL expands a product of two binomials into a polynomial. Factoring does the opposite: starting from a trinomial like , it finds the two binomials — and — that multiply back to it. The two operations undo each other, which is why checking a factored answer is as simple as running it back through FOIL.
Beyond two binomials
FOIL is a shortcut that only works for two binomials. Multiplying three or more expressions, or a binomial by a trinomial, still uses the same underlying idea — the distributive property, multiplying every term of one expression by every term of the other — but there is no four-letter mnemonic for it, since the number of term-pairs grows. FOIL's four letters exist specifically because pairs is a case worth memorizing.
Solving the expanded equation
If you FOIL two binomials and set the result equal to zero, you have a quadratic equation. The Quadratic Formula calculator solves any for its roots — a natural next step after expanding a factored form with FOIL.
Frequently asked questions
- What does FOIL stand for?
- FOIL stands for First, Outer, Inner, Last — the four multiplications needed to expand : the First terms (), the Outer terms (), the Inner terms (), and the Last terms (). Adding all four products expands the binomial product into a trinomial.
- Why do the two middle terms combine into one?
- The Outer product () and the Inner product () are both multiples of — "like terms" — so they add together into a single term: . The First product gives the term and the Last product gives the constant term, and neither has a like term to combine with.
- Is FOIL just the distributive property?
- Yes. FOIL is the distributive property applied twice: first distribute over , then distribute over , and add the results. FOIL is simply a memorable order (First, Outer, Inner, Last) for doing that distribution without missing a term — it only works for two binomials, while the distributive property itself works for any number of terms.
- What happens when a middle or constant term is 0?
- If the Outer and Inner products cancel out (), the term disappears entirely and the result is a binomial like instead of a trinomial — this is exactly the pattern behind the difference of two squares. Likewise, if the Last product is 0, the constant term is dropped from the expanded polynomial.
- How is FOIL the reverse of factoring?
- Factoring a trinomial like back into undoes exactly what FOIL does. FOIL expands a product of two binomials into a polynomial; factoring finds the two binomials that multiply back to a given polynomial — the two operations are inverses of each other.
- Can FOIL handle negative or decimal coefficients?
- Yes. Enter a negative coefficient with its sign, e.g. for , and the calculator carries that sign through every one of the four products. Decimal coefficients like work the same way, with every product computed exactly (no floating-point rounding).