Skip to content

Free browser tools that respect your files: everything runs locally, nothing is uploaded.

FOIL Calculator

Multiply two binomials using the FOIL method (First, Outer, Inner, Last). See step-by-step solutions showing how to expand (ax + b)(cx + d).

Enter Binomials

Enter coefficients for (ax + b)(cx + d)

First Binomial (ax + b)

(x + 3)

Second Binomial (cx + d)

(x + 2)

Multiplying:

(x + 3) * (x + 2)

FOIL Visualization

First

1x * 1x

1x^2

Outer

1x * 2

2x

Inner

3 * 1x

3x

Last

3 * 2

6

Result

Expanded (before combining):

1x^2 +2x +3x +6

Simplified (final answer):

x^2 + 5x + 6

x^2 coefficient

1

x coefficient

5

constant

6

Step-by-Step Solution

F

First

1 * 1 = 1

1x^2

O

Outer

1 * 2 = 2

2x

I

Inner

3 * 1 = 3

3x

L

Last

3 * 2 = 6

6

+

Combine Like Terms

2x + 3x = 5x

x^2 + 5x + 6

Special FOIL Patterns

Perfect Square

(a + b)^2 = a^2 + 2ab + b^2

(a - b)^2 = a^2 - 2ab + b^2

Difference of Squares

(a + b)(a - b) = a^2 - b^2

Sum/Product Pattern

(x + a)(x + b) = x^2 + (a+b)x + ab

Try These Examples

Quick-start with common scenarios

Practice Problems

Test your skills with practice problems

Practice with 3 problems to test your understanding.

?What is the FOIL Method?

FOIL is a method to multiply two binomials: (a + b)(c + d). FOIL stands for First, Outer, Inner, Last. Multiply: First terms (a times c), Outer terms (a times d), Inner terms (b times c), Last terms (b times d). Then add: ac + ad + bc + bd. Example: (x + 3)(x + 2) = x^2 + 2x + 3x + 6 = x^2 + 5x + 6.

Your Results

Results are also pinned to the bottom of your screen.

Result

Product

x^2 + 5x + 6

(x + 3) * (x + 2)

First (F)1x^2
Outer (O)2x
Inner (I)3x
Last (L)6
Formula:

Understanding FOIL

FOIL is a mnemonic for multiplying two binomials (expressions with two terms each). The letters stand for First, Outer, Inner, Last, representing which terms to multiply together. When multiplying (a + b)(c + d), you multiply the First terms (a and c), the Outer terms (a and d), the Inner terms (b and c), and the Last terms (b and d), then add all products together. FOIL is actually just a special case of the distributive property.

Key Facts

  • FOIL stands for First, Outer, Inner, Last
  • (a + b)(c + d) = ac + ad + bc + bd
  • FOIL only works for multiplying two binomials (two-term expressions)
  • The middle terms (Outer + Inner) often combine into a single term
  • Result is typically a trinomial (three terms) after combining like terms
  • (x + a)(x + b) = x^2 + (a+b)x + ab - a useful pattern
  • (a + b)^2 = a^2 + 2ab + b^2 - perfect square trinomial
  • (a + b)(a - b) = a^2 - b^2 - difference of squares

Frequently Asked Questions

What does FOIL stand for?

FOIL is an acronym for First, Outer, Inner, Last. It describes the order in which you multiply terms when expanding the product of two binomials: (a + b)(c + d). First means multiply a times c, Outer means a times d, Inner means b times c, and Last means b times d.

How do you use the FOIL method step by step?

Step 1: Multiply the First terms (first term of each binomial). Step 2: Multiply the Outer terms (first of first, last of second). Step 3: Multiply the Inner terms (last of first, first of second). Step 4: Multiply the Last terms (last term of each). Step 5: Add all four products. Step 6: Combine like terms to simplify.

When can you use the FOIL method?

FOIL specifically works for multiplying two binomials (expressions with exactly two terms each). For multiplying a binomial by a trinomial, or two trinomials, you need to use the full distributive property, multiplying each term in the first polynomial by each term in the second. FOIL is really just a mnemonic for the distributive property applied to binomials.

What are the special FOIL patterns?

Three important patterns: (1) Perfect square: (a + b)^2 = a^2 + 2ab + b^2, (2) Difference of squares: (a + b)(a - b) = a^2 - b^2, (3) Standard trinomial: (x + a)(x + b) = x^2 + (a+b)x + ab. Recognizing these patterns speeds up multiplication and factoring.

Why do the middle terms sometimes combine?

The Outer and Inner products often contain like terms (same variable to the same power). For example, in (x + 3)(x + 2), the Outer is 2x and Inner is 3x. Since both are "x to the first power" terms, they combine to give 5x. This is why the result is usually a trinomial rather than four terms.

How is FOIL related to the distributive property?

FOIL is really just a specific application of the distributive property. When you distribute (a + b)(c + d), you get a(c + d) + b(c + d) = ac + ad + bc + bd. This is exactly what FOIL produces. FOIL is simply a mnemonic to help remember all four multiplications.

What is the reverse of FOIL?

The reverse of FOIL is factoring. If you have a trinomial like x^2 + 5x + 6, you can factor it back into (x + 2)(x + 3). To factor x^2 + bx + c, find two numbers that multiply to c and add to b. Those become the constants in your binomial factors.

Can FOIL be used with negative numbers?

Yes, FOIL works with any numbers including negatives. Just be careful with signs. For example, (x - 3)(x + 2): First = x^2, Outer = 2x, Inner = -3x, Last = -6. Result: x^2 + 2x - 3x - 6 = x^2 - x - 6. Remember that minus times plus gives minus.

Last updated: 2026-01-15

By Joseph OrdunaHow this works

How this works

Formulas follow standard definitions from the NIST Digital Library of Mathematical Functions and classical textbook derivations. Calculations run entirely in your browser. Where a closed-form solution exists, it is used; where an iterative or numerical method is required, the implementation is named on the page.

Sources

  1. [1]
    NIST Digital Library of Mathematical Functions
    Academicdlmf.nist.govAccessed Apr 21, 2026
Joseph Orduna
Founder & Software Engineer

Full-stack software engineer specializing in embedded systems, web architecture, and AI/ML. Founder of Practical Web Tools. Built the gesture-controlled drone IP acquired by KD Interactive (Aura Drone, sold on Amazon).