Quadratic Formula Calculator
Find the real roots of ax² + bx + c = 0, with the discriminant.
Roots
- Discriminant (b² − 4ac)
- Real roots
How we calculated this
Worked example
Inputs: a = 1, b = −5, c = 6. Formula: x = (−b ± √(b² − 4ac)) ÷ 2a. Substitution: the discriminant is (−5)² − 4 × 1 × 6 = 25 − 24 = 1, so x = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2. Result: x = 2 or x = 3.
How it works
The discriminant D = b² − 4ac decides the case: with D greater than 0 there are two real roots, with D equal to 0 there is one repeated root, and with D less than 0 there are no real roots. Roots are listed smallest first. This calculator works in the real numbers only, so a negative discriminant is reported as no real roots; the two roots are then complex numbers, which are not calculated here. The coefficient a cannot be 0, because the equation would then be linear rather than quadratic. The discriminant is calculated exactly from the numbers you typed, so a repeated root is never mistaken for two roots (or none) by rounding, and the roots use the numerically stable form of the formula so that a very small root is not lost. An exact root is shown as a plain number and a rounded one with a leading "≈" (10 significant figures); the working writes each root as an equation with "=" or "≈".
What this result means
The roots are the values of x that make ax² + bx + c equal to zero. The discriminant b² − 4ac decides how many real roots there are: two when it is positive, one repeated root when it is zero, and none when it is negative.
Common mistakes
- Using a = 0. The equation is then linear (bx + c = 0), not quadratic, and the quadratic formula would divide by zero.
- Losing the sign of b. The formula uses −b, so for b = −5 the first term is +5.
Assumptions and limitations
- Real roots only. When the discriminant is negative there are two complex roots, which this calculator does not calculate.
- Roots are listed smallest first. A root is marked exact only when the coefficients have up to 15 significant digits and the root is provably rational.
