Part of the Maths & Statistics suite · 235 calculators

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).

Results update as you type
Results
Expanded
8x² + 2x - 15
First
Outer
Inner
Last
The product written out
Recognised pattern
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows the national curriculum (maths, brackets, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About foil

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

InputsExpandedNote
(2x + 3)(4x − 5)8x² + 2x - 158x² + 2x − 15
(x + 4)(x − 4)x² - 16x² − 16, a difference of squares
(x + 3)²x² + 6x + 9x² + 6x + 9

Frequently 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

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.