About the FOIL Calculator
FOIL Calculator multiplies two binomials of the form (ax + b)(cx + d) and shows every step of the FOIL method: First, Outer, Inner and Last. Enter the numbers a, b, c and d, and choose your variable letter, and the page gives the four products, adds the two middle terms and writes the answer in standard form, such as 2x² − 7x − 15. It also points out special products, the perfect square and the difference of two squares, which have shortcuts. It is useful for algebra homework and for checking your own work.
Updated October 2026
How to use the FOIL Calculator
- 1Enter a and b for the first bracket (ax + b).
- 2Enter c and d for the second bracket (cx + d).
- 3Choose the letter you use for the variable.
- 4Read the four FOIL products and the combined answer.
- 5Copy the result.
The idea behind FOIL
Multiplying two brackets means multiplying every term of the first bracket by every term of the second. For two binomials that makes four products, and FOIL is a memory aid for listing them in order, so none is left out. Afterwards the two middle terms, which both contain x, are added together.
A worked example
For (2x + 3)(x − 5): First 2x·x = 2x², Outer 2x·(−5) = −10x, Inner 3·x = 3x and Last 3·(−5) = −15. The middle terms −10x and 3x combine to −7x, so the answer is 2x² − 7x − 15. Try your own numbers and compare each line with your working.
- Watch the signs: a minus sign belongs to the number after it
- Combine only like terms: x terms with x terms
- The answer has the form ax² + bx + c
Going the other way
Factoring a trinomial is FOIL in reverse. If you need to find the brackets that give x² + 8x + 15, look for two numbers that multiply to 15 and add to 8. A quadratic solver, or completing the square, helps when the numbers are not whole.
Related tools
Solve the resulting quadratic with the Quadratic Equation Solver, rewrite it with the Completing the Square Calculator and divide polynomials with the Synthetic Division Calculator. The Fraction Calculator helps with algebra fractions.
Features
- First, Outer, Inner and Last shown
- Combines like terms
- Works with negative numbers and decimals
- Spots perfect squares and differences of squares
- Any variable letter
- Private: nothing is uploaded
Frequently asked questions
What does FOIL stand for?
First, Outer, Inner, Last: the order in which you multiply the terms of two binomials. Add the four products to get the result.
How do I multiply (x + 3)(x + 5)?
First x·x = x², Outer x·5 = 5x, Inner 3·x = 3x, Last 3·5 = 15. Add: x² + 8x + 15.
Does FOIL work for three terms?
FOIL is only for two binomials. For longer brackets, multiply every term of the first by every term of the second and combine like terms.
What is a perfect square?
(x + b)² = x² + 2bx + b². The two middle terms are equal, so they double.
What is a difference of squares?
(x + b)(x − b) = x² − b². The Outer and Inner products cancel.
Can I use fractions?
Enter them as decimals, for example 0.5 for one half.
Is FOIL the same as the distributive property?
FOIL is the distributive property applied twice, arranged so that you do not miss a term.
How do I check my FOIL answer?
Put in a number for x, for example 1, and compare both sides. For (2x + 3)(x − 5) at x = 1 the left side is 5 × (−4) = −20 and 2 − 7 − 15 = −20 on the right.
What if one bracket has a negative leading term?
Enter a negative a or c. The calculator multiplies the signs for you and shows each product, which makes it a good way to practise sign rules.
Is my input stored?
No. It is calculated in your browser.