๐ข Discriminant Calculator: b Squared Minus 4ac
By Shihab Mia ยท Updated 2026-07-09
Find the discriminant of ax2 + bx + c = 0. Enter the coefficients below.
Enter coefficients a, b and c to find the discriminant.
This discriminant calculator computes D = b^2 - 4ac for any quadratic ax^2 + bx + c = 0 the instant you enter the three coefficients. The discriminant is the part of the quadratic formula under the square root sign, and its value tells you, before you solve anything, how many roots exist and whether they are real or complex. Enter a, b and c below and the tool returns the discriminant plus a plain-English reading of the roots.
What is the Discriminant Calculator?
Every quadratic equation can be written in the standard form ax^2 + bx + c = 0, where a is not zero. The discriminant, written D or sometimes the Greek delta, is defined as D = b^2 - 4ac. It is exactly the expression that sits beneath the square root in the quadratic formula x = (-b plus or minus the square root of (b^2 - 4ac)) divided by 2a. Because that square root governs the whole behaviour of the formula, the sign of the discriminant decides the entire character of the solution without you having to finish the calculation. A single subtraction replaces a full solve when all you need to know is how many answers there are.
There are three cases, and they are the heart of what a discriminant calculator reports. When D is greater than 0 the square root is a real positive number, so the plus and minus branches give two different real roots, and the parabola crosses the x-axis at two points. When D equals 0 the square root is zero, the plus and minus branches collapse into one value, and you get a single repeated real root (a double root) where the parabola just touches the x-axis. When D is less than 0 the square root is of a negative number, which has no real value, so the two roots are complex conjugates and the parabola never meets the x-axis.
There is also a useful fourth observation for equations with whole-number coefficients. If the discriminant is a positive perfect square (such as 1, 4, 9 or 16) then the two real roots are rational and the quadratic factors neatly over the integers. If D is positive but not a perfect square, the roots are irrational and you will need the quadratic formula or surd form to express them exactly. This is why the discriminant is a standard first test in algebra: one calculation tells you how many solutions exist, whether they are real or complex, and whether the expression will factor cleanly.
The discriminant also answers design-style questions that come up in coursework and applications. Setting D = 0 and solving for an unknown coefficient finds the exact value that makes an equation have a single repeated root, which is the same condition as a line being tangent to a curve. Requiring D greater than 0 finds the range of a parameter for which two real intersections exist, and requiring D less than 0 finds where a quadratic has no real zeros and therefore keeps a constant sign. Reading the discriminant as an inequality in an unknown constant turns a graphing problem into simple algebra.
Beyond the quadratic, the same idea generalises. Any polynomial has a discriminant built from its coefficients that vanishes exactly when the polynomial has a repeated root, and the quantity b^2 - 4ac is simply the most common case. For the quadratic it has a clean geometric meaning: up to the positive factor 4a^2, the discriminant equals the squared distance between the two roots, which is why it shrinks to zero exactly when the roots merge. Keeping that picture in mind makes the three cases easy to remember and hard to misread.
Using the calculator is faster and more reliable than working b^2 - 4ac by hand, where the most common slips are dropping the sign of a negative b or reversing the order of the subtraction. Enter the coefficients exactly as they appear, including any minus signs, and the tool squares b correctly, multiplies 4ac, subtracts in the right order, and classifies the result. It is well suited to checking homework, verifying that an equation factors, or exploring how changing one coefficient moves a parabola toward or away from the x-axis.
When to use it
- Checking how many real solutions a quadratic equation has before committing to solving it in full.
- Deciding whether a quadratic will factor neatly over the integers, by testing if the discriminant is a perfect square.
- Finding the value of an unknown coefficient that makes an equation have exactly one repeated root, by setting D = 0.
- Finding the range of a parameter for which a quadratic has two real roots (D greater than 0) or no real roots (D less than 0).
- Testing whether a line is tangent to a parabola or circle, since tangency corresponds to a zero discriminant.
- Verifying homework or exam answers about the number and nature of the roots of ax^2 + bx + c = 0.
How to use the Discriminant Calculator
- Enter coefficient a, the number in front of x^2. It must not be zero, otherwise the equation is not quadratic.
- Enter coefficient b, the number in front of x, including its sign if it is negative.
- Enter coefficient c, the constant term, including its sign.
- Read off the discriminant D, the number of real roots, and the nature of the roots, all of which update instantly.
- If needed, adjust any coefficient and watch how the discriminant and the root type change.
Formula & method
Worked examples
Find the discriminant of x^2 - 5x + 6 = 0 (a = 1, b = -5, c = 6).
- D = b^2 - 4ac
- b^2 = (-5)^2 = 25
- 4ac = 4 x 1 x 6 = 24
- D = 25 - 24 = 1
Result: D = 1, which is positive and a perfect square, so there are two distinct rational real roots. The equation factors as (x - 2)(x - 3) = 0.
Find the discriminant of x^2 - 4x + 4 = 0 (a = 1, b = -4, c = 4).
- D = b^2 - 4ac
- b^2 = (-4)^2 = 16
- 4ac = 4 x 1 x 4 = 16
- D = 16 - 16 = 0
Result: D = 0, so there is exactly one repeated real root (a double root) at x = 2, where the parabola touches the x-axis.
Find the value of k that makes x^2 + kx + 9 = 0 have exactly one repeated root (a = 1, b = k, c = 9).
- A repeated root needs D = 0
- D = b^2 - 4ac = k^2 - 4 x 1 x 9 = k^2 - 36
- Set k^2 - 36 = 0
- k^2 = 36, so k = 6 or k = -6
Result: k = 6 or k = -6 gives a zero discriminant and therefore a single repeated root (at x = -3 and x = 3 respectively).
What the sign of the discriminant tells you about the roots
| Discriminant D | Number of real roots | Nature of roots | Graph (parabola) |
|---|---|---|---|
| D is greater than 0 | 2 | Two distinct real roots | Crosses the x-axis at two points |
| D = 0 | 1 | One repeated real root (double root) | Touches the x-axis at one point |
| D is less than 0 | 0 | Two complex conjugate roots | Does not meet the x-axis |
Extra detail when coefficients are whole numbers and D is greater than 0
| Condition on D | Roots are | Factors over integers? |
|---|---|---|
| D is a perfect square (1, 4, 9, ...) | Rational | Yes |
| D is positive but not a perfect square | Irrational | No |
Worked discriminants for common quadratics
| Equation | a, b, c | D = b^2 - 4ac | Roots |
|---|---|---|---|
| x^2 - 5x + 6 = 0 | 1, -5, 6 | 1 | Two rational: 2 and 3 |
| x^2 - 4x + 4 = 0 | 1, -4, 4 | 0 | One repeated: 2 |
| x^2 - 2x - 1 = 0 | 1, -2, -1 | 8 | Two irrational |
| x^2 + 2x + 5 = 0 | 1, 2, 5 | -16 | Two complex |
| 2x^2 + 3x - 2 = 0 | 2, 3, -2 | 25 | Two rational: 0.5 and -2 |
Common mistakes to avoid
- Forgetting the sign of b before squaring. b^2 is always non-negative, even when b is negative. For b = -5, b^2 = 25, not -25. Square the whole coefficient including its sign, then the result is never negative.
- Mixing up the order in b^2 - 4ac. The discriminant is b^2 minus 4ac, not 4ac minus b^2. Reversing it flips the sign of D and gives the wrong conclusion about the roots.
- Dropping the sign of a or c inside 4ac. When a or c is negative, 4ac can be negative, which makes D larger. For a=1, b=2, c=-3, 4ac = -12 and D = 4 - (-12) = 16, not 4 - 12. Carry the signs through the whole product.
- Trying to use the discriminant when a = 0. If a = 0 the equation is not quadratic, it is the linear equation bx + c = 0, and D = b^2 - 4ac does not describe its roots. Make sure a is non-zero first.
- Assuming D = 0 means no solution. A discriminant of zero does not mean there is no root. It means there is exactly one real root, repeated twice (a double root), where the parabola touches the x-axis.
- Confusing a negative discriminant with an error. A negative discriminant is a valid, meaningful result. It signals two complex conjugate roots rather than a mistake. The equation still has solutions, just not real ones.
Glossary
- Discriminant
- The expression D = b^2 - 4ac that determines the number and type of roots of a quadratic equation.
- Quadratic equation
- An equation of the form ax^2 + bx + c = 0 where a is not zero.
- Coefficient
- A number multiplying a term. In ax^2 + bx + c, a and b are coefficients and c is the constant term.
- Root
- A value of x that makes the equation equal zero, also called a solution or zero of the quadratic.
- Double root
- A single root that is counted twice, occurring when the discriminant is exactly zero.
- Complex conjugate roots
- A pair of roots of the form p + qi and p - qi that appear when the discriminant is negative.
- Perfect square
- A whole number that is the square of an integer, such as 1, 4, 9 or 16. A perfect-square discriminant signals rational roots.
- Quadratic formula
- The formula x = (-b plus or minus the square root of (b^2 - 4ac)) divided by 2a, which solves any quadratic equation.
Frequently asked questions
What is the discriminant of a quadratic?
The discriminant is the quantity D = b^2 - 4ac for a quadratic ax^2 + bx + c = 0. It is the part under the square root in the quadratic formula, and its sign tells you how many real roots the equation has and whether those roots are real or complex.
How do you calculate b squared minus 4ac?
Take coefficient b and square it, keeping its sign so a negative b becomes positive. Then multiply 4 by a by c. Subtract the second result from the first: D = b^2 - 4ac. This calculator does all three steps for you when you enter a, b and c.
What does a positive discriminant mean?
A positive discriminant (D greater than 0) means the quadratic has two distinct real roots, and its parabola crosses the x-axis at two separate points. If D is also a perfect square and the coefficients are whole numbers, those roots are rational and the expression factors over the integers.
What does it mean when the discriminant is zero?
When D = 0 the quadratic has exactly one real root, repeated twice. This is called a double root or repeated root, and the parabola just touches the x-axis at a single point instead of crossing it. It is also the condition for a line to be tangent to a parabola.
What if the discriminant is negative?
A negative discriminant (D less than 0) means there are no real roots. The two roots are complex conjugates with an imaginary part, and the parabola never meets the x-axis. The equation still has solutions, but only in the complex numbers.
Can the discriminant be used if a is zero?
No. If a = 0 the equation is not quadratic, it reduces to the linear equation bx + c = 0, and the discriminant b^2 - 4ac no longer describes its roots. The discriminant applies only when a is non-zero.
How does the discriminant tell you if a quadratic can be factored?
For a quadratic with whole-number coefficients, if the discriminant is a positive perfect square (0, 1, 4, 9, 16, ...) the roots are rational and the expression factors neatly over the integers. If D is positive but not a perfect square, the roots are irrational and it does not factor with integers. If D is negative, it has no real factors.
What is the difference between the discriminant and the quadratic formula?
The discriminant is only the piece b^2 - 4ac under the square root, and it tells you the number and type of roots. The quadratic formula uses that piece inside the full expression x = (-b plus or minus the square root of D) divided by 2a to compute the actual root values. The discriminant classifies; the formula solves.
How do you find the value of k that gives equal roots?
Equal (repeated) roots occur exactly when the discriminant is zero. Write D = b^2 - 4ac in terms of the unknown k, set it equal to 0, and solve. For example, x^2 + kx + 9 = 0 has D = k^2 - 36, so k^2 - 36 = 0 gives k = 6 or k = -6.
Does the discriminant work for all quadratics, including ones with decimals or fractions?
Yes. D = b^2 - 4ac works for any real coefficients a, b and c with a not zero, whether they are integers, decimals or fractions. The sign of D still determines two real, one repeated, or two complex roots. The perfect-square shortcut for rational roots only applies when the coefficients are whole numbers.