Starlight Tools

Discriminant Calculator (b² − 4ac) With Steps

Use this quadratic discriminant calculator to find the discriminant, Δ = b² − 4ac, and understand the nature of roots. Enter an equation or its coefficients for exact roots, worked steps, and a graph. Calculations stay in your browser.

Instantly see whether the quadratic has two distinct real roots, one repeated real root, or two complex-conjugate roots—and whether real roots are rational.

Enter your quadratic

Input method
x² − 5x + 6 = 0

Use integers, finite decimals, or fractions such as -3/4. Enter 0 for a missing term.

Try an example
Before you calculate

Move every term to the left so the right side is 0, then collect like terms: ax² + bx + c = 0. Moving a term across = changes its sign.

  • Missing terms have coefficient 0: x² − 9 = 0 gives a = 1, b = 0, c = −9.
  • x² means 1x²; −x² means −1x².
  • −x² + 4x = 5 becomes −x² + 4x − 5 = 0: a = −1, b = 4, c = −5.

Your discriminant result

Discriminant
Δ = 1
Two distinct real, rational roots
Exact roots
x = 3 or x = 2

Because Δ is positive and its square root is rational.

Step-by-step solution
Decimal roots & root count

3, 2

2 distinct real roots

Approximations rounded to 10 significant digits; exact roots above are authoritative.

Verification: Verified
Parabola graph & vertex diagnostics

Vertex
Axis of symmetry
Opening
y-intercept

The vertex is (h, k), where h = −b/(2a) and k = −Δ/(4a). With a > 0 the vertex is a minimum; with a < 0 it is a maximum. This identity explains why the curve crosses, touches, or misses the x-axis.

What the discriminant tells you

For ax² + bx + c = 0, with a ≠ 0, the discriminant is the expression beneath the square-root sign in the quadratic formula.

Δ = b² − 4ac    and    x = (−b ± √Δ)/(2a)

Value of ΔRoots over the real numbersGraph of y = ax² + bx + c
Δ > 0Two distinct real rootsCrosses the x-axis twice
Δ = 0One repeated real rootTouches the x-axis once at the vertex
Δ < 0No real roots; two complex rootsDoes not meet the x-axis

Rational versus irrational real roots

When a, b, and c are rational, a nonnegative discriminant has a rational square root only when it is a perfect square of a rational number. Then the roots are rational. If Δ > 0 but √Δ is irrational, both real roots are irrational.

Worked discriminant examples

Rearrange first: two rational roots

3x² = 7x − 2

  1. 3x² − 7x + 2 = 0; a = 3, b = −7, c = 2.
  2. Δ = (−7)² − 4(3)(2) = 49 − 24 = 25.
  3. 25 > 0: two distinct rational roots.
  4. x = (7 ± √25)/6 = (7 ± 5)/6 = 2 or 1/3.

The upward-opening parabola crosses at x = 1/3 and x = 2.

Missing linear term

x² − 9 = 0

  1. a = 1, b = 0, c = −9.
  2. Δ = (0)² − 4(1)(−9) = 0 − (−36) = 36.
  3. 36 > 0: two distinct rational roots.
  4. x = (0 ± √36)/2 = ±3.

The upward-opening parabola has vertex (0, −9) and crosses at x = −3 and x = 3.

Negative leading coefficient

−x² + 4x = 5

  1. −x² + 4x − 5 = 0; a = −1, b = 4, c = −5.
  2. Δ = (4)² − 4(−1)(−5) = 16 − 20 = −4.
  3. −4 < 0: two complex-conjugate roots.
  4. x = (−4 ± √(−4))/(−2) = 2 ± i.

The downward-opening parabola has maximum (2, −1), below the x-axis, so it has no real intercepts.

Fractional coefficients

1/2x² + 3/4x − 2 = 0

  1. a = 1/2, b = 3/4, c = −2.
  2. Δ = (3/4)² − 4(1/2)(−2) = 9/16 + 4 = 73/16.
  3. 73/16 > 0: two irrational real roots.
  4. x = (−3/4 ± √(73/16))/1 = (−3 ± √73)/4.

The upward-opening parabola has vertex (−3/4, −73/32) and crosses the x-axis twice.

Simplify an irrational radical

x² + 2x − 1 = 0

  1. a = 1, b = 2, c = −1.
  2. Δ = (2)² − 4(1)(−1) = 4 + 4 = 8.
  3. 8 > 0: two irrational real roots.
  4. x = (−2 ± √8)/2 = (−2 ± 2√2)/2 = −1 ± √2.

