Connect via MCP →

Enter Calculation

Formula

Show calculation steps (1)
  1. Discriminant

    Discriminant: Quadratic Equation Solver

    D > 0: two distinct real roots; D = 0: one repeated real root; D < 0: two complex conjugate roots.

Advertisement

Results

Roots of ax² + bx + c = 0
x₁ = 1, x₂ = -2.5
Two distinct real roots
Discriminant (D = b² − 4ac) 49
Root x₁ (real part) 1
Root x₁ (imaginary part) 0
Root x₂ (real part) -2.5
Root x₂ (imaginary part) 0

What this calculator does

This tool solves any quadratic equation written in the standard form \(\text{a}x^2 + \text{b}x + \text{c} = 0\), where a, b and c are real coefficients and a ≠ 0. It returns both roots (real or complex), the discriminant, and a plain-English description of the nature of the roots.

How to use it

Enter the three coefficients. The coefficient a multiplies x², b multiplies x, and c is the constant. If a is zero the equation is no longer quadratic, so the calculator asks you to enter a non-zero value. Choose how many significant digits to display from the dropdown; this affects only the rounding of the output, not the underlying computation.

The formula explained

The roots come from the quadratic formula $$x = \frac{-\text{b} \pm \sqrt{\text{b}^{2} - 4\,\text{a}\,\text{c}}}{2\,\text{a}}$$ where the discriminant is $$D = \text{b}^{2} - 4\,\text{a}\,\text{c}$$ When \(D > 0\) there are two distinct real roots. When \(D = 0\) the ± term vanishes, giving one repeated real root \(x = -\text{b} / (2\,\text{a})\). When \(D < 0\) the square root is imaginary, producing a complex conjugate pair with real part \(-\text{b} / (2\,\text{a})\) and imaginary part \(\sqrt{-D} / (2\,\text{a})\).

Three parabolas showing two roots, one root, and no real roots
The discriminant sign determines whether a parabola crosses the x-axis twice, once, or not at all.
Quadratic formula with labeled discriminant under the square root
The quadratic formula, with the discriminant \(\text{b}^2 - 4\,\text{a}\,\text{c}\) under the square root.

Worked example

For a = 2, b = 3, c = −5: $$D = 3^{2} - 4\cdot 2\cdot (-5) = 9 + 40 = 49$$ Since \(D > 0\), \(\sqrt{49} = 7\), so \(x_1 = (-3 + 7) / 4 = 1\) and \(x_2 = (-3 - 7) / 4 = -2.5\). The roots are 1 and −2.5.

FAQ

What if the discriminant is negative? You get two complex conjugate roots of the form \(p \pm qi\); this calculator reports the real part \(p\) and imaginary part \(q\) separately.

Why must a be non-zero? If a = 0 the x² term disappears and the equation becomes linear (\(\text{b}x + \text{c} = 0\)), so the quadratic formula's division by \(2\,\text{a}\) is undefined.

Does the significant-digits setting change the answer? No. It only controls how many digits are shown; the math is performed in full double precision and then rounded for display.

Last updated: