Reverse FOIL Calculator — Factor a Quadratic Trinomial
Enter the integer coefficients a, b and c of a quadratic ax² + bx + c and get the fully factored form plus every step of the AC grouping method shown clearly.
Identify coefficients
Compute AC product
Find factor pair of AC with sum b
Rewrite middle term
Factor by grouping
Factored form
How does this calculator work?
To factor ax² + bx + c: compute AC, find integers f₁ and f₂ with f₁ × f₂ = AC and f₁ + f₂ = b, rewrite bx as f₁x + f₂x, then factor each pair by grouping. The shared binomial factor gives (px + q)(rx + s). If no integer pair exists, roots are irrational; if D < 0, they are complex.
Formula
How this is calculated
Reverse FOIL (also called the AC method or factoring by grouping) is the standard algorithm for factoring a trinomial ax² + bx + c where a, b, c are integers. The key insight is that if the trinomial factors over the integers, the middle coefficient b can be split into two parts f₁ and f₂ that multiply to AC (the product of the leading and constant coefficients) and add to b.
Once such a pair is found, the middle term bx is rewritten as f₁x + f₂x. The four-term polynomial is then split into two pairs and each pair is factored separately. Because f₁ × f₂ = AC, the two pairs share a common binomial factor, which is then factored out to give the final (px + q)(rx + s) form. The calculator simplifies each factor by dividing out any common integer factor so the result is in lowest terms.
If no integer factor pair exists but the discriminant D = b² − 4ac is positive, the calculator falls back to the quadratic formula and shows the factored form with irrational (decimal) roots. If D < 0, the quadratic has complex roots and cannot be factored over the real numbers.
Frequently asked questions
FOIL (First, Outer, Inner, Last) expands (px + q)(rx + s) into ax² + bx + c. "Reverse FOIL" is the process of going backwards — starting from ax² + bx + c and finding the two binomial factors. The AC method is the most reliable algorithm for this.
If (px + q)(rx + s) = ax² + bx + c, then pr = a, qs = c, and ps + qr = b. Multiplying: (ps)(qr) = (qs)(pr) = c × a = AC. So the two cross-terms ps and qr multiply to AC and add to b — which is exactly the pair the AC method searches for.
The quadratic either has irrational roots (D = b² − 4ac > 0 but not a perfect square) or complex roots (D < 0). The calculator detects this and shows the factored form with decimal roots when D ≥ 0, or a message for D < 0.
Also known as
TG we-Calculate Editorial Team. (2026). Reverse FOIL Calculator — Factor a Quadratic Trinomial [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/reverse-foil-calculator
TG we-Calculate Editorial Team. "Reverse FOIL Calculator — Factor a Quadratic Trinomial." TG we-Calculate. 2026. https://we-calculate.com/calculator/reverse-foil-calculator.
TG we-Calculate Editorial Team, "Reverse FOIL Calculator — Factor a Quadratic Trinomial," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/reverse-foil-calculator
@misc{wecalculate_reverse_foil_calculator, title = {Reverse FOIL Calculator — Factor a Quadratic Trinomial}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/reverse-foil-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
