Algebra 9 min read

The Quadratic Formula Explained: How to Solve Any Quadratic Equation

A complete guide to the quadratic formula — what it is, where it comes from, how to use it, and how to interpret the discriminant. Includes multiple worked examples.

Basic Math Tools Editorial Team
Published June 15, 2026
Updated July 1, 2026
Reviewed for Accuracy

What Is a Quadratic Equation?

A quadratic equation is a polynomial equation of degree 2, meaning the highest power of the variable is 2. The standard form is:

ax² + bx + c = 0

Where a, b, and c are constants and a ≠ 0. Every quadratic equation can have zero, one, or two real solutions (also called roots or zeros).

The Quadratic Formula

The quadratic formula gives you the solutions (x values) of any quadratic equation in standard form:

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

The ± symbol means there are typically two solutions: one using + and one using −.

Where Does the Formula Come From?

The quadratic formula is derived by completing the square on the general form ax² + bx + c = 0. Here are the key steps:

  1. Divide both sides by a: x² + (b/a)x + (c/a) = 0
  2. Move c/a to the right: x² + (b/a)x = −c/a
  3. Complete the square by adding (b/2a)² to both sides
  4. Factor the left side as a perfect square: (x + b/2a)² = (b² − 4ac) / 4a²
  5. Take the square root of both sides and solve for x

This derivation proves the formula works for any values of a, b, and c — making it one of the most powerful tools in algebra.

The Discriminant: Predicting the Number of Solutions

The expression under the square root sign — b² − 4ac — is called the discriminant (often written as Δ or D).

Discriminant ValueNumber of SolutionsType of Solutions
Δ > 02Two distinct real solutions
Δ = 01One repeated real solution (double root)
Δ < 00 realTwo complex (imaginary) solutions

Worked Examples

Example 1: Two Real Solutions (Δ > 0)

Solve: x² − 5x + 6 = 0

Here, a = 1, b = −5, c = 6

  • Discriminant: (−5)² − 4(1)(6) = 25 − 24 = 1 (positive, so two solutions)
  • x = (−(−5) ± √1) / (2 × 1)
  • x = (5 ± 1) / 2
  • x₁ = (5 + 1) / 2 = 6/2 = 3
  • x₂ = (5 − 1) / 2 = 4/2 = 2

Solutions: x = 3 and x = 2

Verification: (3)² − 5(3) + 6 = 9 − 15 + 6 = 0 ✓ and (2)² − 5(2) + 6 = 4 − 10 + 6 = 0 ✓

Example 2: One Real Solution (Δ = 0)

Solve: x² − 6x + 9 = 0

Here, a = 1, b = −6, c = 9

  • Discriminant: (−6)² − 4(1)(9) = 36 − 36 = 0
  • x = (6 ± √0) / 2 = 6/2 = 3

Solution: x = 3 (double root)

This means x² − 6x + 9 = (x − 3)².

Example 3: No Real Solutions (Δ < 0)

Solve: x² + 2x + 5 = 0

Here, a = 1, b = 2, c = 5

  • Discriminant: (2)² − 4(1)(5) = 4 − 20 = −16 (negative)
  • This equation has no real solutions — only complex solutions: x = −1 ± 2i

Tips for Using the Quadratic Formula

  • Always rearrange to standard form first. Make sure the equation equals zero before identifying a, b, and c.
  • Watch the sign of b. If the equation is x² − 5x + 6 = 0, then b = −5 (not +5). The formula uses −b, which would be −(−5) = +5.
  • Check your discriminant first. Computing the discriminant before the full formula tells you immediately how many real solutions to expect.
  • Simplify the radical if possible. √12 can be simplified to 2√3, which often leads to cleaner solutions.