How this calculator works
- Step 1Standard formax² + bx + c = 0Move every term to one side.
- Step 2Discriminantb² − 4acTells you how many real roots there are.
- Step 3Roots(−b ± √D) ÷ 2aThe quadratic formula gives both at once.
Every quadratic equation can be written as ax² + bx + c = 0 with a not zero. The quadratic formula then gives the values of x that make it true.
For real roots the calculator uses a rearranged but equivalent form. It avoids the rounding error that can make a very small root come out as zero.
Worked example: 2x² + 9x − 5 = 0
- Quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2a
- ax² coefficient 2
- bx coefficient 9
- cConstant −5
- Discriminant9² − 4 × 2 × (−5)121
- Square root√12111
- Roots(−9 ± 11) ÷ 4x = 0.5 or x = −5
This is OpenStax’s Example 9.21. In Example 9.23, 2x² + 10x + 11 = 0 has the exact roots (−5 ± √3) / 2.
What the discriminant tells you
- PositiveTwo real roots2x² + 9x − 5 = 0: x = 0.5 or x = −5.
- ZeroOne repeated rootx² − 2x + 1 = 0: x = 1 (a repeated root).
- NegativeTwo complex rootsx² + 2x + 5 = 0: x = −1 ± 2i.
Read the result
The headline gives the roots; the table adds the exact form, the discriminant and the vertex of the parabola.
The vertex is the turning point of the graph y = ax² + bx + c. Its x-value, −b ÷ 2a, is halfway between the two roots.
Assumptions and limits
- a is not zeroOtherwise the equation is linear.
- Exact formsShown for whole-number coefficients.
- Six decimalsDecimal answers are rounded for display only.
- Real coefficientsa, b and c must be real numbers.
Related equation tools
A quadratic has up to two roots. Higher degrees and several unknowns need other methods.
For third-degree equations, use the cubic equation calculator. Several linear equations at once are solved by the system of equations calculator, and the root calculator simplifies surds.
Common mistakes
Mistake: Entering x² − 6x = −5 as c = −5.
Instead: Move everything to one side first: x² − 6x + 5 = 0, so c = 5.
Mistake: Dropping the minus sign on b or c.
Instead: Keep each sign with its number.
Mistake: Dividing only √D by 2a.
Instead: Divide the whole top, −b ± √D, by 2a.
Checking the method
Every golden case is re-solved without the quadratic formula, by bisection on the polynomial itself.
An independent script finds each real root by repeatedly halving an interval, completes the square for complex roots, and factorises the discriminant for exact forms. It reproduces OpenStax Examples 9.21 to 9.23.
Read how we test our calculators, or browse more maths calculators.