# How do I FOIL binomials?

Multiplies two binomials by the FOIL method: the first, outer, inner and last products, their sum, and the answer with like terms combined, in exact fractions.

- Page: https://www.acalculator.org/math/foil-calculator
- JSON spec: https://www.acalculator.org/math/foil-calculator.json
- Version: 77ac617d3659

## Default answer

Example with the default inputs (Two binomials (2x - 18)(3x + 3)): (2x - 18)(3x + 3) = 6x^2 - 48x - 54.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| e | Two binomials | Two binomials in brackets, such as (2x + 3)(x − 5). |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| result | Product | The product with like terms combined. |
| first | First | First term × first term. |
| outer | Outer | First term of the first bracket × last term of the second. |
| inner | Inner | Last term of the first bracket × first term of the second. |
| last | Last | Last term × last term. |
| steps | FOIL steps | Each product, their sum, and the sum with like terms combined. |

## Method

(a + b)(c + d) = ac + ad + bc + bd: First ac, Outer ad, Inner bc, Last bd; then like terms are combined in exact fractions.

## Assumptions

- Each bracket holds exactly two unlike terms. Coefficients are exact fractions: 0.5 is 1/2.
- The first and last term of each bracket are taken in the order typed.

## Worked examples

1. e = (2x - 18)(3x + 3) gives result = 6x^2 - 48x - 54, first = 6x², outer = 6x, inner = −54x, last = −54, steps = First: 2x × 3x = 6x²; Outer: 2x × 3 = 6x; Inner: (−18) × 3x = −54x; Last: (−18) × 3 = −54; Add: 6x² + 6x − 54x − 54; Combine like terms: 6x² − 48x − 54. Source: OpenStax, Algebra and Trigonometry 2e, §1.4 Polynomials, Example 5 ((2x − 18)(3x + 3) = 6x² − 48x − 54), https://openstax.org/books/algebra-and-trigonometry-2e/pages/1-4-polynomials.
2. e = (9x + 4)(9x - 4) gives result = 81x^2 - 16, outer = −36x, inner = 36x. Source: OpenStax, Algebra and Trigonometry 2e, §1.4 Polynomials, Example 7 ((9x + 4)(9x − 4) = 81x² − 16), https://openstax.org/books/algebra-and-trigonometry-2e/pages/1-4-polynomials.
3. e = (3x - 8)(3x - 8) gives result = 9x^2 - 48x + 64. Source: OpenStax, Algebra and Trigonometry 2e, §1.4 Polynomials, Example 6 ((3x − 8)² = 9x² − 48x + 64), https://openstax.org/books/algebra-and-trigonometry-2e/pages/1-4-polynomials.
4. e = (x + 2y)(0.5x - y) gives result = x^2/2 - 2y^2, first = x²/2, outer = −x y, inner = x y, last = −2y².

## FAQ

### What does FOIL stand for?

First, Outer, Inner, Last. To multiply (a + b)(c + d), multiply the first terms (ac), the outer terms (ad), the inner terms (bc) and the last terms (bd), then add the four products.

### Is FOIL the same as the distributive property?

Yes. FOIL is the distributive property used twice: (a + b)(c + d) = a(c + d) + b(c + d) = ac + ad + bc + bd. It only names the four products in an order that is easy to remember.

### Can I use FOIL for a binomial times a trinomial?

No. FOIL covers two terms times two terms, which gives four products. For longer brackets, multiply every term of one bracket by every term of the other (the distributive property calculator does this).

### Why do the outer and inner terms often combine?

When both binomials are in the same letter, the outer and inner products are like terms. In (2x − 18)(3x + 3) they are 6x and −54x, which add to −48x.

### What happens with (a + b)(a − b)?

The outer and inner products cancel, so the answer is a difference of squares: (9x + 4)(9x − 4) = 81x² − 16.

### How do I square a binomial with FOIL?

Write the binomial twice: (3x − 8)² = (3x − 8)(3x − 8) = 9x² − 24x − 24x + 64 = 9x² − 48x + 64.

## Sources

- OpenStax, Algebra and Trigonometry 2e, §1.4 Polynomials (FOIL: multiply the first, outer, inner and last terms; Example 5: (2x − 18)(3x + 3) = 6x² − 48x − 54; Example 6: (3x − 8)² = 9x² − 48x + 64; Example 7: (9x + 4)(9x − 4) = 81x² − 16). https://openstax.org/books/algebra-and-trigonometry-2e/pages/1-4-polynomials (retrieved 2026-10-05)
