Skip to content
Calculated in the browser

Quadratic equation

It solves ax² + bx + c = 0. If a is zero, the equation becomes linear.

How it is calculated

The discriminant is D = b² − 4ac. If D > 0 there are two roots, if D = 0 there is one, and if D < 0 there are no real roots. A root is (−b ± √D) / 2a.

x = (−b ± √D) / 2a

Where the numbers come from

  • Coefficient a
  • Coefficient b
  • Coefficient c

Example

x² − 3x + 2 = 0. Discriminant 9 − 8 = 1, roots 2 and 1.

Questions

How do I write the equation x² − 3x + 2?

a = 1, b = −3, c = 2. The minus belongs to the coefficient.

What about complex roots?

The calculator reports that there are no real roots, and it shows the negative discriminant.

Does root order matter?

No. The root with a plus in front of the square root of the discriminant is shown first.