Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library

Unlock Unlimited Help

Try unlimited chats, explanations, practice, flashcards, and more free for 7 days.

7 days free · cancel anytime

MathGPT Unlimited

  • Chats and explanations
  • Personalized practice exams
  • Custom study guides
  • Flashcard sets
  • Interactive graphs
  • Cancel anytime
Choose a billing period
Ask a parent to pay

No charge for 7 days. After the trial, your selected plan renews automatically until cancelled. Cancel anytime from your plan page; payments are processed securely by Stripe.

Expand two binomials with the FOIL method

Use the free foil calculator to model the algebraic relationship, calculate the requested quantity, and verify it in the original expression. Choose a focused operation below to calculate, inspect the method, and connect the result to a visual model.

The visual updates with your calculation.

Result—Choose a mode, enter the known values, and calculate.
Show your work Step-by-step method
  1. The calculation method and verification will appear here.
Ask MathGPT for a full symbolic explanation →
Algebra

FOIL Calculator explained

The short version

  • FOIL is a checklist for multiplying two brackets: First, Outer, Inner, Last, so no pair gets missed.
  • The Outer and Inner products are the ones that usually combine into the middle term of the answer.
  • FOIL only covers a two-term bracket times a two-term bracket. Anything bigger needs plain distribution.

The formula this page uses

(a + b)(c + d) = ac + ad + bc + bd

What each part means

SymbolWhat it means
F — First termsThe leading term of each bracket, multiplied together. This gives the highest power.
O — Outer termsThe very first term times the very last one.
I — Inner termsThe two terms sitting next to each other in the middle.
L — Last termsThe trailing term of each bracket. Signs matter here more than anywhere.

Show your work: a full example

  1. The product(3x − 4)(2x + 7)
  2. First: 3x times 2x6x²
  3. Outer: 3x times 721x
  4. Inner: −4 times 2x−8x
  5. Last: −4 times 7−28
  6. Add the four pieces6x² + 21x − 8x − 28
  7. Combine the two middle terms6x² + 13x − 28

A second, different case

  1. A different case: one bracket has three terms(x + 2)(x² − 3x + 5)
  2. FOIL has only four slots, so it cannot cover six productsuse plain distribution instead
  3. Multiply x through the second bracketx³ − 3x² + 5x
  4. Multiply 2 through the second bracket2x² − 6x + 10
  5. Stack the two rowsx³ − 3x² + 5x + 2x² − 6x + 10
  6. Combine the x² terms and the x terms−3x² + 2x² = −x², and 5x − 6x = −x
  7. Finished productx³ − x² − x + 10
Copy-ready example

(3x − 4)(2x + 7)

The product

Where the middle term comes from, product by product

ProductFOILSimplified
(x + 5)(x + 3)x²3x5x15x² + 8x + 15
(x + 7)(x − 2)x²−2x7x−14x² + 5x − 14
(x + 5)(x − 5)x²−5x5x−25x² − 25
(2x + 3)(2x − 3)4x²−6x6x−94x² − 9
(x + 5)²x²5x5x25x² + 10x + 25
(x − 5)²x²−5x−5x25x² − 10x + 25
(3x − 4)(2x + 7)6x²21x−8x−286x² + 13x − 28

Three mistakes to check for

What students writeWhy it's wrongDo this instead
(x + 5)² = x² + 25Only First and Last were done. Squaring a bracket is still two brackets multiplied, so Outer and Inner are both 5x.Write it out: x² + 5x + 5x + 25 = x² + 10x + 25.
(3x − 4)(2x + 7) = 6x² − 28The Outer and Inner products were skipped entirely, so the whole middle term vanished.Include them: 21x − 8x = 13x, giving 6x² + 13x − 28.
Taking the Inner product of (3x − 4)(2x + 7) as 4 × 2x = 8xThe minus belongs to the 4 and travels with it into every product it joins.Keep the sign: −4 × 2x = −8x, so the middle is 21 − 8 = 13, not 21 + 8 = 29.

Questions about the FOIL Calculator

Can FOIL multiply a two-term bracket by a three-term one?

No, and that is its only real limitation. (x + 2)(x² − 3x + 5) needs six products, and FOIL has four named slots. Distribute each term of the short bracket across the long one instead.

Why do the middle terms disappear in (x + 5)(x − 5)?

Because Outer gives −5x and Inner gives +5x, which cancel exactly. That only happens when the two brackets are identical except for the sign, which is why this pattern is called a difference of squares.

Is FOIL a different rule from the distributive property?

No, it is the distributive property applied twice, with the four products given names so they are easier to keep track of. Once you are comfortable, most people stop naming them and just multiply everything by everything.

Does it matter whether I do Outer before Inner?

Not at all. Addition can be reordered, so 6x² − 8x + 21x − 28 gives the same 6x² + 13x − 28. The order is only there so you can tick off four products and be sure none was forgotten.

Where to go next

Calculate, interpret, verify.

This workspace keeps the formula and the meaning together. Decimal results are rounded for display; retain full precision when you continue a calculation.

01

Enter known values

Match each input to the quantities in the problem and keep units consistent.

02

Use the relationship

The result panel identifies the formula or algorithm and shows the main substitutions.

03

Read the visual

Use the diagram, plot, or data display to check scale, direction, and plausibility.

04

Practice unaided

Move to targeted questions once you can explain why the method applies.

Continue from this result

Turn one calculation into understanding.

Compare another tool, review the underlying idea, then solve a fresh problem without copying the example.

Recommended next tools

Calculators that work well with this one

See all calculators →

Algebra calculator

Evaluate algebraic relationships and inspect the working.

Open free tool

Quadratic formula calculator

Find roots and connect the discriminant to the graph.

Open free tool

Graphing calculator

Compare equations, roots, intercepts, and inequalities visually.

Open free tool
Learn the mathematics

Understand algebra behind this calculator

A calculator confirms an answer. Working the method yourself is what makes the next problem faster.