Reverse FOIL Calculator

Enter the coefficients a, b, and c of a quadratic trinomial ax² + bx + c to reverse-FOIL it into two binomials using the AC method, plus its roots and discriminant.

Quick Facts

FOIL expansion
(px+q)(rx+s) = pr·x² + (ps+qr)x + qs
First, Outer, Inner, Last — the expansion reverse-FOIL undoes.
AC method
Find m, n with m·n = a·c and m+n = b
Splitting the middle term this way lets you factor by grouping.
Discriminant
Δ = b² − 4ac
A positive perfect square means integer binomial factors exist.

Your Results

Calculated
Factored Form
-
ax² + bx + c written as two binomials
Root x₁
-
x = (−b + √Δ) / (2a)
Root x₂
-
x = (−b − √Δ) / (2a)
Discriminant
-
Δ = b² − 4ac

Ready

Enter a, b, and c, then press Calculate.

How reverse FOIL factoring works

FOIL — First, Outer, Inner, Last — is the shortcut for multiplying two binomials: (px + q)(rx + s) = pr·x² + (ps + qr)x + qs. Reverse FOIL runs that process backward: starting from a quadratic trinomial ax² + bx + c, it finds the two binomials that multiply together to produce it. This calculator uses the AC method, the standard technique for reverse-FOILing a trinomial whose leading coefficient a isn't necessarily 1.

The AC method, step by step

To factor ax² + bx + c: (1) multiply a and c together; (2) find two numbers m and n whose product equals a·c and whose sum equals b; (3) rewrite the middle term bx as mx + nx, giving ax² + mx + nx + c; (4) group the four terms into two pairs and factor out the greatest common factor of each pair; (5) if both pairs share a common binomial factor, pull it out to get the final answer (px + q)(rx + s). When a = 1, this reduces to the simpler classic case: find two numbers that multiply to c and add to b, which gives (x + p)(x + q) directly.

Reading the discriminant

The discriminant Δ = b² − 4ac tells you what kind of factors to expect before you even factor. If Δ is negative, the trinomial has no real roots and cannot be factored into real binomials. If Δ is zero, the trinomial is a perfect square and factors into two identical binomials. If Δ is positive and a perfect square (with a, b, and c all integers), the trinomial factors neatly into binomials with integer coefficients — exactly the case the AC method is built for. If Δ is positive but not a perfect square, the roots are irrational, so the "reverse FOIL" only works with decimal or irrational coefficients: a(x − x₁)(x − x₂).

Checking your factorization

Always verify by FOILing back out: multiply the two binomials you found and confirm you recover the original a, b, and c. This calculator performs that search internally — if the AC method can't find an integer pair (m, n), it falls back to the quadratic formula and reports the exact roots so you can still write the factorization, just with decimal or irrational numbers instead of small integers.

Frequently Asked Questions

What does "reverse FOIL" mean?
FOIL multiplies two binomials into a trinomial: (px+q)(rx+s) = pr·x² + (ps+qr)x + qs. Reverse FOIL is the opposite process — starting from the trinomial ax² + bx + c and working backward to find the two binomials that produce it.
How does the AC method find the factors?
The AC method looks for two numbers m and n that multiply to a×c and add to b. Splitting bx into mx + nx lets you factor the resulting four-term expression by grouping, which reveals the two binomial factors.
What if the leading coefficient a is 1?
When a = 1, the AC method simplifies to the classic case: find two numbers that multiply to c and add to b. Those two numbers p and q give the factorization (x + p)(x + q) directly.
What happens if the discriminant is negative or not a perfect square?
A negative discriminant (Δ = b² − 4ac < 0) means the trinomial has no real roots, so it cannot be factored into real binomials. If Δ is positive but not a perfect square, the roots are irrational — the calculator falls back to the quadratic formula and reports decimal roots instead of a clean integer factorization.