Reverse FOIL Calculator
Test cases replayed : 6 of 6 match · Methodology · No outside source listed
Enter the whole-number coefficients a, b and c of ax² + bx + c.
Result
First factor (px + q): p
Result
- First factor (px + q): q
- Second factor (rx + s): r
- Second factor (rx + s): s
- Common factor k in front
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- a (coefficient of x², not 0): enter a number.
- b (coefficient of x): enter a number.
- c (constant term): enter a number.
- Read the result: First factor (px + q): p; the panel also shows Result, First factor (px + q): q, Second factor (rx + s): r, Second factor (rx + s): s and Common factor k in front.
How this calculator works
FOIL multiplies two binomials: (px + q)(rx + s) = prx² + (ps + qr)x + qs. Reverse FOIL goes the other way. With whole-number coefficients, ax² + bx + c factors over the integers exactly when the discriminant b² − 4ac is a perfect square, so that both roots are rational.
The roots are x = (−b ± √(b² − 4ac)) ÷ 2a. Writing each root in lowest terms as −q/p gives the factor (px + q); the number k = a ÷ (p × r) in front restores the leading coefficient (Gauss's lemma makes k a whole number). So ax² + bx + c = k(px + q)(rx + s).
Worked example
| a (coefficient of x², not 0) | 6 |
|---|---|
| b (coefficient of x) | 5 |
| c (constant term) | 1 |
| Result | Factors over the integers |
|---|---|
| Common factor k in front | 1 |
| First factor (px + q): p | 3 |
| First factor (px + q): q | 1 |
| Second factor (rx + s): r | 2 |
| Second factor (rx + s): s | 1 |
Frequently asked questions
How do you factor 6x² + 5x + 1?
The discriminant is 25 − 24 = 1, a perfect square, and the result is (3x + 1)(2x + 1).
Why does x² + x + 1 not factor?
Its discriminant 1 − 4 = −3 is negative, so it has no real roots and no factors with whole numbers.