Skip to content
Mathematics

Quadratic equation solver

Solve a·x² + b·x + c = 0. Real or complex roots, the discriminant and the vertex are shown separately.

Free & no registration Calculated in your browser
01

Your inputs

The starting values are an example.

Decimals: 12.5 · Thousands: 1,234.56. Follow the field instructions for lists.

02

Your result

Enter your values and select Calculate.

Your calculation will appear here.

Your result will include the relevant values and units.

Understand the calculation

Formula and example

How it is calculated

D = b²−4ac; x = (−b ± √D)/(2a). For D < 0, write √D as i·√(−D).

Worked example

x² − 5x + 6 = 0 has D = 1 and roots 2 and 3. The vertex is at (2.5; −0.25).

Things to check

  • If a = 0, the remaining linear equation is solved.
  • The calculation uses floating-point numbers and a form that reduces cancellation for two distinct real roots. Nearly repeated roots remain sensitive to rounding.

Frequently asked questions

What does a negative discriminant mean?

There are no real roots. Over the complex numbers, the roots form a conjugate pair with equal real parts and opposite imaginary parts.