FOIL Calculator
Multiply two binomials and see each of the four products — First, Outer, Inner, Last.
FOIL is a mnemonic for multiplying (ax + b)(cx + d): First (ax·cx), Outer (ax·d), Inner (b·cx), Last (b·d).
How the foil calculator works
FOIL is a mnemonic for multiplying (ax + b)(cx + d): First (ax·cx), Outer (ax·d), Inner (b·cx), Last (b·d). Add the four and collect the middle terms.
It is worth being clear that FOIL is not a rule, just a way to remember the distributive law for this one case. It does not extend to trinomials or longer expressions — for those you distribute every term across every other, which is what FOIL is a special case of.
Formula: (ax + b)(cx + d) = acx² + (ad + bc)x + bd
Worked examples
| Inputs | Expanded | Note |
|---|---|---|
| (2x + 3)(4x − 5) | 8x² + 2x - 15 | 8x² + 2x − 15 |
| (x + 4)(x − 4) | x² - 16 | x² − 16, a difference of squares |
| (x + 3)² | x² + 6x + 9 | x² + 6x + 9 |
FAQFrequently asked questions
What does FOIL stand for?
First, Outer, Inner, Last — the four products when multiplying two binomials.
Does FOIL work for trinomials?
No. It is only the two-by-two case. For longer expressions, multiply every term by every term.
What is (x + a)(x − a)?
x² − a², the difference of two squares. The middle terms cancel.
Why does the middle term sometimes vanish?
Because the Outer and Inner products are equal and opposite, which happens exactly when the constants are negatives of each other.
Is FOIL a real rule?
It is a mnemonic for the distributive law, not a rule of its own. Understanding the distribution is what generalises.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Australian Curriculum (ACARA) — Mathematics — the terms and methods taught in Australian schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.