Audited 25 May 2026·Last updated 27 Jul 2026·5 citations·Tier 1·0 uses

Discriminant Calculator

Compute b² − 4ac and classify quadratic roots instantly. Determines real, repeated, or complex solutions.

Discriminant Calculator

Leading coefficient; must be non-zero
Linear coefficient
Constant term
Discriminant
1
Value of b² − 4ac
Root Nature
0

Background.

The discriminant of a quadratic equation ax² + bx + c = 0 is the expression b² − 4ac. This single quantity determines the qualitative nature of the equation's roots without requiring the full quadratic formula to be evaluated. A discriminant calculator accepts the three coefficients a, b, and c, computes b² − 4ac, and classifies the result as positive, zero, or negative. Each case corresponds to a distinct geometric and algebraic reality: two crossing points on the x-axis, a single tangent point, or no real intersection at all.

Students in algebra, precalculus, and calculus courses are the dominant search demographic for this tool. Teachers frequently assign problems that ask only for the number and type of roots, not their exact values, because discriminant analysis develops number sense and predictive reasoning about polynomial behavior. Standardized tests such as the SAT, ACT, and AP Calculus exams include discriminant questions at regular intervals. Engineers and data scientists occasionally use discriminant logic when analyzing the stability of second-order dynamical systems, where complex roots indicate oscillatory behavior and real roots indicate exponential decay or growth.

The concept of the discriminant generalizes far beyond quadratics. For a cubic equation ax³ + bx² + cx + d = 0, the discriminant is b²c² − 4ac³ − 4b³d − 27a²d² + 18abcd, and its sign determines whether the cubic has three distinct real roots or one real root and two complex conjugates. For quartic and higher-degree polynomials, discriminants exist but become impractical to compute by hand. The quadratic discriminant is the only case simple enough to be memorized and applied routinely, which explains its outsized presence in mathematics education. The calculator focuses exclusively on this quadratic case.

Geometrically, the discriminant measures the vertical separation between the parabola's vertex and the x-axis, scaled by the leading coefficient. When D > 0, the vertex lies below the x-axis for upward-opening parabolas (a > 0) and the curve must cross the axis twice. When D = 0, the vertex sits exactly on the x-axis, producing a single point of contact. When D < 0, the entire parabola lies on one side of the x-axis and never intersects it. This geometric interpretation helps students connect algebraic computation with graphical understanding, a connection that the calculator reinforces by displaying the root nature alongside the numeric discriminant. The vertex y-coordinate is k = −D/(4a), so the discriminant also encodes the extremal value of the quadratic.

In physics, the discriminant appears in the analysis of damped harmonic oscillators. The equation of motion mẍ + cẋ + kx = 0 has characteristic roots determined by a quadratic equation in the Laplace variable s. The discriminant c² − 4mk distinguishes overdamped motion (distinct real roots, D > 0), critically damped motion (repeated real root, D = 0), and underdamped oscillation (complex roots, D < 0). These three regimes describe everything from car suspension systems to RLC electrical circuits and pendulum clocks. The discriminant calculator provides the same classification logic in a purely mathematical context, but the physical interpretation is identical and extends to any second-order linear system.

What is discriminant calculator?

The discriminant is a polynomial expression derived from the coefficients of a quadratic equation that predicts the nature of its roots. For the standard quadratic ax² + bx + c = 0 with a ≠ 0, the discriminant D is defined as b² − 4ac. If D is strictly positive, the equation has two distinct real roots. If D equals zero, there is exactly one real root with algebraic multiplicity two, often called a repeated or double root. If D is negative, there are no real roots; instead, the equation has two complex conjugate roots of the form p ± qi where i² = −1. The discriminant is a homogeneous polynomial of degree 2 in the coefficients a, b, and c. It is invariant under scaling of the equation: if every coefficient is multiplied by the same non-zero constant, the discriminant scales by the square of that constant, but the sign remains unchanged. Because the sign determines root classification, scaling does not affect the qualitative conclusion. The discriminant is zero precisely when the quadratic has a multiple root, which occurs if and only if the quadratic and its derivative share a common root. This condition is both necessary and sufficient for the existence of a repeated root.

How to use this calculator.

  1. Enter the leading coefficient a of the quadratic term.
  2. Enter the linear coefficient b.
  3. Enter the constant term c.
  4. Ensure a is non-zero; the calculator rejects a = 0.
  5. Read the discriminant value, which is b² − 4ac.
  6. Check the root nature output: 0 for two distinct real roots, 1 for one repeated real root, 2 for complex conjugate roots.
  7. Use this classification to decide whether to apply the quadratic formula or to expect complex results.

