Skip to content
FiftyCalc Free calculators for all 50 states

Quadratic Formula Calculator

Test cases replayed : 4 of 4 match · Methodology · No outside source listed

Enter the coefficients a, b and c of ax² + bx + c = 0 to get both roots, real or complex.

Result

Sample figures

Root x₁ (real part if complex)—

Discriminant b² − 4ac —

  • Type of roots—
  • Root x₂ (real part if complex)—
  • Imaginary part ± (0 if real)—
  • Vertex x = −b ÷ 2a—
  • Vertex y—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

Quadratic Formula Calculator

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

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

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

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: Root x₁ (real part if complex); the panel also shows Discriminant b² − 4ac, Type of roots, Root x₂ (real part if complex), Imaginary part ± (0 if real), Vertex x = −b ÷ 2a and Vertex y.

How this calculator works

The quadratic formula gives the roots of ax² + bx + c = 0 (a ≠ 0): x = (−b ± √(b² − 4ac)) ÷ 2a. It comes from completing the square.

The discriminant D = b² − 4ac decides the kind of roots: D > 0 gives two real roots, D = 0 one repeated root, D < 0 two complex roots −b ÷ 2a ± i√(−D) ÷ 2a.

The vertex of the parabola y = ax² + bx + c sits halfway between the roots, at x = −b ÷ 2a.

The formula

  1. D=b2−4×a×c
  2. X1={−b+D2×aif D≥0−b2×aotherwise+0
Symbols used in the formula
SymbolMeaning
aa (coefficient of x², not 0)
bb (coefficient of x)
cc (constant term)
DDiscriminant b² − 4ac
X1Root x₁ (real part if complex)

Worked example

a (coefficient of x², not 0)1
b (coefficient of x)-3
c (constant term)2
Discriminant b² − 4ac1
Type of rootsTwo distinct real roots
Root x₂ (real part if complex)1
Imaginary part ± (0 if real)0
Vertex x = −b ÷ 2a1.5
Vertex y-0.25
  1. D=(−3)2−4×1×2=1
  2. X1=−(−3)+12×1+0=2

Root x₁ (real part if complex) 2

Each step uses the unrounded value of the step before it; figures on this page are rounded for display.

Frequently asked questions

What does a negative discriminant mean?

The parabola never crosses the x-axis, so there is no real root; the two roots are complex conjugates. For x² + 2x + 5 = 0 they are −1 ± 2i.

What if a = 0?

The equation is then linear (bx + c = 0), not quadratic, and the formula does not apply: the answer is x = −c ÷ b.

Why are there two roots?

A parabola can cross the x-axis at two points. The ± in the formula gives both.

Related calculators