🔢 Quadratic Equation Calculator
Solve the quadratic equation ax² + bx + c = 0 using the quadratic formula.
f(x) = ax² + bx + c
Quadratic Formula
x = (−b ± √(b² − 4ac)) / 2a
Discriminant
D = b² − 4ac
D > 0: Two distinct real roots
D = 0: Repeated root (double root)
D < 0: Two complex roots
Vertex
x_v = −b / 2a
y_v = c − b² / 4a
The vertex of the parabola. Minimum when a > 0, maximum when a < 0.
Vieta's Formulas
x₁ + x₂ = −b/a
x₁ · x₂ = c/a
Worked Examples
x² − 5x + 6 = 0 has D = 25 − 24 = 1, so x = (5 ± 1) / 2 gives x₁ = 3 and x₂ = 2.
x² + 4x + 8 = 0 has D = 16 − 32 = −8, so the roots are the complex conjugates −2 + 2i and −2 − 2i.
Assumptions and Limits
Results are rounded to six decimals, and a must not be zero - otherwise the equation is linear rather than quadratic. Complex roots are shown with the imaginary unit i. Vieta relations (sum −b/a, product c/a) hold for every root type, including complex ones.
Frequently Asked Questions
- What does the discriminant tell me?
- D = b² − 4ac decides the root type: positive gives two distinct real roots, zero a repeated root where the parabola touches the x-axis, and negative two complex conjugate roots.
- Why must a be non-zero?
- If a = 0 the x² term disappears and bx + c = 0 is a straight line with the single root −c/b. Dividing by a, as the quadratic formula does, would also be undefined.
- What is the vertex of the parabola?
- The vertex sits at x = −b/2a with y = c − b²/4a. It is the minimum when a > 0 and the maximum when a < 0, and it coincides with the repeated root when D = 0.