Math

Quadratic Equation Calculator – Exact & Complex Roots

Solve ax² + bx + c = 0 with exact discriminant classification, rational or radical roots, certified decimal approximations, vertex and axis of symmetry.

Free to useNo sign-upCalculated in your browser

Inputs

Nonzero; absolute value up to 1 billion, at most 6 decimals.

Signed decimal digits; no exponents or plus sign.

Signed decimal digits; no exponents or plus sign.

Inputs and results stay in this browser.

Results

Check the inputs and calculate. Editing clears the previous result.

Solve a quadratic and understand its shape

A quadratic equation has the form ax² + bx + c = 0, with a ≠ 0. The roots are values of x that make the expression zero. This tool shows exact root expressions separately from rounded decimal approximations, plus the vertex, axis of symmetry and opening direction.

What the discriminant tells you

D = b² − 4ac determines the root classification. A positive D gives two distinct real roots; zero gives one repeated real root. A negative D gives complex conjugate roots, with equal real parts and opposite imaginary parts. There are no real x-intercepts in the negative case.

For x² − 5x + 6 = 0, D = 25 − 24 = 1. The roots are (5 − 1)/2 = 2 and (5 + 1)/2 = 3. The vertex is (2.5, −0.25), the axis is x = 2.5 and the parabola opens upward.

For x² − 2x + 1 = 0, D = 0 and both algebraic root positions coincide at 1. For x² + 1 = 0, the roots are −i and +i, where i² = −1.

Exact expressions and approximations

When the integer-scaled discriminant is a perfect square, the roots are rational numbers. They appear as full terminating decimals or reduced fractions. Otherwise an exact, possibly unsimplified radical expression is shown. For x² − 4x + 1 = 0, the exact roots are 2 − √3 and 2 + √3; a decimal cannot capture either completely.

All decimal root displays use 12 decimal places, rounding half away from zero. They are labeled approximations even if a particular display happens to be exact. Distinct exact expressions remain visible if two decimal displays coincide or a small value rounds to zero.

The discriminant is computed exactly from decimal inputs. Irrational root displays use an integer square-root enclosure at 60 decimal places; both ends must round to the same displayed value. Otherwise the calculator reports an unsupported-precision error. This avoids subtracting binary floating-point numbers to classify a nearly repeated root.

For example, changing c from 0.999999 to 1.000001 in x² − 2x + c = 0 changes roots 0.999 and 1.001 into 1 − 0.001i and 1 + 0.001i. Small coefficient changes near D = 0 can change the root type.

Vertex and graph

The vertex is (−b/(2a), −D/(4a)); the axis passes vertically through it. Positive a opens upward and negative a opens downward. Real roots are x-intercepts of the parabola. This page supplies the exact geometry without a graph; the related Graphing Calculator can explore a curve within its own plotting limits.

Frequently asked questions

What coefficients are supported?

Signed decimals from −1 billion to 1 billion, with at most six decimal places. Scientific notation, commas and a leading plus sign are rejected. The leading coefficient must be nonzero. These are software bounds, not mathematical restrictions on quadratics.

Why not silently solve a linear equation when a is zero?

That would change the problem type. Enter a nonzero a here; linear equations require their own interpretation.

Sources & review

Last reviewed: . The formula is reproduced above so you can check the math independently.

How we check calculations and describe their limits

Accessibility and student privacy

Our accessibility target is WCAG 2.1 AA. We use automated checks for keyboard operation, narrow layouts and readable alternatives to charts. Keyboard and screen reader behavior can vary by device and browser.Report an accessibility issue.

These tools have no ads, affiliate offers or sponsored content. No account is needed. Calculations run in your browser; your inputs and results are not sent to us or to analytics. Google Analytics may be used to measure site usage. See Privacy & analytics for details and how to turn it off.