CALCSHQ

Math

Quadratic equation solver

Enter the three coefficients a, b, c — the calculator computes the discriminant, classifies the solution (two real roots, one repeated root, or complex conjugates), and returns the exact root values.

1 -5 x + 6 = 0
x₁ = 3
x₂ = 2
Discriminant = 1 (two real roots)

Formula

Discriminant D = b² − 4ac determines the nature of roots. D > 0 → two real, D = 0 → one, D < 0 → complex.

The quadratic formula x = (−b ± √(b² − 4ac)) / 2a solves any equation of the form ax² + bx + c = 0. The discriminant b² − 4ac tells you what kind of solution you'll get:

• > 0: two distinct real roots (parabola crosses x-axis twice) • = 0: one repeated real root (parabola touches x-axis at the vertex) • < 0: two complex conjugate roots (parabola doesn't cross x-axis)

The calculator also handles the degenerate case a = 0, which reduces to a linear equation bx + c = 0. If both a and b are zero, the equation has either no solution (c ≠ 0) or infinitely many (c = 0).

Examples

  1. 01x² − 5x + 6 = 0 (a=1, b=−5, c=6)
    D = 25 − 24 = 1 > 0 · x₁ = 3, x₂ = 2
  2. 02x² − 4x + 4 = 0 (perfect square)
    D = 16 − 16 = 0 · x = 2 (double root)
  3. 03x² + x + 1 = 0
    D = 1 − 4 = −3 < 0 · x = −0.5 ± 0.8660 i (complex)
  4. 04Linear case: 0·x² + 3x − 6 = 0
    Reduces to 3x = 6 → x = 2

FAQ

  • The graph of y = ax² + bx + c is a parabola. The discriminant tells you how it intersects the x-axis: positive D = crosses twice (two roots), zero D = touches at the vertex (one root), negative D = doesn't touch (no real roots, only complex). The sign of a tells you which way it opens.

References

Reviewed by
Last updated
May 27, 2026
Formula source
Privacy
All math runs in your browser. No values are sent to any server.

Note: Results are accurate to floating-point precision (~15 significant digits) for the standard formula shown above. See our terms of use for general usage information.

Related calculators