Math & Statistics

Quadratic Formula Calculator

Solve a quadratic with stable real-root arithmetic and explicit repeated or complex-root results.

Private, in-browser calculationUpdated

Let’s work it out

Enter your numbers. We’ll show the working.

How to use this calculator

  1. Enter coefficient a and the remaining values.
  2. Check the selected units and the counting or calculation convention described below.
  3. Select Calculate to review the result and breakdown. Reset restores the example.

The formula

Discriminant D = b² − 4ac; roots = (−b ± sqrt(D)) / 2a

Coefficients are scaled before evaluating the discriminant. For two real roots, a cancellation-resistant q formula computes one root and uses c/q for the other. A negative discriminant produces a complex conjugate pair.

PUTTING IT INTO PRACTICE

A worked example

x² − 3x + 2 has roots 1 and 2. x² + 1 has roots 0 + 1i and 0 − 1i.

How to interpret your result

Repeated roots occur when the computed discriminant is exactly zero. Real-root order is ascending.

Assumptions and limitations

Use the units, timing, and bounds stated beside the inputs. Example values are hypothetical; replace them with your own.

Nonzero a required; floating-point input, not symbolic algebra. Near-zero discriminants can be sensitive to input rounding. No arbitrary expressions are executed.