Intermediate

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.
Coefficient of x² — enter a non-zero integer
Coefficient of x
The constant — product of the outer terms in FOIL
Polynomial
x² − 5x + 6
Factored form
(x − 3)(x − 2)
a (leading)
1
b (middle)
-5
c (constant)
6
Discriminant D
1
Factoring steps — AC / grouping method
1

Identify coefficients

a = 1, b = -5, c = 6
2

Compute AC product

A × C = (1)(6) = 6
3

Find factor pair of AC with sum b

-2 × -3 = 6 and -2 + -3 = -5
4

Rewrite middle term

x² − 2x − 3x + 6
5

Factor by grouping

x(x − 2) − 3(x − 2)
=

Factored form

(x − 3)(x − 2)
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

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
Find f₁, f₂ such that f₁ × f₂ = AC and f₁ + f₂ = b, then factor by grouping: ax² + f₁x + f₂x + c
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

factor quadratic trinomial calculator
ac method factoring calculator
factor ax squared bx c
reverse foil method
factoring by grouping calculator
quadratic factoring steps
trinomial factor calculator

APA

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

Chicago

TG we-Calculate Editorial Team. "Reverse FOIL Calculator — Factor a Quadratic Trinomial." TG we-Calculate. 2026. https://we-calculate.com/calculator/reverse-foil-calculator.

IEEE

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

BibTeX

@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?