Math

Quadratic Equation Solver

A quadratic equation has an x² term, so there can be two answers, one, or none. Enter the coefficients a, b and c — the calculator applies the quadratic formula, shows the discriminant that decides how many real roots exist, and gives you the vertex so you can see where the parabola turns around.

Result
—
First root (x₁)
—
Second root (x₂)
—
Root type
—
Discriminant b²−4ac
—
Vertex
—

How the quadratic formula works

For ax² + bx + c = 0 with a ≠ 0, the quadratic formula gives both roots directly:

x = [−b ± √(b² − 4ac)] ÷ 2a

The expression under the square root, the discriminant D = b² − 4ac, decides everything before you even take the root. D > 0 means two distinct real roots (the parabola crosses the x-axis twice), D = 0 means one repeated real root (the parabola just touches the axis at its vertex), and D < 0 means no real roots at all (the parabola never reaches the axis, so the roots are complex). This one number is the whole story of a quadratic.

Worked example

Solve x² − 5x + 6 = 0: here a = 1, b = −5, c = 6, so D = 25 − 24 = 1 — two real roots. Then x = (5 ± 1) ÷ 2, giving x₁ = 3 and x₂ = 2. (Factoring confirms it: (x − 3)(x − 2) = x² − 5x + 6.) The vertex sits at x = −b ÷ 2a = 2.5, with y = 2.5² − 5(2.5) + 6 = −0.25, the lowest point of the curve.

Completing the square and why the vertex matters

The same roots emerge by rewriting the equation in vertex form, y = a(x − h)² + k, where h = −b ÷ 2a and k is the value you get by substituting h. Because a square is never negative, the minimum (if a > 0) or maximum (if a < 0) of any parabola is exactly that vertex value k. So D < 0 is really the statement that |k| > 0, and a > 0 < 0 is the statement that the vertex sits above or below the axis.

Practical uses: the vertex gives the maximum revenue or minimum cost of a pricing quadratic; the roots give break-even volumes; and the discriminant is the quickest way to check whether a word problem has a sensible real answer before you start solving.

Frequently asked questions

1. What does the discriminant tell me?

The discriminant b² − 4ac predicts how many real roots exist: greater than zero means two distinct real roots, zero means one repeated real root, and less than zero means no real roots (the solutions are complex).

2. Why can a not be zero?

If a = 0 the x² term vanishes and x² + bx + c = 0 collapses to the linear equation bx + c = 0, which is solved with x = −c ÷ b instead. The quadratic formula divides by 2a, so a must be non-zero.

3. What is the vertex of a parabola used for?

The vertex (h, k) is the turning point of the parabola. On a graph it is the minimum when a > 0 and the maximum when a < 0, which in real problems is usually the profit-maximising or cost-minimising price or quantity.

4. How do I check a quadratic answer quickly?

Substitute the root back into ax² + bx + c and confirm you get 0 — this catches sign slips immediately. You can also confirm that the two roots sum to −b ÷ a and multiply to c ÷ a.

Related tools