Quadratic Equation Solver
Free quadratic equation solver — real and complex roots, discriminant, and vertex of ax² + bx + c = 0, with the formula shown.
Free quadratic equation solver — real and complex roots, discriminant, and vertex of ax² + bx + c = 0, with the formula shown.
Solve any quadratic with the discriminant and vertex shown — learn the why, not just the answer.
Height-vs-time physics problems are quadratics — find when the ball lands (roots) and its peak (vertex).
Max profit and min cost problems reduce to finding a parabola's vertex — computed directly here.
Negative discriminant? Get the full complex answer instead of a dead-end "no solution."
The flight of a thrown ball is a parabola — the roots tell you where it lands.
Find where a quadratic cost or revenue curve crosses zero or peaks.
x = (−b ± √(b² − 4ac)) / 2a solves any equation of the form ax² + bx + c = 0. The ± gives the two roots: one adding the square root term, one subtracting it. It works for every quadratic, including those that don't factor nicely.
The discriminant is b² − 4ac, the expression under the square root. Positive → two distinct real roots (the parabola crosses the x-axis twice). Zero → one repeated root (the parabola touches the axis at its vertex). Negative → two complex conjugate roots (the parabola never touches the x-axis).
When the discriminant is negative, the roots take the form p ± qi, where i = √(−1). They are perfectly valid mathematically and appear as conjugate pairs. In many applied contexts (like lengths and times) they signal "no real solution exists", but in fields like electrical engineering and control theory complex roots carry real physical meaning.
The turning point, at x = −b/2a. If a > 0 the parabola opens upward and the vertex is the minimum; if a < 0 it opens downward and the vertex is the maximum. The vertex is essential for optimization problems — maximum profit, peak height of a projectile, minimum cost.
Both are valid solutions to the equation; only one may be valid for the situation you are modelling. A quadratic describing the flight of a ball returns two times at which height equals zero, one of them before the throw and therefore negative. A quadratic for the width of a rectangle returns a negative width alongside the real one. The algebra has no knowledge of what the variable represents, so discarding the impossible root is your job, not the formula's — and it is the step most often skipped.
When b² is much larger than 4ac, the square root comes out very close to b, and one of the two roots is computed by subtracting two nearly equal numbers. In floating-point arithmetic that subtraction discards most of the significant digits — an effect called catastrophic cancellation — so the smaller root can be badly wrong even though the formula is correct. Numerical libraries avoid it by computing the well-conditioned root first and obtaining the other from the fact that the roots multiply to c/a.