Math Calculator

Quadratic Equation Solver

Solve any quadratic equation of the form ax² + bx + c = 0 and see its roots, discriminant and vertex.

Maintained by Kumara Samigari LokeshMethod: quadratic formulaMethods and limitations

What this calculator does

Enter the coefficients a, b and c of ax² + bx + c = 0. The solver returns the roots (real or complex), the discriminant, and the vertex of the parabola y = ax² + bx + c. Coefficient a cannot be zero, because then the equation is linear, not quadratic.

Formula used

x = (−b ± √(b² − 4ac)) ÷ 2a

Discriminant D = b² − 4ac

Vertex = (−b ÷ 2a, value of y at that x)

What the discriminant tells you

  • D > 0: two different real roots; the parabola crosses the x-axis twice.
  • D = 0: one repeated real root; the parabola touches the x-axis at its vertex.
  • D < 0: no real roots; two complex roots of the form p ± qi, and the parabola does not cross the x-axis.

Worked examples

  • x² − 5x + 6 = 0: D = 25 − 24 = 1, so roots = (5 ± 1) ÷ 2 = 3 and 2. Vertex at (2.5, −0.25).
  • x² + 2x + 5 = 0: D = 4 − 20 = −16, so roots = (−2 ± 4i) ÷ 2 = −1 ± 2i. Vertex at (−1, 4).

Checking an answer

Substitute each root back into the equation. For x = 3 in the first example: 9 − 15 + 6 = 0. You can also check with the sum and product of roots: for ax² + bx + c, the roots add to −b/a and multiply to c/a. For the first example, 3 + 2 = 5 and 3 × 2 = 6.

Common mistakes

  • Not rearranging the equation to equal zero first. For x² = 5x − 6, enter a = 1, b = −5, c = 6.
  • Dropping the sign of b: if the term is −5x, b is −5.
  • Dividing only √D by 2a instead of the whole numerator.

FAQs

What if a is zero?

The equation is linear (bx + c = 0) with solution x = −c/b. The solver needs a non-zero a.

Does it show complex roots?

Yes. When the discriminant is negative, roots are shown as p ± qi.

How are results rounded?

Results are shown to up to four decimal places.

What is the vertex?

The turning point of the parabola: its lowest point if a is positive, highest if a is negative.

Can it factorise the equation?

It gives the roots r and s; the factorised form is a(x − r)(x − s).