Quadratic Formula and Discriminant D: How to Solve Step by Step

Contents
When you're solving a quadratic equation ax²+bx+c=0, it's easy to look at the sign of the discriminant D and get confused about whether the roots are real or imaginary. And when you plug b into the quadratic formula, a wrong sign flips your answer. Most of the time that's an arithmetic slip, not a gap in your understanding.
If you check the sign of the discriminant D=b²-4ac first, the number and type of roots are settled before you do any calculating. After that, you just plug the coefficients into the quadratic formula in order. This post walks through that order of checks and the substitution step by step, focusing on how the calculation actually works.
Summary ① If the discriminant D=b²-4ac is positive, there are two distinct real roots; if it's 0, there's a double root; if it's negative, there are two imaginary roots. ② In the formula x=(-b±√D)/2a, you plug in -b, which has the sign flipped once more, not b. ③ If D<0, √D doesn't exist as a real number, so you attach the imaginary unit i and write the answer as real part ± imaginary part·i.
Why one sign change flips the answer in quadratic equations
Let's solve the quadratic equation x²-5x+6=0 with the quadratic formula. Here a=1, b=-5, and c=6.
In the formula x=(-b±√D)/2a, you don't put in b=-5. You put in -b, which is -(-5)=5. Skip that sign flip and use -5 as is, and the numerator ends up backwards, so both roots come out with the opposite sign.
Even if you correctly get the discriminant D=(-5)²-4(1)(6)=25-24=1, missing the sign at the -b step makes the final answer wrong. When you solve by hand without a calculator, this is where most mistakes happen.
How to calculate with the discriminant and the quadratic formula
Finding the roots of a quadratic equation always follows the same order. Check that a isn't 0, find the discriminant, then substitute into the quadratic formula based on its sign.
Step 1: Check whether a is 0 first
If a=0, the x² term disappears and it's no longer a quadratic equation — it becomes the linear equation bx+c=0. In that case you just solve x=-c/b. If you use the quadratic formula anyway, the denominator 2a becomes 0 and the calculation breaks down.
Step 2: Calculate the discriminant D=b²-4ac
Since b is squared, the result is always 0 or greater regardless of its sign. The 4ac term is either added or subtracted depending on the signs of a and c.
Step 3: Use the sign of D to determine the type of roots
- D>0 → two distinct real roots: x=(-b±√D)/2a
- D=0 → a double root: x=-b/2a
- D<0 → two imaginary roots: a complex number with real part -b/2a and imaginary part √|D|/2a (real part ± imaginary part·i)
Working through all three cases with actual coefficients
Case D>0 — 2x²+5x-3=0 Here a=2, b=5, and c=-3, so D=5²-4(2)(-3)=25+24=49, which is positive. Since √49=7, x=(-5±7)/4, which gives x1=0.5 and x2=-3.
Case D=0 — x²-6x+9=0 Here a=1, b=-6, and c=9, so D=(-6)²-4(1)(9)=36-36=0. You get just one value, x=-b/2a=6/2=3, and this is called a double root.
Case D<0 — x²+2x+5=0 Here a=1, b=2, and c=5, so D=2²-4(1)(5)=4-20=-16, which is negative. √|D|=4 divided by 2a=2 gives 2 for the imaginary part, and -b/2a=-1 is the real part, so the roots are -1±2i.
Check it with our tool.
Enter the coefficients a, b, and c and the discriminant and the formula substitution are calculated as you type. Free to use, no login.

Three places people get it wrong
The mistakes that keep coming up in quadratic formula calculations usually fall into three categories.
| Mistake | What went wrong | Correct calculation |
|---|---|---|
| Plugging in the sign of b as is | The quadratic formula uses -b, not b. When b=-5, -b is 5, but many people skip the sign flip and put in -5 directly | Find -b first, then substitute (b=-5 → -b=5) |
| Treating a=0 as a quadratic equation | If a=0, there's no x² term and it becomes a linear equation (bx+c=0). Plugging that into the quadratic formula makes the denominator 2a equal to 0 | If a=0, use x=-c/b instead of the quadratic formula |
| Leaving out i when D<0 | √D can't be computed as a real number when it's under a negative sign, yet the absolute value alone gets written as if it were a real root | Always write the imaginary unit i in the form real part ±(√ |
The a=0 case is confusing because the x² term isn't always obviously missing from the problem — sometimes the a slot ends up as 0 partway through rearranging the terms. An equation like that was never a quadratic equation to begin with, so the discriminant isn't even defined.
Ending at "no roots in the real numbers" when D<0 is a different question from finding the two imaginary roots in the complex numbers. If a problem asks you to solve with the quadratic formula, it usually wants the latter, so leaving out i gives you an incomplete answer.
Recap
- The sign of the discriminant D=b²-4ac determines the number and type of roots before you calculate. D>0 means two distinct real roots, D=0 means a double root, and D<0 means two imaginary roots.
- In the quadratic formula x=(-b±√D)/2a, you plug in -b, not b. Skip that extra sign flip and both roots come out with the opposite sign.
- If a=0, it wasn't a quadratic equation to begin with — it's a linear equation, so you calculate x=-c/b instead of using the quadratic formula.
- When D<0, √D doesn't exist as a real number, so the answer is only complete when you write it in the form real part ± imaginary part·i with the imaginary unit i.
- If you want to check a calculation you did by hand, enter the same coefficients and compare the discriminant and the substitution step by step.
Enter the coefficients a, b, and c and the discriminant and the formula substitution are calculated as you type. Free to use, no login.
Frequently asked questions
What exactly does the discriminant D tell you?
The discriminant D=b²-4ac is the value that goes inside the square root sign √D in the quadratic formula. Its sign decides whether √D is real, zero, or imaginary, so it tells you the number and type of roots in advance.
When D=0, is there one root or two?
In the calculation you get just one value, x=-b/2a, but a quadratic equation is supposed to have two roots, so this value counts as repeated twice. That's why it's called a "double root" to distinguish it from two distinct real roots.
If D<0, does that mean the quadratic equation has no answer?
There's no answer among the real numbers, but if you extend to the complex numbers, two imaginary roots exist. You put √|D|·i in place of √D in the formula x=(-b±√D)/2a and get the answer in the form real part ± imaginary part·i.
Can I use decimals or fractions for a, b, and c?
Yes. The discriminant and the quadratic formula work the same way even when a, b, and c aren't integers. The messier the coefficients get — decimals or negative numbers — the easier it is to slip up on signs when calculating by hand, so entering them into a tool and checking the substitution step by step is a good way to verify your work.
This article was adapted from our Korean original. Read the Korean original