Quadratic Equation Solver

Enter the coefficients a, b and c of ax² + bx + c = 0. Real roots are shown as plain decimals with up to 10 significant digits, complex roots in the form p + qi.

Updated

Embed this calculator

Paste this code into your page. The calculator runs inside the frame and links back to the full version.

Keep the credit link in place. Do not resell the calculator.

Formula

  • Discriminant: D = b² − 4ac
  • Roots: x = (−b ± √D) ÷ 2a. If D < 0 the roots are complex: −b ÷ 2a ± (√−D ÷ 2|a|) i
  • Vertex: x = −b ÷ 2a, y = c − b² ÷ 4a

Worked example

x² − 5x + 6 = 0: D = 25 − 24 = 1, roots (5 ± 1) ÷ 2 = 3 and 2, vertex at x = 2.5, y = 6 − 6.25 = −0.25.

Frequently asked questions

How do you solve a quadratic equation?

Use the quadratic formula x = (-b ± √(b² − 4ac)) ÷ 2a. For x² − 5x + 6 = 0 the discriminant is 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving 3 and 2.

What does the discriminant tell me?

If b² − 4ac is positive there are two real roots, if zero one repeated root, and if negative two complex roots. For x² + 2x + 5 it is -16, so the roots are -1 ± 2i.

How do I find the vertex of a parabola?

The vertex is at x = -b ÷ 2a, and y is the equation's value there. For x² − 5x + 6 it is x = 2.5 and y = -0.25.

What if a is zero?

Then the equation is linear, not quadratic, and the formula would divide by zero. Solve bx + c = 0 instead, giving x = -c ÷ b.