Not every quadratic equation factors neatly. By looking only at the sign of the discriminant D=b²−4ac, you can tell in advance how many roots there are, and the quadratic formula lets you find even irrational roots exactly.
The quadratic formula x = (−b ± √(b²−4ac)) / 2a works for every quadratic equation ax²+bx+c=0 (a≠0).
The b²−4ac inside the formula is called the discriminant (D). Because it appears under the square root, its sign tells you in advance how many real roots there will be — D>0 means two distinct real roots, D=0 means a repeated root (one real root), and D<0 means there are no real roots.
Use the sliders to change a, b, and c and see for yourself how the discriminant and roots change.