The formula.

D = b² − 4ac

The discriminant emerges naturally from the quadratic formula. Starting from ax² + bx + c = 0 and completing the square, one obtains x = (−b ± √(b² − 4ac))/(2a). The expression under the radical, b² − 4ac, is the discriminant D. Because the square root of a negative number is not real, the sign of D governs the existence of real solutions. When D > 0, √(D) is a positive real number, and the ± operation produces two distinct values. When D = 0, √(D) = 0, and both branches collapse to the single value x = −b/(2a). When D < 0, √(D) is imaginary, and the two solutions are complex conjugates. The discriminant can also be expressed as the resultant of the quadratic polynomial and its derivative. The derivative of f(x) = ax² + bx + c is f'(x) = 2ax + b. The resultant Res(f, f') is a determinant that vanishes exactly when f and f' share a common root, which occurs at a repeated root of f. Computing this resultant yields a²(b² − 4ac), confirming that D = 0 is the condition for a multiple root. This algebraic perspective connects the discriminant to elimination theory and explains why similar expressions appear for cubic and quartic equations. Dimensional analysis provides additional insight. If x is measured in metres, then a has units of m⁻² (since ax² must be dimensionless in the context of the equation), b has units of m⁻¹, and c is dimensionless. Then b² has units of m⁻², and 4ac also has units of m⁻², so D is dimensionally consistent. In physics applications, this consistency is essential. For example, in the damped oscillator equation, c² has units of (kg/s)² and 4mk has units of kg·N/m = kg²/s², so both terms in the discriminant share the same dimensions. The discriminant is a special case of the more general concept of a discriminant in algebraic geometry. For a polynomial of degree n, the discriminant is a polynomial in the coefficients that vanishes whenever the polynomial has a multiple root. The quadratic discriminant is the simplest non-trivial instance of this construction. It is also related to the determinant of the Sylvester matrix formed by the polynomial and its derivative, a connection that generalizes to systems of multivariate polynomials.

A worked example.

Example

Consider the quadratic equation x² − 7x + 10 = 0. The calculator computes the discriminant as D = (−7)² − 4(1)(10) = 49 − 40 = 9. Because D = 9 is strictly positive, the root nature code is 0, indicating two distinct real roots. The user can verify this by factoring: x² − 7x + 10 = (x − 2)(x − 5), giving roots x = 2 and x = 5. If the constant term were changed to c = 12.25, the discriminant would be D = 49 − 49 = 0, and the root nature code would be 1, indicating a repeated real root at x = 3.5. If c were increased further to c = 13, D would become negative and the roots would be complex conjugates. This example illustrates how the discriminant acts as a threshold parameter: small changes in c can shift the equation across the boundary between real and complex solutions.

a1
b-7
c10

Frequently asked questions.