The upward-opening parabola has minimum (−1, −2) and crosses the x-axis twice.

Repeated root and tangency

x² − 6x + 9 = 0

  1. a = 1, b = −6, c = 9.
  2. Δ = (−6)² − 4(1)(9) = 36 − 36 = 0.
  3. Δ = 0: one repeated rational root.
  4. x = (6 ± √0)/2 = 3.

The upward-opening parabola touches the x-axis at its vertex (3, 0).

Complex roots

x² + 4x + 8 = 0

  1. a = 1, b = 4, c = 8.
  2. Δ = (4)² − 4(1)(8) = 16 − 32 = −16.
  3. −16 < 0: two complex-conjugate roots.
  4. x = (−4 ± √(−16))/2 = (−4 ± 4i)/2 = −2 ± 2i.

The upward-opening parabola has minimum (−2, 4) and never reaches the x-axis.

Integer coefficients

x² − 5x + 6 = 0

  1. a = 1, b = −5, c = 6.
  2. Δ = (−5)² − 4(1)(6) = 25 − 24 = 1.
  3. 1 > 0: two distinct rational roots.
  4. x = (5 ± √1)/2 = 3 or 2.

The upward-opening parabola crosses at x = 2 and x = 3.

Method, authorship, and review

Publisher: Starlight Tools, by Starlight Robotics. Author and reviewer: no individual author or independent subject-matter reviewer is currently credited. Calculation checks reviewed: 24 September 2026.

Method: exact BigInt fractions evaluate Δ = b² − 4ac and the quadratic formula. Square factors and rational coefficients are reduced; Vieta’s sum and product checks use exact arithmetic, including complex conjugates. Graphs and decimal roots use numerical approximations. All calculation happens locally; this tool does not store or transmit your inputs.

Test methodology: automated regression checks compare known integer, fraction, repeated-root, irrational-root, and complex-root answers, exercise equation rearrangement and rejected inputs, and check exact Vieta identities and vertex heights.

Limits: each typed number allows up to 18 significant digits and 60 characters; equations allow 300 characters. Use expanded terms in x, not brackets, functions, scientific notation, or repeating decimals. For exceptionally large radicands, the calculator may retain square factors and labels that limitation while preserving the exact value. Graphs may be unavailable when floating-point resolution cannot separate key points.

References: OpenStax: Quadratic Equations explains the quadratic formula and discriminant root classification. Wolfram MathWorld: Polynomial Discriminant gives the quadratic discriminant b² − 4ac.

Discriminant calculator FAQs

What is b² − 4ac called?

It is the discriminant, usually written Δ, of ax² + bx + c = 0. It is the expression under the square root in the quadratic formula.

How do I find a, b, and c?

Write the equation as ax² + bx + c = 0. Then a is the coefficient of x², b is the coefficient of x, and c is the constant, including their signs. Missing terms have coefficient 0; x² has coefficient 1 and −x² has coefficient −1.

How does the discriminant classify roots?

For a quadratic with real coefficients, Δ > 0 gives two distinct real roots, Δ = 0 gives one repeated real root, and Δ < 0 gives two non-real complex-conjugate roots.

Does a positive discriminant mean a quadratic is factorable?

It can be factored into linear factors over the real numbers. With rational coefficients, it factors into linear factors over the rationals only if Δ is the square of a rational number. For example, x² + 2x − 1 has Δ = 8 and irrational roots, so it does not factor over the rationals.

Can the discriminant be negative?

Yes. For example, x² + 4x + 8 = 0 has Δ = −16. There are no real roots, but there are two complex roots: −2 ± 2i.

How do I calculate the discriminant when the equation is not equal to zero?

Subtract all terms on the right from the left and collect like terms first. For 3x² = 7x − 2, use 3x² − 7x + 2 = 0, so a = 3, b = −7, c = 2, and Δ = 49 − 24 = 25. Equation mode does this rearrangement for you.

What does the discriminant say about the graph?

For y = ax² + bx + c, a positive discriminant means two x-intercepts, zero means tangency at the vertex, and a negative discriminant means no x-intercepts. The vertex height is −Δ/(4a).

Can the discriminant be a fraction?

Yes. Fractional or decimal coefficients can produce a fractional discriminant. Its sign classifies the roots in the same way; for rational coefficients, the real roots are rational exactly when Δ is a square of a rational number.

What if a equals zero?

The equation is linear or constant rather than quadratic, so quadratic discriminant classification does not apply. The calculator requires a nonzero x² coefficient after collecting terms.

Explore more tools