Quadratic Formula Calculator
Test cases replayed : 4 of 4 match · Methodology · No outside source listed
Enter the coefficients a, b and c of ax² + bx + c = 0 to get both roots, real or complex.
Result
Root x₁ (real part if complex)
Discriminant b² − 4ac
- Type of roots
- Root x₂ (real part if complex)
- Imaginary part ± (0 if real)
- Vertex x = −b ÷ 2a
- Vertex y
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- a (coefficient of x², not 0): enter a number.
- b (coefficient of x): enter a number.
- c (constant term): enter a number.
- Read the result: Root x₁ (real part if complex); the panel also shows Discriminant b² − 4ac, Type of roots, Root x₂ (real part if complex), Imaginary part ± (0 if real), Vertex x = −b ÷ 2a and Vertex y.
How this calculator works
The quadratic formula gives the roots of ax² + bx + c = 0 (a ≠ 0): x = (−b ± √(b² − 4ac)) ÷ 2a. It comes from completing the square.
The discriminant D = b² − 4ac decides the kind of roots: D > 0 gives two real roots, D = 0 one repeated root, D < 0 two complex roots −b ÷ 2a ± i√(−D) ÷ 2a.
The vertex of the parabola y = ax² + bx + c sits halfway between the roots, at x = −b ÷ 2a.
The formula
| Symbol | Meaning |
|---|---|
| a (coefficient of x², not 0) | |
| b (coefficient of x) | |
| c (constant term) | |
| Discriminant b² − 4ac | |
| Root x₁ (real part if complex) |
Worked example
| a (coefficient of x², not 0) | 1 |
|---|---|
| b (coefficient of x) | -3 |
| c (constant term) | 2 |
| Discriminant b² − 4ac | 1 |
|---|---|
| Type of roots | Two distinct real roots |
| Root x₂ (real part if complex) | 1 |
| Imaginary part ± (0 if real) | 0 |
| Vertex x = −b ÷ 2a | 1.5 |
| Vertex y | -0.25 |
Root x₁ (real part if complex) 2
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
What does a negative discriminant mean?
The parabola never crosses the x-axis, so there is no real root; the two roots are complex conjugates. For x² + 2x + 5 = 0 they are −1 ± 2i.
What if a = 0?
The equation is then linear (bx + c = 0), not quadratic, and the formula does not apply: the answer is x = −c ÷ b.
Why are there two roots?
A parabola can cross the x-axis at two points. The ± in the formula gives both.