Can the discriminant tell me the exact roots?
No. The discriminant only classifies the nature of the roots; it does not provide their exact values. To find the roots, you must apply the quadratic formula x = (−b ± √D)/(2a). However, the discriminant does determine whether the quadratic formula will yield real or complex results before you compute the square root. In some cases, the discriminant reveals additional structure: if D is a perfect square, the roots are rational (assuming integer coefficients), and the quadratic factors nicely over the integers. If D is not a perfect square, the roots are irrational. The discriminant calculator therefore serves as a preliminary diagnostic tool that informs your choice of solution method.
What does it mean when the discriminant is zero?
A discriminant of zero means the quadratic has exactly one real root, but that root has multiplicity two. Geometrically, the parabola touches the x-axis at exactly one point, its vertex. Algebraically, the quadratic can be written as a(x − r)², where r = −b/(2a) is the repeated root. This situation is called a double root or a repeated root. It occurs when the quadratic is a perfect square trinomial. In physics, a zero discriminant in a damped harmonic oscillator corresponds to critical damping, the boundary between overdamped and underdamped behavior where the system returns to equilibrium as quickly as possible without oscillating.
Why is the discriminant called b² − 4ac and not something else?
The expression b² − 4ac is the unique homogeneous quadratic polynomial in the coefficients that vanishes exactly when the quadratic has a multiple root. It emerges inevitably from the process of completing the square or deriving the quadratic formula. Any other expression that detects multiple roots must be a scalar multiple of b² − 4ac, and convention fixes the coefficient of b² at 1. The term "discriminant" was coined in the nineteenth century because the expression discriminates between the three possible qualitative behaviors of the roots: distinct real, repeated real, and complex conjugate.
Does a negative discriminant mean there are no solutions?
No. A negative discriminant means there are no real solutions, but there are still two complex conjugate solutions. In the complex number system, every non-constant polynomial has roots, a result known as the Fundamental Theorem of Algebra. The complex roots take the form (−b/(2a)) ± (√|D|/(2a))i, where i is the imaginary unit. These roots are physically meaningful in many engineering contexts. In electrical engineering, complex roots of a characteristic equation describe oscillatory behavior in AC circuits. In control theory, complex poles indicate resonant frequencies. The discriminant calculator reports root nature code 2 for this case, signaling that complex arithmetic is required.
How does the discriminant relate to the vertex?
The y-coordinate of the vertex is k = −D/(4a). Therefore, the discriminant and the vertex height are directly proportional. When D > 0 and a > 0, the vertex is below the x-axis (k < 0), so the upward-opening parabola crosses the axis twice. When D = 0, the vertex lies on the x-axis (k = 0). When D < 0 and a > 0, the vertex is above the x-axis (k > 0), and the parabola never crosses. This relationship confirms that the discriminant encodes geometric information about the parabola's position relative to the x-axis, not merely algebraic information about root existence.
Is the discriminant defined for linear equations?
No. The discriminant b² − 4ac is defined only for quadratic equations ax² + bx + c = 0 where a ≠ 0. If a = 0, the equation is linear (bx + c = 0) and has exactly one solution x = −c/b, provided b ≠ 0. There is no meaningful discriminant for a linear equation because there is no second root whose existence or nature needs to be classified. The calculator enforces a ≠ 0 to prevent users from applying a quadratic-specific tool to a linear problem. If both a and b are zero, the equation is either inconsistent (no solution) or an identity (infinitely many solutions).
Can the discriminant be used for inequalities?
Indirectly. The roots of the quadratic equation ax² + bx + c = 0 partition the real line into intervals. The sign of the quadratic expression is constant on each interval and can be determined by testing a single point. The discriminant tells you how many partition points exist: two if D > 0, one if D = 0, and none if D < 0. For example, to solve x² − 5x + 6 > 0, you first note D = 1 > 0, so there are two roots (2 and 6). The parabola opens upward, so the expression is positive outside the interval [2, 6]. Without computing D, you would not know whether the quadratic ever changes sign. The discriminant calculator therefore supports inequality solving by providing the necessary root-count information.
What happens if my coefficients are decimals instead of integers?
The discriminant formula works for any real coefficients, not just integers. The calculator accepts decimal inputs and computes D = b² − 4ac with floating-point arithmetic. If the coefficients have many decimal places, rounding errors can occur in the subtraction b² − 4ac when both terms are large and nearly equal. This is a classic case of catastrophic cancellation. To mitigate this, the calculator uses high-precision arithmetic or Decimal.js for intermediate steps. Users should be aware that a discriminant very close to zero may be numerically ambiguous; the calculator applies a tolerance of 1e-9 before classifying the root nature.
Are there discriminants for cubic and higher-degree equations?
Yes. Every polynomial has a discriminant that vanishes when the polynomial has a multiple root. The cubic discriminant is Δ = b²c² − 4ac³ − 4b³d − 27a²d² + 18abcd, and the quartic discriminant is a homogeneous polynomial of degree 6 in the coefficients. These expressions become too large to compute by hand in most cases, which is why numerical root-finding algorithms are preferred for high-degree polynomials. The quadratic discriminant is unique in its simplicity and memorability, which is why it remains a standard topic in every algebra curriculum. This calculator does not compute cubic or quartic discriminants.

References& sources.

  1. [1]Stewart, J. (2015). Calculus: Early Transcendentals, 8th ed. Cengage Learning. ISBN 978-1285741550.
  2. [2]NIST Digital Library of Mathematical Functions (2024). "Elementary Algebra." §1.11. https://dlmf.nist.gov/1.11
  3. [3]Strang, G. (2016). Introduction to Linear Algebra, 5th ed. Wellesley-Cambridge Press. ISBN 978-0980232776.
  4. [4]Boyce, W.E. and DiPrima, R.C. (2017). Elementary Differential Equations and Boundary Value Problems, 11th ed. Wiley. ISBN 978-1119382874.
  5. [5]Dummit, D.S. and Foote, R.M. (2004). Abstract Algebra, 3rd ed. Wiley. ISBN 978-0471433347.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon