Math

Quadratic Equation Solver

Solve any quadratic equation, with the discriminant, the roots and the vertex shown and explained.

Loading tool...

Need this done properly for your business?

Radiatus delivers secure cloud, DevOps & compliance engineering.

Book a free consult

The discriminant tells you what to expect

Before solving, b² − 4ac decides the shape of the answer. Positive gives two distinct real roots, so the parabola crosses the x-axis twice. Zero gives one repeated root, where the parabola touches the axis at its vertex. Negative gives two complex conjugate roots and no real crossing at all. Checking it first tells you whether a real-world problem expecting two answers is going to produce none.

The formula, and when not to use it

The quadratic formula always works, but factoring is faster when the roots are simple integers, and completing the square is what reveals the vertex directly. For x² − 5x + 6, spotting that 2 and 3 multiply to 6 and add to 5 is quicker than any substitution. The formula is the reliable fallback, not the only route.

The vertex and why it is usually the point

The vertex sits at x = −b / 2a, and substituting back gives the y-coordinate. When a is positive the parabola opens upward and the vertex is the minimum; when negative it opens downward and the vertex is the maximum. In applied problems this is generally what is being asked — maximum height, minimum cost, optimal price — and it exists whether or not the equation has real roots.

Catastrophic cancellation in floating point

When b² is much larger than 4ac, one of the two roots is computed by subtracting two nearly equal numbers, and floating-point precision collapses. Numerical libraries avoid this by computing the well-conditioned root with the standard formula and deriving the other from the fact that the roots multiply to c/a. Naive implementations return a visibly wrong second root for equations like x² + 10⁸x + 1, which is a real and frequently encountered failure rather than a theoretical concern.

Complex roots are still answers

A negative discriminant gives roots of the form p ± qi. They are meaningless for a problem about physical distance and essential in electrical engineering, control theory and signal processing, where they describe oscillation. Discarding them as errors is only correct if the model genuinely required real values.

Check by expanding

Roots r and s satisfy r + s = −b/a and r × s = c/a. That takes seconds and catches sign errors, which are the most common mistake in solving by hand. It is a better check than re-running the formula, because it tests the answer rather than repeating the method.

Frequently Asked Questions

Privacy & Security

Data: None
Client-side-Side
Active
v

About This Tool

This tool runs entirely in your browser. No data is sent to any server, ensuring complete privacy. Simply use the interface above to get started — no registration or login required.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.