Quadratic Equation Solver
Enter the three coefficients of ax² + bx + c = 0. You get the discriminant first — because it tells you what kind of answer to expect — then the roots, the vertex and the factored form.
Coefficients
a cannot be zero — that would make the equation linear, not quadratic.
Read the discriminant before the roots
The quantity b² − 4ac sits under the square root in the quadratic formula, and its sign determines the entire character of the solution before you compute anything else. Positive means the parabola crosses the x-axis twice. Zero means it touches at exactly one point — a repeated root. Negative means it never touches the axis at all, and the roots are a complex conjugate pair. Checking the discriminant first tells you whether an answer with an imaginary part is a mistake or exactly what should happen.
Why complex roots are still shown
Many calculators simply report "no solution" when the discriminant is negative. That is misleading. There are always two roots; they just are not real numbers. In electrical engineering, control theory and signal processing, complex roots are the interesting case — they describe oscillation. Suppressing them hides the physics.
Vertex, axis and what they tell you
The vertex sits at x = −b / 2a, which is also the axis of symmetry. If a is positive the parabola opens upward and the vertex is the minimum; if a is negative it opens downward and the vertex is the maximum. This is the whole basis of solving optimisation problems with quadratics — maximum revenue, minimum cost, peak projectile height.
Numerical stability
When b² is much larger than 4ac, the textbook formula subtracts two nearly equal numbers for one of the roots, and floating-point arithmetic loses precision badly. This solver uses the numerically stable variant that computes the larger-magnitude root first and derives the other from the product of the roots, so results stay accurate even with wildly different coefficient scales.