Foil Calculator - Multiply Two Binomials

Use this foil calculator to expand (ax + b)(cx + d) into the trinomial acx² + (ad + bc)x + bd, with First, Outer, Inner, and Last products labeled for each step.

Updated: June 16, 2026 • Free Tool

Foil Calculator

Coefficient of x in (ax + b). Default 2 matches the (2x + 3)(4x + 5) example.

Constant term of the first binomial. Use a negative value for (ax - something).

Coefficient of x in (cx + d). Default 4 matches the (2x + 3)(4x + 5) example.

Constant term of the second binomial. Use a negative value for (cx - something).

Results

Expanded Trinomial
0
First (ac·x²) 0
Outer (ad·x) 0
Inner (bc·x) 0
Last (bd) 0

What Is the Foil Method?

A foil calculator multiplies two binomials using the FOIL method, which stands for First, Outer, Inner, Last. It takes the four coefficients of (ax + b) and (cx + d), labels the four products, and combines them into the trinomial acx² + (ad + bc)x + bd so you can check homework or set up a quadratic in one step. The result panel keeps every intermediate product visible so the algebra stays transparent.

  • Algebra 1 and Algebra 2 homework: Using a foil calculator on (2x + 3)(4x + 5), (x - 4)(x + 4), or (3x + 2)(x - 7) lets a student verify each product and the trinomial.
  • Verifying expanded trinomials before factoring: When you factor x² + 5x + 6 back into (x + 2)(x + 3), the expansion confirms the factoring is correct, which is the inverse workflow teachers use.
  • Setting up a quadratic equation: After expanding two binomials, the trinomial can be set equal to zero and solved with the quadratic formula. The expansion gives the exact A, B, and C coefficients.
  • Difference of squares and other special products: Patterns such as (a + b)(a - b) = a² - b² and (x + r)(x + s) = x² + (r + s)x + rs are FOIL expansions with cancellation, so the tool handles them the same way.

Binomial multiplication connects factoring trinomials and the quadratic formula, so an off-by-a-sign answer can break the next three steps. The result panel labels each product and shows the trinomial in standard form. For a wider polynomial toolkit that includes the same identity plus addition, subtraction, and long division, see the add and subtract polynomials calculator.

How the Foil Method Works

The tool applies the identity (ax + b)(cx + d) = acx² + (ad + bc)x + bd by reading four integer coefficients, computing the four products in FOIL order, and combining the Outer and Inner products into the x coefficient. It also returns the raw coefficient values for the next step.

(ax + b)(cx + d) = ac·x² + (ad + bc)·x + bd
  • a: Coefficient of x in (ax + b). Defaults to 2.
  • b: Constant of (ax + b). Negative for subtraction, e.g. b = -3 for (2x - 3).
  • c: Coefficient of x in (cx + d). Defaults to 4.
  • d: Constant of (cx + d). Negative for subtraction.

The four products are computed in FOIL order so the steps line up with what students write on paper, and the trinomial drops any zero terms. According to Wolfram MathWorld, the binomial product identity extended to (ax + b)(cx + d) = acx² + (ad + bc)x + bd is the algebraic foundation of the FOIL method.

Worked example: (2x + 3)(4x + 5)

a = 2, b = 3, c = 4, d = 5.

First = 8, Outer = 10, Inner = 12, Last = 15. The x coefficient is Outer + Inner = 22.

Expanded trinomial: 8x² + 22x + 15.

This is the same trinomial a student would write on a worksheet, and the four labeled products confirm where each coefficient came from.

Worked example: (x + 4)(x - 4) - difference of squares

a = 1, b = 4, c = 1, d = -4.

First = 1, Outer = -4, Inner = 4, Last = -16. The x coefficient is -4 + 4 = 0.

Expanded trinomial: x² - 16.

The Outer and Inner cancel because the constants are opposite, which is the difference of squares identity. To confirm the factoring works the other way, the factoring trinomials calculator expands a trinomial like x² - 16 back into (x + 4)(x - 4).

