Quadratic Discriminant Calculator
Compute b² − 4ac from the coefficients a, b, c to find the discriminant, classify the roots (two real, one repeated, or two complex), and read off √|D|.
Inputs
Results
Definition
The discriminant of a quadratic equation ax² + bx + c = 0 is the expression D = b² − 4ac. It is the single number that determines whether the equation has two distinct real roots, one repeated real root, or two complex conjugate roots, without first solving the equation. Its sign distinguishes the three cases, so it serves as the initial check before computing the roots themselves with the quadratic formula.
The formula: D = b² − 4ac
Computing the discriminant by hand takes three steps:
- Square the middle coefficient: b²
- Multiply the other two: 4 × a × c
- Subtract: D = b² − 4ac
No square roots or fractions are involved. The sign of D alone determines the nature of the roots.
Geometric interpretation
The quadratic equation ax² + bx + c = 0 asks where the parabola y = ax² + bx + c crosses the x-axis. The discriminant answers that question geometrically:
| Discriminant | Root type | Geometry |
|---|---|---|
| D > 0 | Two distinct real roots | Parabola crosses the x-axis at two separate points |
| D = 0 | One repeated real root | Parabola just touches the x-axis at its vertex |
| D < 0 | Two complex conjugate roots | Parabola lies entirely above or below the x-axis |
When D = 0 the vertex of the parabola sits exactly on the x-axis, so x = −b / 2a is simultaneously the axis of symmetry and the only real root.
Worked examples
Example 1 — D > 0 (two distinct real roots)
Equation: x² − 5x + 6 = 0 (a = 1, b = −5, c = 6)
Step 1: b² = (−5)² = 25
Step 2: 4ac = 4 × 1 × 6 = 24
Step 3: D = 25 − 24 = 1
Since D = 1 > 0, there are two distinct real roots. Solving confirms x = 2 and x = 3, which are the x-intercepts of the parabola y = x² − 5x + 6.
Example 2 — D = 0 (one repeated real root)
Equation: x² − 6x + 9 = 0 (a = 1, b = −6, c = 9)
Step 1: b² = 36
Step 2: 4ac = 36
Step 3: D = 36 − 36 = 0
The single root is x = −(−6) / (2 × 1) = 3. This is a perfect square: x² − 6x + 9 = (x − 3)². The parabola's vertex touches the x-axis at x = 3.
Example 3 — D < 0 (two complex conjugate roots)
Equation: x² + x + 1 = 0 (a = 1, b = 1, c = 1)
Step 1: b² = 1
Step 2: 4ac = 4
Step 3: D = 1 − 4 = −3
Since D = −3 < 0, there are no real roots. The roots are complex: . is the imaginary magnitude shown by this calculator.
Relationship to the quadratic formula
The quadratic formula is:
The expression under the square root is exactly the discriminant D. When D > 0, is real and positive, giving two distinct values of x. When D = 0, and the ± produces only one value. When D < 0, is imaginary, so the formula yields complex numbers. The discriminant is the part of the formula that controls which of the three outcomes applies — computing it first saves time when only the type of roots is needed rather than their exact values.
Edge case: a = 0
If a = 0, the equation ax² + bx + c = 0 loses its x² term and becomes the linear equation bx + c = 0. The formula D = b² − 4ac still produces a number (b²), but it has no meaning for a linear equation. This calculator requires a ≠ 0 and displays an error message when a = 0. For a linear equation, the solution is simply x = −c / b (assuming b ≠ 0).
Frequently Asked Questions (FAQ)
What is the discriminant used for?
The discriminant D = b² − 4ac summarises the nature of the roots of ax² + bx + c = 0 without actually computing them.
A positive D means the parabola crosses the x-axis at two distinct points; D = 0 means it just touches the axis (vertex on the x-axis); D < 0 means it never crosses, so the roots are complex numbers. It appears as the radicand under the ± in the quadratic formula, which is why it controls whether the formula yields real or complex values.
What does it mean when the discriminant is negative?
A negative discriminant means D = b² − 4ac < 0, so √D is imaginary. The two roots are complex conjugates of the form α ± βi, where α = −b / 2a and β = √|D| / 2a. They always come in conjugate pairs when the coefficients a, b, c are real. Geometrically, the parabola lies entirely above or below the x-axis and does not intersect it.
How does the discriminant relate to the quadratic formula?
The quadratic formula x = (−b ± √(b² − 4ac)) / 2a contains the discriminant D = b² − 4ac under the square root. When D > 0, √D is a positive real number, giving two distinct real roots. When D = 0, the ± term vanishes and the single root is x = −b / 2a. When D < 0, √D is imaginary, producing two complex conjugate roots. The discriminant is the part of the formula that determines which case applies.
What if a = 0?
If a = 0, the equation degenerates to bx + c = 0, which is linear, not quadratic. The discriminant formula b² − 4ac still produces a number, but it is meaningless in that context because there is no x² term. This calculator requires a ≠ 0 and shows an error when a = 0 is entered.
Recommended Next
Quadratic Equation Solver
Solve ax² + bx + c = 0. Enter the three coefficients to get the discriminant and both roots — real or complex.