Quadratic Equation Solver
Solve ax² + bx + c = 0 with discriminant, real or complex roots, vertex, and factored form.
Written by Golam Rabbani, Founder & Lead Engineer
How to use this quadratic equation solver
- Enter the coefficient a (the number in front of x²). It cannot be zero.
- Enter the coefficient b (the number in front of x).
- Enter the constant term c.
- Press Solve to see the discriminant calculation, the roots, the parabola vertex, and the factored form when the roots are integers.
- Use Copy to send the full breakdown to your clipboard, or Reset to start over.
About this quadratic equation solver
The quadratic equation solver finds the roots of ax² + bx + c = 0 using the quadratic formula x = (−b ± √(b² − 4ac)) / 2a. The tool shows the discriminant calculation explicitly so you can see why the roots are real, repeated, or complex, then prints the vertex of the parabola at (−b/2a, c − b²/4a) and — when the roots are integers — the factored form.
As a worked example, entering a = 1, b = −5, c = 6 gives a discriminant of (−5)² − 4·1·6 = 25 − 24 = 1, which is positive, so there are two distinct real roots. The roots are x₁ = (5 + 1)/2 = 3 and x₂ = (5 − 1)/2 = 2. The vertex sits at (2.5, −0.25) and the factored form is (x − 2)(x − 3) = 0.
Use it for algebra homework, projectile-motion problems, parabola sketching, and any time you need to confirm a quick root calculation. A negative discriminant returns complex conjugate roots in the form p ± qi rather than NaN, so quadratics with no real solutions still produce a meaningful answer.
FAQ
- What does the discriminant tell me?
- The discriminant b² − 4ac determines the nature of the roots. If it is positive there are two distinct real roots, if it is zero there is one repeated real root, and if it is negative there are two complex conjugate roots.
- What if I enter a = 0?
- The tool refuses and shows an error. With a = 0 the equation is linear (bx + c = 0), not quadratic, so the quadratic formula does not apply.
- How does the factored form work?
- When both roots are integers and a is an integer, the tool prints a factored form like (x − r₁)(x − r₂) = 0. For non-integer or irrational roots the factored form is omitted to avoid misleading rounding.
- Where does the vertex come from?
- The vertex of the parabola y = ax² + bx + c is at x = −b / 2a, and y is found by substituting that x back into the equation. The tool reports both coordinates.
- Does this handle complex roots?
- Yes. When the discriminant is negative the roots are returned as p + qi and p − qi, where p = −b/2a and q = √(−disc)/2a.
- Is the solver free and private?
- Yes. The calculation runs entirely in your browser. Nothing is uploaded, stored, or logged.