According to Wolfram MathWorld, the binomial product identity (a + b)(c + d) = ac + ad + bc + bd, extended to (ax + b)(cx + d) = acx² + (ad + bc)x + bd, is the algebraic foundation of the FOIL method

Key Concepts Explained

Four ideas cover every result the panel shows:

First, Outer, Inner, Last

FOIL is a memory aid for the order of the four cross-products: First pairs the two x terms (ac), Outer pairs the x term of the first with the constant of the second (ad), Inner pairs the constant of the first with the x term of the second (bc), and Last pairs the constants (bd).

Distributive property (the real reason FOIL works)

FOIL is the distributive property applied twice. Multiplying (ax + b) by each term of the second binomial gives ax·cx + ax·d, then multiplying b by each term gives b·cx + b·d, exactly the four FOIL products.

Combining the Outer and Inner products

The Outer and Inner are both x terms, so they combine into the single x coefficient. When their signs match, the magnitudes add. When they differ, the magnitudes subtract.

Difference of squares (a + b)(a - b) = a² - b²

When the two binomials share an x term and the constants are opposites, the Outer and Inner cancel and the trinomial collapses to a² - b², the same pattern used when a teacher factors x² - 9 into (x + 3)(x - 3).

The combination of Outer and Inner is what makes a trinomial have three terms at most, and the difference of squares pattern is the gateway to factoring by grouping. To see the trinomial acx² + (ad + bc)x + bd drawn as a parabola with its roots, vertex, and intercepts on the standard coordinate plane, the polynomial graphing calculator accepts the same A, B, and C coefficients that this calculator outputs.

How to Use the Foil Method

Five short steps are enough to get a trustworthy binomial product.

  1. 1 Identify the two binomials: Rewrite the problem as (ax + b)(cx + d) so the four coefficients are clear. If the original is (2x - 3)(4x - 5), then a = 2, b = -3, c = 4, d = -5.
  2. 2 Enter a and b for the first binomial: Type the x coefficient in 'a' and the constant in 'b'. Use a negative sign for the constant when the binomial subtracts (for example, b = -3 for 2x - 3).
  3. 3 Enter c and d for the second binomial: Type the x coefficient in 'c' and the constant in 'd', again keeping negative signs on the constants when the second binomial uses subtraction.
  4. 4 Read the four labeled FOIL products: The result panel shows the First, Outer, Inner, and Last products in the standard order, each written as the two factors multiplied and the resulting term.
  5. 5 Read the expanded trinomial: The primary result is the combined trinomial in standard form, e.g. '8x² + 22x + 15' for (2x + 3)(4x + 5). Zero terms are dropped, so the difference of squares (x + 4)(x - 4) shows 'x² - 16' without an x term.

Practical example: to expand (3x + 2)(x - 7), enter a = 3, b = 2, c = 1, d = -7. The result panel shows First = '3x × x = 3x²', Outer = '3x × -7 = -21x', Inner = '2 × x = 2x', Last = '2 × -7 = -14', and the trinomial '3x² - 19x - 14'.

Why Use a Foil Calculator

A purpose-built FOIL tool saves time and removes the most common binomial errors.

  • Removes sign and combination errors: Negative constants, mixed signs on the Outer and Inner products, and the difference of squares pattern are the three places hand-multiplied binomials go wrong. The tool handles each sign combination.
  • Shows every FOIL product in the standard order: Reading the four labeled products in First, Outer, Inner, Last order matches what a student writes, so the tool doubles as a worked-example viewer for any pair of binomials.
  • Drops zero terms in the final trinomial: When a coefficient or constant is zero, the trinomial skips that term instead of printing '0x² + 12x + 15'. The cleaner form makes the next step easier to read.
  • Feeds the quadratic formula directly: The expanded trinomial gives the A, B, and C coefficients for the quadratic formula. The next step is to copy the trinomial into the quadratic formula calculator and solve for the roots of acx² + (ad + bc)x + bd = 0.
  • Default example matches classroom worksheets: The page loads with (2x + 3)(4x + 5) as the working example, the same pair many textbooks use. First-time users see the four products and the trinomial on the first load.

Once the trinomial is in hand, the rest of the algebra problem becomes routine. The same coefficients plug into the quadratic formula, polynomial graphing, or back into a factoring step.

Factors That Affect Your Results

Three sign patterns determine the shape of the trinomial, and two limitations tell you when to double-check by hand.

Sign of the constants b and d

A negative constant on either binomial flips the sign of every product that contains it, which is how (ax - 3)(cx - 5) gives the same Outer and Inner signs as (ax + 3)(cx + 5) with both flipped.

Magnitude of the Outer and Inner products

The x coefficient is Outer + Inner, so when their magnitudes are similar, the x term shrinks. The difference of squares pattern is the extreme case where the x term vanishes.

Zero coefficients in either binomial

Setting a to zero collapses the First and Outer products, so the trinomial becomes (bc)x + bd. Setting b to zero collapses the Inner and Last, so the trinomial becomes acx² + adx.

  • The tool expands two binomials only. For (ax + b)(cx + d)(ex + f), the result is a higher-degree polynomial that needs a general expansion tool.
  • Coefficients are restricted to the safe range -99 to 99 so the displayed products and trinomial stay readable. The form shows an inline error and stops the calculation when any input falls outside that range, so an out-of-range entry never reaches the multiplication step.

These conventions match the standard classroom expansion, so the trinomial on the page is the one a teacher would accept. The input/output layout also matches the Omni Calculator FOIL page, which uses four coefficient inputs and reports the four products together with the combined trinomial sum.

According to Omni Calculator, the standard FOIL calculator uses four coefficient inputs (a, b, c, d) for (ax + b) and (cx + d), and reports the four products together with the combined trinomial sum

For higher-degree products and quotients that go beyond two binomials, the polynomial division calculator handles long division of polynomials by x - r in the same coefficient-driven workflow.

Foil calculator showing two binomials (ax + b) and (cx + d) being expanded into the acx² + (ad + bc)x + bd trinomial with labeled First, Outer, Inner, and Last products
Foil calculator showing two binomials (ax + b) and (cx + d) being expanded into the acx² + (ad + bc)x + bd trinomial with labeled First, Outer, Inner, and Last products

Frequently Asked Questions

Q: How do you use the FOIL method to multiply two binomials?

A: Write the two binomials as (ax + b) and (cx + d), then compute the four products in order: First = a·c, Outer = a·d, Inner = b·c, Last = b·d. Combine them into the trinomial acx² + (ad + bc)x + bd, dropping any zero terms before you read the final answer.

Q: What does FOIL stand for in math?

A: FOIL is a memory aid for First, Outer, Inner, Last. First pairs the two x terms, Outer pairs the x term of the first binomial with the constant of the second, Inner pairs the constant of the first with the x term of the second, and Last pairs the two constants. The four products then combine into one trinomial.

Q: What is the difference between the FOIL method and the distributive property?

A: There is no mathematical difference. FOIL is just the distributive property applied twice: multiplying the first binomial by each term of the second, then multiplying the second term of the first binomial by each term of the second. FOIL is the classroom mnemonic for those four cross-products in their standard order.

Q: How do you multiply binomials with negative numbers using FOIL?

A: Treat the negative sign as part of the coefficient when you enter it, so (2x - 3) becomes a = 2, b = -3. The tool then carries the sign through each product. For (2x - 3)(4x - 5), the Outer and Inner products are both negative and add to -22x, giving the trinomial 8x² - 22x + 15.

Q: Can FOIL be used to multiply two binomials with subtraction?

A: Yes. Enter the negative constants as negative numbers in the b and d fields and the same identity applies. For (3x + 2)(x - 7), the Outer product is negative, the Inner product stays positive, and they combine into -19x in the final trinomial 3x² - 19x - 14.

Q: What is the difference of squares pattern in FOIL?

A: When the two binomials share an x term and the constants are opposites, the Outer and Inner products cancel exactly. For (x + 4)(x - 4), the Outer is -4x and the Inner is 4x, so the x term disappears and the trinomial collapses to x² - 16. This is the same a² - b² pattern used to factor x² - 16 back into (x + 4)(x - 4).