Quadratic Equation Solver
Solve ax² + bx + c = 0 for real or complex roots, with discriminant and vertex.
Solving ax² + bx + c = 0
Roots
—
Discriminant (b² − 4ac)
—
Vertex
—
Hover the curve to read x and y at any point. Real roots (if any) are marked where the curve crosses the x-axis.
About this tool
Enter the coefficients a, b, and c of a quadratic equation ax² + bx + c = 0 and this solves it for both roots, shows the discriminant and the vertex, and plots the parabola with the roots marked where it crosses the x-axis. It handles two real roots, one repeated root, and complex roots.
The quadratic formula. The roots are
x = (−b ± √(b² − 4ac)) ÷ 2a
The ± is why there are usually two answers: one using +, one using −.
The discriminant tells you the answer type before you finish. The part under the square root, b² − 4ac, is the discriminant:
| Discriminant | Roots |
|---|---|
| Positive | Two different real roots — the parabola crosses the x-axis twice |
| Zero | One repeated real root — the parabola just touches the x-axis at its vertex |
| Negative | Two complex roots, p ± qi — the parabola never touches the x-axis |
Worked example. For x² − 3x + 2 = 0: a = 1, b = −3, c = 2. Discriminant = 9 − 8 = 1 (positive, so two real roots). x = (3 ± 1) ÷ 2, giving x = 2 and x = 1. Check: (x − 2)(x − 1) expands back to x² − 3x + 2.
Complex roots. When the discriminant is negative, the roots are written a ± bi. The real part is always −b/2a (the vertex's x-coordinate), and the imaginary part is √(−discriminant) ÷ 2a.
The vertex is the parabola's turning point, at x = −b/2a — a minimum if a > 0, a maximum if a < 0. It's what you need for graphing, for the range of the function, and for optimisation problems ("what value of x gives the largest area").
If a = 0 the equation isn't quadratic at all — it's linear (bx + c = 0), with the single root x = −c/b. The tool flags this rather than dividing by zero.
To factor or expand by hand, the roots give you the factored form directly: a(x − r₁)(x − r₂). For other algebra, see the scientific calculator and expression calculator.
Frequently asked questions
- What does the discriminant tell you?
- Its sign gives the root type without solving: positive means two distinct real roots, zero means one repeated real root, negative means two complex roots.
- How are complex roots shown?
- In standard a ± bi form. The real part is −b/2a; the imaginary part comes from the square root of the negative discriminant divided by 2a.
- What is the vertex used for?
- It's the turning point of y = ax² + bx + c, at x = −b/2a — the minimum if a > 0, the maximum if a < 0. Useful for graphing and optimisation.
- What if I enter a = 0?
- The equation becomes linear, not quadratic. The tool shows the single root x = −c/b instead of attempting the quadratic formula.
- Why are my roots slightly off from a textbook answer?
- Results are rounded for display. Irrational roots like √2 are shown as decimals; the exact surd form isn't computed.
- Can I use this to factor a quadratic?
- Yes indirectly — if the roots are r₁ and r₂, the factored form is a(x − r₁)(x − r₂). Nice integer roots mean it factors cleanly.