Skip to content
FiftyCalc Free calculators for all 50 states

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

Sample figures

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.

Reverse FOIL Calculator

a (coefficient of x², not 0): enter a number. Prefilled example: 6.

b (coefficient of x): enter a number. Prefilled example: 5.

c (constant term): enter a number. Prefilled example: 1.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. a (coefficient of x², not 0): enter a number.
  2. b (coefficient of x): enter a number.
  3. c (constant term): enter a number.
  4. 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
ResultFactors over the integers
Common factor k in front1
First factor (px + q): p3
First factor (px + q): q1
Second factor (rx + s): r2
Second factor (rx + s): s1

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.

Related calculators