Expand & FOIL Calculator
Multiply two expressions and simplify — the exact reverse of everything else on this site.
Expanding Is Factoring in Reverse
Every calculator elsewhere on this site takes an expanded expression and breaks it into factors. This one runs the process backwards: give it two factors, and it multiplies them out into a single expanded polynomial. If you’ve ever wanted to double-check a factoring answer, this is how — factor something, then expand your answer back out and confirm you land on the original expression.
FOIL (First, Outer, Inner, Last) is just a memory aid for the specific case of multiplying two binomials — two two-term expressions. The calculator also handles longer expressions, like a binomial times a trinomial, using the same distribution idea without needing a special acronym for it.
FOIL, for two binomials (a+b)(c+d)
ac + ad + bc + bd — then combine any like terms.
Two Worked Examples
Example 1 — FOIL on two binomials
First: 2x × x = 2x². Outer: 2x × −4 = −8x. Inner: 3 × x = 3x. Last: 3 × −4 = −12.
Combine: 2x² − 8x + 3x − 12. The two middle terms are like terms, so they merge: 2x² − 5x − 12.
You can check this against the General Trinomial Calculator — factoring 2x² − 5x − 12 should return you right back to (2x + 3)(x − 4).
Example 2 — a binomial times a trinomial
Here FOIL doesn’t apply directly since the second factor has three terms, but the underlying idea — distribute every term of the first factor across every term of the second — works exactly the same way.
x × (x² − 3x + 5) = x³ − 3x² + 5x, and 2 × (x² − 3x + 5) = 2x² − 6x + 10. Add them: x³ − 3x² + 5x + 2x² − 6x + 10, which combines to x³ − x² − x + 10.
Common Mistakes
- Forgetting the Outer and Inner terms. It’s easy to multiply First and Last correctly and forget the two cross terms in between — those are exactly what usually creates the middle term of a trinomial.
- Sign errors on negative terms. If either binomial has a minus sign, every product it touches needs that sign carried through carefully.
- Not combining like terms at the end. FOIL gives you four separate terms — the answer isn’t finished until the two middle ones (when they’re like terms) are added together.
- Applying FOIL to expressions that aren’t both binomials. FOIL specifically means two two-term expressions. For anything longer, fall back to full distribution, like Example 2 above.
