Quadratic Equation Solver

Solve ax² + bx + c = 0 instantly. Get real or complex roots, the discriminant, vertex, and full step-by-step working.

Enter the coefficients of ax² + bx + c = 0.



Quadratic formula diagram with discriminant cases illustrated
Quadratic formula diagram with discriminant cases illustrated

How to Use the Quadratic Equation Solver

  1. Identify the coefficients a, b, and c in your equation ax² + bx + c = 0.
  2. Enter a, the coefficient of x². It cannot be zero for a true quadratic.
  3. Enter b, the coefficient of x, and c, the constant term. Decimals and negatives are fine.
  4. Click Solve. You will see the discriminant, both roots (real or complex), the vertex, and step-by-step working.
  5. Use the vertex to sketch the parabola: it opens upward if a is positive, downward if negative.

Quadratic Formula and Discriminant

Every quadratic equation ax² + bx + c = 0 is solved by the quadratic formula: x equals negative b plus or minus the square root of (b squared minus 4ac), all divided by 2a. The expression under the root, D = b² − 4ac, is called the discriminant, and it tells you the nature of the roots before you compute them. If D is positive, there are two distinct real roots and the parabola crosses the x-axis twice. If D is zero, there is one repeated root and the parabola touches the axis exactly at its vertex. If D is negative, the roots are a complex conjugate pair and the parabola never reaches the axis. The vertex of the parabola sits at x = −b/2a, which is also the axis of symmetry and the midpoint of the two roots. Completing the square is the classical derivation: dividing by a, moving c over, adding (b/2a)² to both sides, and taking roots leads directly to the formula. The solver also handles the degenerate case a = 0 gracefully, reducing to a linear equation instead of crashing.

Worked Example

Solve x² − 5x + 6 = 0. Here a = 1, b = −5, c = 6. The discriminant is (−5)² − 4(1)(6) = 25 − 24 = 1, positive, so expect two real roots. Applying the formula: x = (5 ± √1) / 2, giving x = 3 and x = 2. Check by factoring: x² − 5x + 6 = (x − 2)(x − 3), confirming both roots. The vertex is at x = 5/2 = 2.5, y = 6.25 − 12.5 + 6 = −0.25. For a complex case, solve x² + 2x + 5 = 0: D = 4 − 20 = −16, so roots are (−2 ± 4i)/2 = −1 ± 2i. For a repeated root, x² − 4x + 4 = 0 gives D = 16 − 16 = 0 and x = 2 twice, matching the perfect square (x − 2)². Notice how the discriminant predicted each outcome. In physics, quadratics model projectile motion; in finance they appear in profit optimization; in geometry they describe conic sections. Wherever a squared term appears, this solver gives you the full picture in one click.

Vieta's Formulas: A Free Check on Your Answer

The two roots of a quadratic are connected to its coefficients by Vieta's formulas: the sum of the roots equals −b/a, and the product of the roots equals c/a. For x² − 5x + 6 = 0, the roots 2 and 3 give a sum of 5, matching −(−5)/1, and a product of 6, matching 6/1. This gives you a ten-second way to verify any pair of roots, and it also works in reverse: if a question tells you the roots are 2 and 3, you can write the equation immediately.

Factored Form and Vertex Form

The same quadratic can be written in three useful ways. Standard form ax² + bx + c shows the coefficients. Factored form a(x − r₁)(x − r₂) displays the roots directly: x² − 5x + 6 = (x − 2)(x − 3). Vertex form a(x − h)² + k shows the turning point: x² − 5x + 6 = (x − 2.5)² − 0.25, whose vertex (2.5, −0.25) matches the value the calculator reports. Choose the form to match your goal: factored form for roots, vertex form for maxima and minima, standard form for the discriminant and the formula above.

Quadratics in the Real World

The most famous appearance of quadratics is projectile motion. A ball launched upward at 20 m/s has height h = −5t² + 20t meters after t seconds (using g ≈ 10 m/s²). It peaks at the vertex, t = −20/(2 × −5) = 2 seconds, where h = −5(4) + 40 = 20 meters, and it lands when h = 0 — the roots 0 and 4 seconds. The same mathematics sets prices in businesses (revenue curves peak at the vertex), designs satellite dishes and headlight reflectors (which are parabolic), and sizes structures in engineering.

Frequently Asked Questions

What is the discriminant?

The discriminant D = b² − 4ac determines root type: positive means two real roots, zero means one repeated root, negative means two complex roots.

What if a is zero?

Then it is not quadratic. The solver detects this and solves the linear equation bx + c = 0 instead, giving x = −c/b.

How do I handle complex roots?

When D is negative, roots are complex conjugates a ± bi. They appear in AC circuit analysis, control theory, and quantum mechanics even though they are not real numbers.

Can quadratics be solved by factoring?

Sometimes, when roots are rational. But the formula always works, including for irrational and complex roots where factoring is impractical.

What does the vertex tell me?

The vertex (−b/2a, f(−b/2a)) is the parabola's minimum (a > 0) or maximum (a < 0). In optimization problems, it is usually the answer you actually want.

What are Vieta's formulas?

Shortcuts connecting roots to coefficients: for ax² + bx + c = 0, the roots add up to −b/a and multiply to c/a. For x² − 5x + 6 = 0, the roots 2 and 3 sum to 5 and multiply to 6 — a quick way to check your answer.

How do I convert standard form to vertex form?

Complete the square. For x² − 5x + 6, half of −5 is −2.5: add and subtract 6.25 to get (x − 2.5)² − 0.25, which reveals the vertex (2.5, −0.25) directly.

Why does a quadratic have at most two roots?

A parabola can cross the x-axis at most twice — the graph shows why. Algebraically, the quadratic formula's ± produces at most two distinct values, and when the discriminant is zero they merge into one repeated root.

Related Calculators

For more advanced math try our Scientific Calculator and solve linear systems with our Matrix Calculator.

Parabola graph shapes for positive negative and zero discriminant
Parabola graph shapes for positive negative and zero discriminant

Scroll to Top