Discriminant Calculator
Calculate Δ = b² − 4ac and determine the nature of the roots of ax² + bx + c = 0. Shows step-by-step working.
Enter the coefficients a, b, and c of the quadratic equation ax² + bx + c = 0. The calculator instantly computes Δ = b² − 4ac, tells you whether the roots are two distinct real roots, one repeated root, or two complex conjugate roots, and shows the roots themselves along with a step-by-step breakdown.
What is the discriminant?
The discriminant of a quadratic equation is the expression b² − 4ac. It appears under the radical sign in the quadratic formula, and its value — before you even compute a root — tells you exactly what kind of roots the equation has.
The name comes from the Latin discriminare, meaning “to distinguish” or “to separate.” In mathematics, it distinguishes between three fundamentally different outcomes: two distinct real roots, one repeated real root, or two complex roots with no real part. The discriminant is sometimes written as the Greek capital letter delta (Δ) or as the capital letter D.
The discriminant was formalized as a separate concept by the British mathematician James Joseph Sylvester in the 19th century, but the underlying idea — that the sign of b² − 4ac determines the nature of solutions — has been understood since the development of the quadratic formula itself.
The discriminant’s power is that it gives you this classification with minimal work. You don’t need to actually solve the equation to know how many real roots it has, or whether those roots will be rational numbers or irrational ones. In many practical and theoretical contexts, knowing the type of roots is all you need.
The discriminant formula
For the standard form quadratic equation ax² + bx + c = 0, the discriminant is:
The coefficients a, b, and c must come from the equation written in standard form. If the equation is presented differently — say, 3x² = 7x − 2 — you must rearrange it to 3x² − 7x + 2 = 0 first, giving a = 3, b = −7, c = 2.
Worked example 1: x² − 5x + 6 = 0
Here a = 1, b = −5, c = 6.
Since Δ = 1 > 0 and 1 is a perfect square, this equation has two distinct rational real roots.
Worked example 2: x² + 2x + 1 = 0
Here a = 1, b = 2, c = 1.
Since Δ = 0, this equation has exactly one repeated real root.
Worked example 3: x² + x + 1 = 0
Here a = 1, b = 1, c = 1.
Since Δ = −3 < 0, this equation has no real roots — only two complex conjugate roots.
The three cases: positive, zero, negative
The sign of the discriminant completely determines the number and nature of the roots of ax² + bx + c = 0.
| Discriminant (Δ) | Number of real roots | Root type | Example |
|---|---|---|---|
| Δ > 0, perfect square | 2 | Rational, unequal | x² − 5x + 6 = 0, Δ = 1 |
| Δ > 0, not perfect square | 2 | Irrational, unequal | x² − 3x + 1 = 0, Δ = 5 |
| Δ = 0 | 1 (repeated) | Rational, equal | x² + 2x + 1 = 0, Δ = 0 |
| Δ < 0 | 0 real roots | Complex conjugates | x² + x + 1 = 0, Δ = −3 |
When Δ > 0: The equation has two distinct real roots — two separate x-values where the parabola crosses the x-axis. If Δ is a perfect square (1, 4, 9, 16, 25, …), both roots are rational numbers, which means they can be found by factoring. If Δ is not a perfect square, the roots involve square roots and are irrational.
When Δ = 0: The equation has exactly one real root, sometimes called a repeated root or double root. Geometrically, the parabola is tangent to the x-axis — it just touches it at one point without crossing. The repeated root is x = −b / 2a.
When Δ < 0: The square root of a negative number is not real, so the equation has no real solutions. The two roots exist in the complex number system as a conjugate pair: a + bi and a − bi, where a and b are real numbers. Geometrically, the parabola sits entirely above or below the x-axis and never crosses it.
Computing the roots from the discriminant
Once you have the discriminant, the roots come directly from the quadratic formula:
This is why the discriminant appears inside the radical: its sign determines whether √Δ is real, zero, or imaginary.
For Δ > 0: Two distinct roots x₁ = (−b + √Δ) / 2a and x₂ = (−b − √Δ) / 2a.
Using example 1 (x² − 5x + 6 = 0, Δ = 1):
- x₁ = (5 + 1) / 2 = 3
- x₂ = (5 − 1) / 2 = 2
Check: (x − 3)(x − 2) = x² − 5x + 6 ✓
For Δ = 0: One repeated root x = −b / 2a.
Using example 2 (x² + 2x + 1 = 0, Δ = 0):
- x = −2 / 2 = −1 (repeated)
Check: (x + 1)² = x² + 2x + 1 ✓
For Δ < 0: Two complex roots x = (−b ± i√|Δ|) / 2a.
Using example 3 (x² + x + 1 = 0, Δ = −3):
- x₁ = (−1 + i√3) / 2
- x₂ = (−1 − i√3) / 2
These are complex conjugates — notice the real parts are equal and the imaginary parts have opposite signs.
Rational vs. irrational roots
When Δ > 0, a further distinction matters in both pure math and standardized tests: whether the discriminant is a perfect square.
A perfect square is any non-negative integer whose square root is also an integer: 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, and so on. If Δ is a perfect square and the coefficients a, b, c are all integers, then the quadratic can be factored over the integers and its roots are rational numbers.
| Equation | a | b | c | Δ | √Δ | Root type |
|---|---|---|---|---|---|---|
| x² − 7x + 12 = 0 | 1 | −7 | 12 | 1 | 1 | Rational |
| 2x² − 3x − 2 = 0 | 2 | −3 | −2 | 25 | 5 | Rational |
| x² − 4x + 1 = 0 | 1 | −4 | 1 | 12 | 2√3 | Irrational |
| x² − 2x − 1 = 0 | 1 | −2 | −1 | 8 | 2√2 | Irrational |
The rational root test (a separate but related concept) can also help identify rational roots, but the discriminant check is faster for quadratics: compute Δ, check whether it’s a perfect square, done.
One note for decimal or fractional coefficients: the perfect-square check only applies cleanly when a, b, c are integers. For non-integer coefficients, you can still classify real vs. complex by sign, but the rational/irrational distinction is more nuanced.
Complex conjugate roots when Δ < 0
When the discriminant is negative, the equation has no real solutions. The roots are complex numbers of the form:
The real part is −b/2a and the imaginary part is ±√|Δ|/2a. These two roots are always complex conjugates — they have the same real part and imaginary parts that are equal in magnitude but opposite in sign.
This is not a coincidence. The quadratic formula contains a ± sign before √Δ. When Δ < 0, √Δ = i√|Δ|, and the ± produces x₁ = p + qi and x₂ = p − qi where p = −b/2a and q = √|Δ|/2a.
Complex roots always come in conjugate pairs for polynomials with real coefficients. This is a consequence of the complex conjugate root theorem: if a polynomial with real coefficients has a complex root r, then its conjugate r̄ is also a root. Because quadratics have exactly two roots (counting multiplicity), both must be in the conjugate pair.
Example: 2x² + 3x + 4 = 0
Δ = 9 − 32 = −23
Roots: x = (−3 ± i√23) / 4 = −3/4 ± (√23/4)i ≈ −0.75 ± 1.199i
The parabola y = 2x² + 3x + 4 has its vertex below the x-axis for this equation? Let me check — vertex is at x = −b/2a = −3/4, y = 2(9/16) + 3(−3/4) + 4 = 9/8 − 9/4 + 4 = 9/8 − 18/8 + 32/8 = 23/8 > 0. The parabola opens upward and its minimum value (23/8) is positive, so it never crosses the x-axis — consistent with Δ < 0.
Discriminant reference table
| Equation | a | b | c | Δ = b²−4ac | Root classification |
|---|---|---|---|---|---|
| x² − 5x + 6 = 0 | 1 | −5 | 6 | 1 | 2 rational roots (3, 2) |
| x² − 3x + 1 = 0 | 1 | −3 | 1 | 5 | 2 irrational roots |
| x² + 2x + 1 = 0 | 1 | 2 | 1 | 0 | 1 repeated root (−1) |
| x² + x + 1 = 0 | 1 | 1 | 1 | −3 | 2 complex conjugate roots |
| 2x² − 3x − 2 = 0 | 2 | −3 | −2 | 25 | 2 rational roots (2, −½) |
| 3x² + 2x + 5 = 0 | 3 | 2 | 5 | −56 | 2 complex conjugate roots |
| 4x² − 4x + 1 = 0 | 4 | −4 | 1 | 0 | 1 repeated root (½) |
| x² − 2 = 0 | 1 | 0 | −2 | 8 | 2 irrational roots (±√2) |
Real-world uses of the discriminant
Physics: projectile motion
A projectile’s height is modeled as h(t) = −½gt² + v₀t + h₀, a quadratic in time. The discriminant of −½g·t² + v₀·t + (h₀ − target) tells you whether the projectile reaches the target height:
- Δ > 0: it crosses that height twice (on the way up and on the way down)
- Δ = 0: it just barely reaches that height at one moment
- Δ < 0: it never reaches that height
Engineers designing trajectories use this check before doing the full calculation.
Engineering: stability of control systems
In control engineering, the characteristic equation of a second-order system is often a quadratic. The discriminant determines whether the system is overdamped (Δ > 0, two real roots), critically damped (Δ = 0, one repeated root), or underdamped (Δ < 0, complex roots with oscillatory behavior). Each regime has different engineering implications for how quickly a system responds and whether it oscillates.
Algebra: testing factorability
Before attempting to factor a quadratic expression by hand, computing the discriminant instantly tells you whether integer or rational factoring is possible. If Δ is not a non-negative perfect square, the expression doesn’t factor over the rationals. This saves time on problem sets and exams — don’t try to factor what can’t be factored.
Finance: break-even analysis
Quadratic cost or revenue models appear in economics. A firm’s profit function might be π(q) = −aq² + bq − c for quantity q. The discriminant of this profit function tells you whether the firm has any positive-profit output level: Δ > 0 means there is a profitable range of quantities, Δ = 0 means the firm breaks even at exactly one quantity, and Δ < 0 means the firm cannot profit at any quantity under the given model.
Computer graphics: ray–sphere intersection
Ray tracing — the technique behind photorealistic 3D rendering — uses the discriminant constantly. When a ray P + t·d intersects a sphere centered at C with radius r, substituting into the sphere equation yields a quadratic in t. The discriminant of that quadratic tells the renderer:
- Δ > 0: the ray pierces the sphere at two points (entry and exit)
- Δ = 0: the ray is tangent, touching the sphere at exactly one point
- Δ < 0: the ray misses entirely
The renderer only needs to compute expensive shading when Δ ≥ 0. Evaluating the discriminant first is a fast early-out that eliminates most of the scene geometry before doing heavier work.
Vertex form and the axis of symmetry
The discriminant also connects to the vertex form of a parabola. Any quadratic ax² + bx + c can be written in vertex form:
The vertex is at (h, k). Notice that k = c − b²/4a = (4ac − b²) / 4a = −Δ / 4a.
This means the vertex y-coordinate is directly related to the discriminant:
| Discriminant | Vertex y-coordinate k | Geometric meaning |
|---|---|---|
| Δ > 0 | k and a have opposite signs | Vertex is on the "crossing side" — parabola crosses x-axis |
| Δ = 0 | k = 0 | Vertex sits exactly on the x-axis |
| Δ < 0 | k and a have the same sign | Vertex is on the "non-crossing side" — parabola misses x-axis |
Example: For 2x² + 3x + 4 = 0 (from the complex roots section, Δ = −23):
- h = −3/4 = −0.75
- k = −(−23) / (4·2) = 23/8 = 2.875
Since a = 2 > 0 and k = 2.875 > 0, the vertex is above the x-axis and the parabola opens upward — so it never crosses, consistent with Δ < 0.
The axis of symmetry is x = h = −b/2a. The two roots (when they exist) are always symmetric about this line. When Δ > 0, the roots are located at x = h ± √Δ / 2a, equally spaced on either side of the vertex.
Relationship to Vieta's formulas
Vieta’s formulas connect the roots directly to the coefficients, without finding the roots explicitly. For ax² + bx + c = 0 with roots x₁ and x₂:
The discriminant can be expressed in terms of the roots:
This follows because (x₁ − x₂)² = (x₁ + x₂)² − 4x₁x₂ = b²/a² − 4c/a = (b² − 4ac)/a² = Δ/a².
The discriminant therefore measures the squared distance between the roots (scaled by a²). When Δ = 0, the roots coincide — x₁ = x₂. When Δ > 0, the roots are spread apart. When Δ < 0, the “distance” is imaginary — reflecting that the roots are complex conjugates rather than real numbers on the number line.
This perspective explains why the discriminant is called a discriminant: it measures how much the roots are “discriminated” (separated) from each other.