How to Use the Quadratic Formula

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. The graph of the related function y = ax² + bx + c is a parabola, and the solutions (or roots) are the x-values where that parabola crosses the horizontal axis.

The quadratic formula gives the roots directly, without needing to factor. It works for every quadratic, even ones that do not factor neatly over the integers.

Open the matching Quadratic Equation Solver

Key formula

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

The discriminant tells you what to expect

The discriminant is the value inside the square root, b² − 4ac. It tells you what kind of roots to expect before you calculate. If it is positive, there are two distinct real roots. If it is zero, there is one repeated real root. If it is negative, the square root of a negative number produces two complex roots of the form p ± qi.

Checking the discriminant first saves time and prevents confusion — a negative discriminant is not an error, it just means the roots are complex.

The vertex and axis of symmetry

The vertex of the parabola lies on the axis of symmetry at x = −b ÷ 2a. Substituting that x back into the equation gives the y-coordinate of the turning point. The solver marks the vertex and any real roots on a graph so you can see the geometry behind the algebra.

If a is positive the parabola opens upward and the vertex is a minimum; if a is negative it opens downward and the vertex is a maximum.

When a is zero

If a is zero the equation is not quadratic — it is linear (bx + c = 0) — and you should use the Linear Equation Solver instead. The quadratic formula would divide by 2a = 0, which is undefined.

Decimal and negative coefficients are fully supported, so you can solve equations like 0.5x² − 2.3x + 1 = 0 directly.

Deciding between factoring and the formula

Factoring is shorter when the factors are obvious: x² − 5x + 6 = (x − 2)(x − 3). The formula is the method that still works for decimal coefficients, irrational roots and complex roots.

Compute the discriminant before choosing. When a, b and c are integers and the discriminant is a perfect square (0, 1, 4, 9, 16, …), integer factoring is realistic. Otherwise the formula is the reliable path, and the Factoring Calculator will say so rather than invent factors.

Sum and product of the roots

For ax² + bx + c = 0, the two roots always satisfy two simple relations. Their sum is −b ÷ a and their product is c ÷ a. These come straight from the coefficients, so you can check a pair of roots without re-running the whole formula: add them and multiply them, then compare to −b/a and c/a.

When the roots are complex conjugates p ± qi, the same rules hold: their sum is 2p and their product is p² + q². This is a quick way to confirm that a pair of complex roots was written down correctly.

Worked example

Solve x² − 3x + 2 = 0

  1. 1Identify a = 1, b = −3, c = 2.
  2. 2Compute the discriminant: b² − 4ac = (−3)² − 4(1)(2) = 9 − 8 = 1. Positive, so two real roots.
  3. 3Apply the formula: x = (3 ± √1) ÷ 2 = (3 ± 1) ÷ 2.
  4. 4Two roots: x = (3 + 1) ÷ 2 = 2 and x = (3 − 1) ÷ 2 = 1.
  5. 5Check by factoring: (x − 2)(x − 1) = x² − 3x + 2. ✓

Answer: x = 2 or x = 1

Another worked example

Solve 2x² + 4x + 5 = 0 and describe the graph.

  1. 1a = 2, b = 4, c = 5. Discriminant = 16 − 40 = −24.
  2. 2The discriminant is negative, so there are no real roots and the parabola does not cross the x-axis.
  3. 3x = (−4 ± √(−24)) ÷ 4. Since √24 = 2√6, this simplifies to −1 ± (√6 / 2) i, about −1 ± 1.22i.
  4. 4The vertex is at x = −4 ÷ 4 = −1, and y = 2(1) − 4 + 5 = 3. Because a is positive, (−1, 3) is a minimum sitting above the axis, which matches the lack of real roots.

Answer: x = −1 ± (√6 / 2) i; vertex (−1, 3), opening upward

Another worked example

Solve x² − 5x + 6 = 0 and verify the roots using their sum and product.

  1. 1a = 1, b = −5, c = 6. Discriminant = 25 − 24 = 1, so two real roots.
  2. 2x = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2, giving x = 3 and x = 2.
  3. 3Sum check: 3 + 2 = 5, and −b ÷ a = 5 ÷ 1 = 5. ✓
  4. 4Product check: 3 × 2 = 6, and c ÷ a = 6 ÷ 1 = 6. ✓
  5. 5Both relations match, so the roots are correct.

Answer: x = 3 or x = 2

How to read the result

Real roots are the x-intercepts of the parabola. A positive discriminant means two crossings, zero means the curve touches the axis once, and a negative discriminant means it never crosses. The complex roots in that last case describe the algebra correctly; they simply do not appear as points on the ordinary graph.

The vertex is the turning point, and it is a root only when the discriminant is zero. Its x-coordinate, −b ÷ 2a, is the axis of symmetry. If a is positive the vertex is the lowest point; if a is negative it is the highest.

Limits of this method

The formula needs the equation arranged as ax² + bx + c = 0. A term left on the right-hand side will be read with the wrong sign. x² + 5 = 3x must become x² − 3x + 5 = 0 before you name a, b and c.

If a is 0 there is no parabola and dividing by 2a is undefined. Use the linear solver. For awkward coefficients, keep the radical in the exact answer rather than rounding before you substitute back.

Common mistakes

  • Forgetting the ± sign — there are generally two roots, one from plus and one from minus.
  • Sign errors on b — in the formula b is negated, so for b = −3 you use +3 in the numerator.
  • Dividing only part of the numerator by 2a — the entire (−b ± √…) is divided by 2a.
  • Setting a = 0 and using the quadratic formula anyway — if a is 0, the equation is linear; use the Linear Equation Solver.

Frequently asked questions

What is the discriminant?

It is b² − 4ac, the value inside the square root of the quadratic formula. If positive there are two real roots; if zero, one repeated real root; if negative, two complex roots.

What are complex roots?

When the discriminant is negative, the square root of a negative number produces roots of the form p ± qi, where i is the imaginary unit. The parabola does not cross the x-axis.

Can I use the quadratic formula when a is 0?

No. If a is 0 the equation is linear (bx + c = 0), not quadratic. Use the Linear Equation Solver instead.

Is a complex root a wrong answer?

No. It means the parabola does not cross the x-axis. Report the roots as p ± qi, and say there are no real solutions if that is what the question asked for.

How can I check two roots quickly?

Add them and compare to −b ÷ a, then multiply them and compare to c ÷ a. If both match, the roots are correct — no need to re-run the full formula.

Which root is “the” answer when a word problem allows only one?

The algebra can produce two roots while the situation allows one. A negative length, or a time before the event started, is rejected by the problem even though it satisfies the equation. State that restriction.

Try it yourself

Put the method into practice with the matching calculator.

Open the Quadratic Equation Solver

Related guides