How to Solve Quadratic Equations (With Examples)

By Anatolie · Updated 2026-11-21

A quadratic equation is any equation that can be written as ax² + bx + c = 0, with a not zero. Factoring works when the numbers are friendly, but the quadratic formula works every time — and one part of it, the discriminant, tells you what kind of answer to expect before you finish.

Step 1: get it into standard form

The formula needs everything on one side and zero on the other. For example, 3x² = 2x + 1 becomes 3x² − 2x − 1 = 0, so a = 3, b = −2, c = −1. Watch the signs: b and c include their minus signs. If a works out to 0, the equation is linear, not quadratic, and has at most one solution.

The quadratic formula

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

The ± gives the two solutions: one with a plus, one with a minus. The 2a divides the whole top line, not just the square root.

The discriminant: what kind of roots

The expression under the square root, D = b² − 4ac, decides the outcome:

DiscriminantRootsThe parabola…
D > 0two different real rootscrosses the x-axis twice
D = 0one repeated real rootjust touches the x-axis
D < 0two complex roots (a conjugate pair)never meets the x-axis

If D is a perfect square (with whole-number a, b, and c), the roots are rational and the equation could also have been factored.

Worked examples

Two real roots. x² − 5x + 6 = 0: D = 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving x = 3 and x = 2. Check: (x − 2)(x − 3) expands back to the original.

One repeated root. 2x² + 4x + 2 = 0: D = 16 − 16 = 0, so x = −4 ÷ 4 = −1.

Complex roots. x² + 2x + 5 = 0: D = 4 − 20 = −16. The square root of −16 is 4i, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i.

From the rearranged example. 3x² − 2x − 1 = 0: D = 4 + 12 = 16, so x = (2 ± 4) ÷ 6, giving x = 1 and x = −1/3.

The quadratic equation solver shows the discriminant, both roots (real or complex), and the vertex for any a, b, and c.

The vertex

The turning point of the parabola sits halfway between the roots, at x = −b ÷ 2a. Substitute that back in for the y-value. For x² − 5x + 6, the vertex is at x = 2.5, y = 6.25 − 12.5 + 6 = −0.25. If a is positive the vertex is a minimum; if negative, a maximum.

Two quick checks

For any quadratic, the roots add up to −b/a and multiply to c/a. For x² − 5x + 6: 3 + 2 = 5 and 3 × 2 = 6, as expected. It's a fast way to catch a sign error.

Common mistakes

  • Dropping the sign of b: with b = −5, −b is +5.
  • Dividing only the square root by 2a instead of the whole numerator.
  • Writing −b² instead of b²: b² is never negative, even when b is.
  • Using the formula before moving every term to one side.

For decimal roots you'd rather see as fractions, the fraction converter turns 0.333… back into 1/3.