Discriminant Calculator
- D = b^2 - 4ac = (-5)^2 - 4 x 1 x 6 = 1.
- Because D is positive, the equation has: two distinct real roots.
- Roots: (5 + 1.00) / 2 = 3.00 and (5 - 1.00) / 2 = 2.00.
A discriminant calculator finds the discriminant of a quadratic expression written as ax^2 + bx + c. The discriminant is D = b^2 - 4ac. Once you enter the values of a, b and c, the calculator returns the value of D and tells you what it means for the roots of the equation. If D is positive, there are two distinct real roots: for example, x^2 - 5x + 6 has D = 25 - 24 = 1, and the roots are 3.00 and 2.00. If D = 0, there is one repeated real root: x^2 + 4x + 4 has D = 0 and the single root -2.00. If D < 0, there is a complex conjugate pair: 2x^2 + 3x + 5 has D = -31 and roots -0.75 +/- 1.39i. When a, b and c are integers and D is a perfect square, the roots are rational and the quadratic factors neatly.
The discriminant sits inside the square root of the quadratic formula, which is why its sign decides the nature of the roots. This relationship makes the discriminant the accepted standard for predicting root type before you solve. This page shows the formula, step-by-step workings, worked examples and sources so you can verify every result.
Worked examples
Two real roots
Primary result: 1 — positive, so x^2 - 5x + 6 has two distinct real roots, 3.00 and 2.00. (1 · -5 · 6)
| Discriminant | 1 |
| Nature of roots | Two distinct real roots |
| Root 1 | 3.00 |
| Root 2 | 2.00 |
One repeated root
Primary result: 0 — a perfect square, with the single root -2.00. (1 · 4 · 4)
| Discriminant | 0 |
| Nature of roots | One repeated real root |
| Repeated root | -2.00 |
Complex roots
Primary result: -31 — negative, so the roots are the complex pair -0.75 +/- 1.39i. (2 · 3 · 5)
| Discriminant | -31 |
| Nature of roots | Two complex roots |
| Real part | -0.75 |
| Imaginary part | +/- 1.39i |
How this discriminant calculator works
This discriminant calculator starts with the standard quadratic equation ax^2 + bx + c and computes D = b^2 - 4ac. That single value tells you what kind of roots to expect before you ever touch the quadratic formula. The discriminant sits inside the square root of the quadratic formula, which is why its sign decides the nature of the roots. Once the calculator has D, it uses that value to find the roots themselves and reports both the discriminant and the roots together.
To see the full process, take x^2 - 5x + 6 as a worked example. Here a = 1, b = -5, and c = 6, so D = 25 - 24 = 1. Because D is positive, there are two distinct real roots, which the calculator reports as 3.00 and 2.00. This outcome makes sense because 1 is a perfect square, and when a, b and c are integers and D is a perfect square, the roots are rational and the quadratic factors neatly.
The sign of D controls the root type across every case. D = 0 means one repeated real root: x^2 + 4x + 4 has D = 0 and the single root -2.00. D < 0 means a complex conjugate pair: 2x^2 + 3x + 5 has D = -31 and roots -0.75 +/- 1.39i. The calculator checks the sign first, then follows the matching path so the output always matches the math.
What the sign of the discriminant tells you
The discriminant sits inside the square root of the quadratic formula, which is why its sign decides the nature of the roots. When you use a discriminant calculator, the value it returns immediately tells you what kind of answer to expect before you solve anything. For the standard quadratic ax^2 + bx + c, the discriminant is D = b^2 - 4ac. This single number carries enough information to reveal whether the equation has two real solutions, one real solution, or a pair of complex numbers.
Each sign of D maps to a specific root type and a matching behavior where the parabola meets the x-axis. The table below summarizes all three cases. When D is positive, the parabola crosses the x-axis at two separate points, giving two distinct real roots. When D equals zero, the parabola just touches the x-axis at one point, giving a single repeated root. When D is negative, the parabola never reaches the x-axis, and the roots form a complex conjugate pair.
A quick check with real equations confirms each case. For x^2 - 5x + 6, D = 25 - 24 = 1, positive, so there are two distinct real roots, 3.00 and 2.00. For x^2 + 4x + 4, D = 0 and the single root is -2.00. For 2x^2 + 3x + 5, D = -31 and roots are -0.75 +/- 1.39i. These examples line up exactly with what the sign of D predicts.
There is one extra detail worth knowing. When a, b and c are integers and D is a perfect square, the roots are rational and the quadratic factors neatly. This means you can write the expression as the product of two binomials with integer coefficients, which is often faster than applying the full quadratic formula by hand.
| Sign of D | Root type | Graph behavior at x-axis |
|---|---|---|
| D > 0 | Two distinct real roots | Parabola crosses the x-axis at two separate points |
| D = 0 | One repeated real root | Parabola touches the x-axis at exactly one point |
| D < 0 | Complex conjugate pair | Parabola does not meet the x-axis |
Discriminant and the quadratic formula
The quadratic formula gives the roots of any equation written as ax^2 + bx + c = 0. The formula is x = (-b ± √(b^2 - 4ac)) / 2a. The expression inside the square root, b^2 - 4ac, is the discriminant, labeled D. Because the discriminant sits inside the square root of the quadratic formula, its sign decides the nature of the roots before you finish solving. A discriminant calculator works by evaluating this single expression and reporting what it tells you about the solutions.
When D is positive, the square root produces a real number, and the ± sign creates two different real roots. For example, in x^2 - 5x + 6, D = 25 - 24 = 1. Because D is positive, there are two distinct real roots, 3.00 and 2.00. When a, b and c are integers and D is a perfect square, the roots are rational and the quadratic factors neatly. When D = 0, the square root of zero is zero, so the ± term adds nothing. The equation has one repeated real root. For instance, x^2 + 4x + 4 has D = 0 and the single root -2.00.
When D is negative, the square root of a negative number is not a real number. In standard arithmetic, the square root of a negative value has no real result, which forces complex roots. The quadratic formula still applies, but the square root term becomes an imaginary number. This produces a complex conjugate pair: two roots with the same real part and opposite imaginary parts. For example, 2x^2 + 3x + 5 has D = -31 and roots -0.75 ± 1.39i. The negative under the square root is exactly why the answers involve i, the imaginary unit.
These three cases cover every quadratic equation with real coefficients. Checking D first tells you what to expect from the quadratic formula: two real roots, one repeated real root, or a complex conjugate pair. This makes the discriminant a quick diagnostic tool. Instead of completing the full calculation and discovering complex roots at the end, you know the nature of the solutions as soon as you compute b^2 - 4ac.
Perfect-square discriminants and factoring
Recall that the discriminant of ax^2 + bx + c is D = b^2 - 4ac. When a, b and c are integers and D is a perfect square, the roots are rational and the quadratic factors neatly. That makes the discriminant a quick factorability test you can run before you ever attempt to split the middle term or guess a pair of factors. A discriminant calculator applies this test instantly, sparing you from trial and error on quadratics that will not cooperate.
The reason the test works is structural. The discriminant sits inside the square root of the quadratic formula, which is why its sign decides the nature of the roots. When the value under that square root is a perfect square, the square root simplifies to a whole number, so each root comes out as a clean fraction of integers. When it is not a perfect square, the roots involve an irrational square root and the quadratic does not factor over the rationals, even if it has two real roots.
To use the test in classwork, compute D and then check whether it is 0, 1, 4, 9, 16, 25, or any other integer multiplied by itself. For the worked check x^2 - 5x + 6, D = 25 - 24 = 1, positive, so there are two distinct real roots, 3.00 and 2.00. Because 1 is a perfect square, the roots are rational and the quadratic factors as (x - 3)(x - 2). Contrast this with a positive discriminant that is not a perfect square: the roots would still be real and distinct, but they would involve radicals and the quadratic would not factor neatly over the rationals.
The same discriminant also tells you when factoring collapses to a repeated linear factor. D = 0 means one repeated real root: x^2 + 4x + 4 has D = 0 and the single root -2.00, so it factors as (x + 2)^2. And when D is negative, factoring over the reals is off the table entirely. D < 0 means a complex conjugate pair: 2x^2 + 3x + 5 has D = -31 and roots -0.75 +/- 1.39i. In every case the discriminant gives you the answer before you invest time in a method that may not apply.
FAQs
What is the discriminant formula?
For any quadratic equation in the form ax^2 + bx + c = 0, the discriminant is calculated using the formula D = b^2 - 4ac. Here, a, b, and c are the coefficients of your equation. This single value reveals key information about the nature and number of the roots without requiring you to solve the full equation.
What does a discriminant of 0 mean?
When the discriminant equals 0, the quadratic equation has exactly one repeated real root. Graphically, this means the parabola touches the x-axis at exactly one point, known as the vertex. The quadratic formula simplifies because the square root term becomes zero, leaving you with a single solution.
What if the discriminant is negative?
A negative discriminant means the quadratic equation has no real roots. Instead, the solutions are a complex conjugate pair, like -0.75 +/- 1.39i. Graphically, the parabola never crosses the x-axis. The square root of a negative number introduces the imaginary unit i, producing two complex solutions.
Can the discriminant tell me the roots themselves?
Not alone, but the discriminant is a key part of the quadratic formula. With the quadratic formula, the roots are (-b +/- sqrt(D)) / 2a. The discriminant D determines what kind of roots you will get, while the full formula calculates their exact values, whether they are real, repeated, or complex.
What does a perfect-square discriminant mean?
A perfect-square discriminant means the roots of the quadratic equation are rational numbers. Because the square root of a perfect square is a whole number, the quadratic can be factored neatly into two binomials with integer coefficients. This makes solving and factoring the equation straightforward without needing decimal approximations.
Does the discriminant work for other equations?
Cubics and higher polynomials have their own discriminants, but b^2 - 4ac is the quadratic case taught in school. The concept extends to higher-degree equations through more complex formulas that similarly reveal whether roots are real or repeated. However, the simple discriminant formula applies specifically to quadratic equations.