Reverse FOIL Calculator
Enter the three coefficients of your quadratic trinomial (ax squared + bx + c) and this calculator will factor it into two binomials using the reverse FOIL method. You get the factored form, the pair of integers at the heart of the AC method, a full step-by-step breakdown showing every grouping step, and an explanation of why the result works.
Formula
Worked example
Factor 2x^2 - 3x - 2. Here a=2, b=-3, c=-2. Compute a x c = 2 x (-2) = -4. Find m, n: m x n = -4 and m + n = -3. That gives m=1, n=-4 (1 x (-4) = -4 and 1 + (-4) = -3). Rewrite: 2x^2 + x - 4x - 2. Group: x(2x+1) - 2(2x+1). Factor out (2x+1): (2x+1)(x-2). Check with FOIL: first 2x*x = 2x^2, outer 2x*(-2) = -4x, inner 1*x = x, last 1*(-2) = -2. Sum: 2x^2 - 3x - 2. Correct.
What is the reverse FOIL method?
FOIL stands for First, Outer, Inner, Last and is the standard way to multiply two binomials. For example, (2x + 1)(x - 2) expands by multiplying the First terms (2x*x = 2x^2), Outer (2x*(-2) = -4x), Inner (1*x = x), and Last (1*(-2) = -2), then collecting like terms to get 2x^2 - 3x - 2. Reverse FOIL runs this process backward: you start with the trinomial 2x^2 - 3x - 2 and work out which pair of binomials must have produced it. The systematic way to do this is the AC method (also called splitting the middle term), which avoids guessing by turning the problem into finding two integers with a known product and a known sum.
How to apply the AC method step by step
Start with ax^2 + bx + c. 1. If a, b, and c share a common factor, divide all three by it first and keep track of it. 2. Multiply a by c to get the target product, call it P. 3. Find two integers m and n so that m times n equals P and m plus n equals b. 4. Rewrite the trinomial as ax^2 + mx + nx + c (the order of m and n does not matter). 5. Group the four terms into two pairs: (ax^2 + mx) + (nx + c). 6. Factor out the greatest common factor from each pair. 7. You will see the same binomial appear in both groups. Factor it out. 8. Reattach any overall GCF you removed in step 1. If no integer pair (m, n) exists in step 3, the trinomial is irreducible over the integers (prime polynomial). You can still find its roots using the quadratic formula, but they will be irrational or complex.
Recognising special forms before you start
Three patterns let you skip the AC method entirely. A perfect square trinomial has the form a^2*x^2 + 2abx + b^2 and factors as (ax + b)^2. A difference of squares (b term is zero) has the form a^2*x^2 - c^2 and factors as (ax + c)(ax - c). If the leading coefficient is 1 (just x^2 + bx + c), you only need two numbers that multiply to c and add to b, so trial factors of c suffice without the full AC procedure. Checking for a GCF first also simplifies any of these cases.
When can a quadratic not be factored over the integers?
A quadratic trinomial ax^2 + bx + c can be factored into binomials with integer (or rational) coefficients if and only if its discriminant (b^2 - 4ac) is a perfect square (0, 1, 4, 9, 16, ...). If the discriminant is negative, the roots are complex and the polynomial does not factor over the real numbers at all. If the discriminant is a positive non-perfect-square, the roots are irrational and the polynomial does not factor over the integers, though it can be written with irrational coefficients using the quadratic formula. The calculator flags these as "prime" to alert you.
Quick reference: trinomial factoring patterns
| Pattern | Form | Factored | Example |
|---|---|---|---|
| Simple trinomial | x^2 + bx + c | (x + p)(x + q) where pq=c, p+q=b | x^2 + 5x + 6 = (x+2)(x+3) |
| Leading coeff > 1 | ax^2 + bx + c | (px + q)(rx + s) via AC method | 2x^2 - 3x - 2 = (2x+1)(x-2) |
| Perfect square | a^2x^2 + 2abx + b^2 | (ax + b)^2 | x^2 + 6x + 9 = (x+3)^2 |
| Difference of squares | a^2x^2 - b^2 | (ax + b)(ax - b) | 4x^2 - 9 = (2x+3)(2x-3) |
| Prime (irreducible) | ax^2 + bx + c | Cannot factor over integers | x^2 + x + 1 (disc = -3) |
Common patterns to recognise before applying the full AC method.
Frequently asked questions
What does "reverse FOIL" mean?
FOIL is the mnemonic for multiplying two binomials (First, Outer, Inner, Last). Reverse FOIL means going in the opposite direction: starting with the expanded trinomial ax^2 + bx + c and finding the two binomials whose FOIL product equals it. The result is the factored form (px + q)(rx + s). The AC method is the standard systematic technique for doing this without guessing.
What if the leading coefficient a is 1?
When a equals 1, the problem simplifies: you only need two numbers p and q such that p times q equals c and p plus q equals b. For example, x^2 + 5x + 6 has c = 6 and b = 5; the pair 2 and 3 satisfies 2*3 = 6 and 2+3 = 5, so the factored form is (x+2)(x+3). You do not need the full AC method, just list the factor pairs of c.
What does "prime" mean for a polynomial?
A prime polynomial (also called irreducible) is one that cannot be expressed as a product of lower-degree polynomials with integer coefficients. For quadratics, this happens when the discriminant b^2 - 4ac is not a perfect square. Analogous to prime numbers, you cannot break it down further over the integers, though the quadratic formula can still give you its roots.
Can I use this calculator to solve quadratic equations?
Yes, indirectly. Once you have the factored form (px + q)(rx + s) = 0, the zero-product property says each factor can be set to zero. So px + q = 0 gives x = -q/p, and rx + s = 0 gives x = -s/r. The calculator also shows the roots directly using the quadratic formula, which handles cases that do not factor neatly over the integers.
What is the discriminant and what does it tell me?
The discriminant is the expression b^2 - 4ac inside the square root of the quadratic formula. If it is positive, the equation has two distinct real roots and the trinomial factors into two different binomials. If it is zero, there is exactly one (repeated) root and the trinomial is a perfect square. If it is negative, the roots are complex and the trinomial does not factor over the real numbers.