The FOIL Calculator provided by Hesapstan expands products of two binomials in the form (ax+b)(cx+d). It shows the First, Outer, Inner, and Last products, combines the middle terms, and displays the simplified result. It is not a general polynomial multiplication, factoring, graphing, or symbolic-algebra tool.
FOIL splits binomial multiplication into four products
FOIL stands for First, Outer, Inner, Last. It is a mnemonic for expanding the product of two binomials by multiplying the two first terms, the two outer terms, the two inner terms, and the two last terms.
For (ax+b)(cx+d), the First product is ac·x², the Outer product is ad·x, the Inner product is bc·x, and the Last product is bd. After the two x-terms are combined, the result is acx²+(ad+bc)x+bd.
FOIL is not a separate law of algebra. It is the distributive property organized for the specific case of binomial times binomial.
This calculator shows each FOIL line separately
The tool asks for four numeric coefficients: a and b for the first binomial, c and d for the second binomial. It builds the preview expression, labels each FOIL product, then combines the middle terms and prints the expanded expression.
- Enter numeric values for a, b, c, and d.
- Check the preview of (ax+b)(cx+d).
- Read F for the First product ac·x².
- Read O and I for the two middle x-terms ad·x and bc·x.
- Read L for the Last product bd.
- Combine the middle terms to verify the final expression acx²+(ad+bc)x+bd.
The interface is coefficient-based. It does not parse arbitrary polynomial text; it builds the supported form (ax+b)(cx+d) from four required numeric inputs.
A worked example makes the FOIL order clear
Take (2x+3)(4x−5). Here a=2, b=3, c=4, and d=−5.
- F — First: (2x)(4x)=8x².
- O — Outer: (2x)(−5)=−10x.
- I — Inner: 3(4x)=12x.
- L — Last: 3(−5)=−15.
- Combine the middle terms: −10x+12x=2x.
- Final result: 8x²+2x−15.
The Outer and Inner products are both x-terms in this structured form, so their coefficients are added to create the middle term.
Difference of squares is the case where middle terms cancel
When the binomials have the form (x+a)(x−a), the Outer and Inner products have opposite signs. They cancel, leaving a difference of squares: x²−a².
For example, (x+2)(x−2) gives F=x², O=−2x, I=2x, and L=−4. Since −2x+2x=0, the final result is x²−4.
FOIL often produces a trinomial, but it does not have to. If the middle term becomes zero, the simplified result may have only two terms.
FOIL expansion and factoring are opposite directions
This calculator expands two binomials into a polynomial. If you start with an expression such as 8x²+2x−15 and want to recover two binomial factors, you need a factoring or reverse-FOIL tool instead.
- FOIL direction: (2x+3)(4x−5) → 8x²+2x−15.
- Reverse direction: 8x²+2x−15 → (2x+3)(4x−5).
- This page is for expansion, not for factoring the final expression.
FOIL is limited to binomial times binomial
The supported form is exactly (ax+b)(cx+d). Expressions with three terms in a factor, higher-degree terms such as x² inside a factor, symbolic coefficients, or general polynomial products are outside this calculator's scope.
Expressions like (x+1+2)(x−3) or (x²+1)(x+2) are not covered by the coefficient fields in this tool. They require a more general distribution process.
Zero coefficients are still valid. For example, b=0 makes the first binomial ax, and the calculator can still simplify the result while omitting zero terms.
The expanded result can lead to other algebra tasks
After FOIL, the output is usually a quadratic trinomial. You may then combine it with another polynomial, factor it, or study its root type with a discriminant tool.
- Use polynomial addition/subtraction when the expanded expression must be combined with another polynomial.
- Use reverse FOIL when you want to factor a trinomial back into two binomials.
- Use a discriminant calculator when you want to know the root type of the resulting quadratic.
- Use completing the square when you want another step-by-step quadratic method.
Frequently Asked Questions
What does FOIL stand for?
FOIL stands for First, Outer, Inner, Last — the four products used to expand two binomials.
What form does this calculator support?
It supports products in the coefficient form (ax+b)(cx+d), using four numeric inputs a, b, c, and d.
Why does FOIL only work for binomials?
The mnemonic counts exactly four products between two two-term expressions. More terms require the general distributive property.
Why do I combine the Outer and Inner terms?
In (ax+b)(cx+d), the Outer and Inner products are both x-terms, so they are like terms and their coefficients are added.
Why does (x+2)(x−2) become x²−4?
The middle terms −2x and 2x cancel, leaving x²−4, which is the difference of squares pattern.
Does this calculator factor trinomials?
No. It expands two binomials. Factoring a trinomial back into binomials is the reverse operation.
Can I use negative coefficients?
Yes. Negative coefficients are supported and the signs are reflected in each FOIL step.
Is the result always a trinomial?
No. If the middle terms or another term become zero, the simplified result may have fewer terms or even be 0.