Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Answer
12x^2 - 5x - 2
The FOIL Method Step-by-Step
First 3x · 4x = 12x^2
Outer 3x · 1 = 3x
Inner -2 · 4x = -8x
Last -2 · 1 = -2
Together 12x^2 + 3x + (-8x) + (-2)
Simplified 12x^2 - 5x - 2

What is the FOIL Method?

FOIL is a memory aid for multiplying two binomials. The letters stand for First, Outer, Inner, Last — the four pairs of terms you multiply when expanding a product like \((a + b)(c + d)\). Because each binomial has exactly two terms, the distributive property produces exactly four products: \(ac\), \(ad\), \(bc\), and \(bd\). This calculator parses your two factors, computes every product, combines like terms, and shows the simplified polynomial.

Diagram showing FOIL arrows connecting terms of two binomials
FOIL connects First, Outer, Inner, and Last term pairs of the two binomials.

How to Use This Calculator

Type a product of two binomials in the Expand field, for example (3x - 2)(4x + 1). You can also enter a binomial squared such as (x - 5)^2, which is automatically rewritten as \((x - 5)(x - 5)\). Use the caret ^ for exponents (for example x^2). Coefficients of 1 may be omitted, and constants are allowed. Press calculate to see the answer plus a step-by-step breakdown.

The Formula Explained

For \((a + b)(c + d)\) you compute $$(a+b)(c+d) = \underbrace{a\cdot c}_{\text{First}} + \underbrace{a\cdot d}_{\text{Outer}} + \underbrace{b\cdot c}_{\text{Inner}} + \underbrace{b\cdot d}_{\text{Last}}$$ When multiplying monomials, multiply the coefficients and add the exponents of matching variables (\(x^{m}\cdot x^{n} = x^{m+n}\)). Finally, terms sharing the same variable and exponent are combined by adding their coefficients, and the result is sorted in descending order of degree.

Advertisement
Area model rectangle split into four parts representing FOIL products
The area model: a rectangle split into four regions matching \(ac\), \(ad\), \(bc\), and \(bd\).

Worked Example

Expand \((3x - 2)(4x + 1)\). First: \(3x\cdot 4x = 12x^{2}\). Outer: \(3x\cdot 1 = 3x\). Inner: \(-2\cdot 4x = -8x\). Last: \(-2\cdot 1 = -2\). Put them together: $$12x^{2} + 3x - 8x - 2$$ Combine the like terms \(3x\) and \(-8x\) to get \(-5x\). The simplified answer is \(12x^{2} - 5x - 2\).

FAQ

Does FOIL work for trinomials? No — FOIL is specific to multiplying two two-term factors. For longer factors you must distribute every term across every other term.

Can I use variables other than x? Yes, any single letter works, and products with two different variables (like \((x + y)(x - y) = x^{2} - y^{2}\)) are handled.

What if a coefficient is 1? You can omit it; the calculator treats x as 1x and displays results in standard simplified form.

Last updated: