FireCADCalc

Quadratic Equation Roots Calculator (ax² + bx + c = 0)

Real or complex roots of a quadratic equation ax² + bx + c = 0, the discriminant and the vertex, computed in the numerically stable form.

Inputs

Examples: x² - 3x + 2 = 02x² + 4x + 10 = 0 (complex)x² - 4x + 4 = 0 (repeated)

Results

Two complex roots x = x₁ ± i y.

Discriminant b² − 4ac-64.000
First root (real part when complex)-1.0000
Second root (real part when complex)-1.0000
Imaginary part (0 for real roots)2.0000
Vertex x = −b / 2a-1.0000
Vertex value c − b² / 4a8.0000

Download PDF CSV Link to this result Compare another case

Log in to save calculations to your dashboard.

Worked example

Example: x² - 3x + 2 = 0. The inputs, in the units selected above:

InputValue
Coefficient a (of x²)1.0000 -
Coefficient b (of x)-3.0000 -
Constant c2.0000 -

Applying the formula below gives:

ResultValue
Discriminant b² − 4ac1.0000
First root (real part when complex)1.0000
Second root (real part when complex)2.0000
Imaginary part (0 for real roots)0
Vertex x = −b / 2a1.5000
Vertex value c − b² / 4a-0.25000

Open this example in the calculator and change any input.

Formula

\(D = b^2 - 4ac, \quad q = -\tfrac{1}{2}\left(b + \operatorname{sign}(b)\sqrt{D}\right), \quad x_1 = \frac{q}{a},\ x_2 = \frac{c}{q}\)

\(x = -\frac{b}{2a} \pm i\,\frac{\sqrt{-D}}{2a}\ (D < 0)\)

Variables

Symbol Meaning SI unit
\(a\) Coefficient a (of x²) -
\(b\) Coefficient b (of x) -
\(c\) Constant c -
\(D\) Discriminant b² − 4ac -
\(x_1\) First root (real part when complex) -
\(x_2\) Second root (real part when complex) -
\(\pm i\,y\) Imaginary part (0 for real roots) -
\(x_v\) Vertex x = −b / 2a -
\(y_v\) Vertex value c − b² / 4a -

Method and standards

Quadratic formula in the cancellation-free form.

Where it is used

  • Engineering equations of second order (projectile, quadratic losses).
  • Teaching.

Common mistakes

  • Sign errors in b.
  • Losing precision with the textbook form.

Assumptions and limits

  • a must not be zero.

References

  • Quadratic formula; numerically stable form (Press et al., Numerical Recipes §5.6)

Questions and answers

What are the roots of x² − 3x + 2 = 0?

1 and 2.

And 2x² + 4x + 10 = 0?

The discriminant is −64, so the roots are complex: −1 ± 2i.

Why a 'stable' form?

When b² is much larger than 4ac, the textbook formula loses digits; q = −(b + sign(b)√D)/2 avoids it.

Method and article reviewed by FireCAD engineering on 12 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.

Related calculators

Free engineering calculators: every page computes in SI and converts to your units. Results are for engineering estimation; verify critical designs against the referenced standards.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.