How-to guides · 3 min read
Quadratic Formula Step by Step: Worked Examples

The formula and when to use it
A quadratic equation has an x² term and can be written as ax² + bx + c = 0, with a ≠ 0. The quadratic formula gives the solutions directly from the three coefficients: x = (−b ± √(b² − 4ac)) ÷ (2a). The ± sign means you work out two answers, one with plus and one with minus.
Use it whenever factoring is not obvious. It always works, which makes it the safest choice. If you are curious where it comes from, read the quadratic formula: where it comes from, and for the wider picture see the guide to solving quadratic equations.
Five steps every time
- 1. Rearrange the equation so one side is zero: ax² + bx + c = 0.
- 2. Identify a, b and c, including their signs.
- 3. Compute the discriminant D = b² − 4ac.
- 4. Substitute into x = (−b ± √D) ÷ 2a.
- 5. Simplify and check each answer in the original equation.
The discriminant D tells you what to expect before you go further. If D is positive there are two real solutions. If D is zero there is one repeated solution. If D is negative there are no real solutions, only complex ones.
| Discriminant D = b² − 4ac | Number of real solutions | Graph |
|---|---|---|
| D > 0 | Two | Crosses the x-axis twice |
| D = 0 | One (repeated) | Touches the x-axis once |
| D < 0 | None | Does not reach the x-axis |
Example 1: two solutions
Solve x² − 3x − 4 = 0. Here a = 1, b = −3 and c = −4.
- D = (−3)² − 4(1)(−4) = 9 + 16 = 25
- x = (3 ± √25) ÷ 2 = (3 ± 5) ÷ 2
- x = 8 ÷ 2 = 4, or x = −2 ÷ 2 = −1
Live solver: x² − 3x − 4 = 0
- Factored form: (x − 4)(x + 1)
- Discriminant D = 25
- Vertex: (1.5, −6.25)
Step-by-step working 6 steps
- 1Identify a, b and c
x² − 3x − 4 = 0 a = 1, b = −3, c = −4
- 2Calculate the discriminant
D = b² − 4ac = (−3)² − 4(1)(−4) = 25
D is positive: two different real roots.
- 3Apply the quadratic formula
x = (−b ± √D) / 2a = (3 ± √25) / 2 = (3 ± 5) / 2
- 4Solve for both roots
x₁ = 4 x₂ = −1
- 5Check by substitution
f(4) = 0 f(−1) = 0
Both should be 0 (allowing for tiny rounding).
- 6Vertex of the parabola
x = −b / 2a = 1.5, y = −6.25 → vertex (1.5, −6.25)
The parabola opens upward, so the vertex is the minimum point.
Check x = 4: 16 − 12 − 4 = 0 ✓. Check x = −1: 1 + 3 − 4 = 0 ✓. Because D = 25 is a perfect square, the answers are whole numbers, which also means this one could have been factored as (x − 4)(x + 1).
Example 2: a leading coefficient other than 1
Solve 2x² + 3x − 2 = 0. Now a = 2, b = 3, c = −2.
- D = 3² − 4(2)(−2) = 9 + 16 = 25
- x = (−3 ± 5) ÷ 4
- x = 2 ÷ 4 = 1/2, or x = −8 ÷ 4 = −2
Live solver: 2x² + 3x − 2 = 0
- Factored form: 2(x − 0.5)(x + 2)
- Discriminant D = 25
- Vertex: (−0.75, −3.125)
Step-by-step working 6 steps
- 1Identify a, b and c
2x² + 3x − 2 = 0 a = 2, b = 3, c = −2
- 2Calculate the discriminant
D = b² − 4ac = (3)² − 4(2)(−2) = 25
D is positive: two different real roots.
- 3Apply the quadratic formula
x = (−b ± √D) / 2a = (−3 ± √25) / 4 = (−3 ± 5) / 4
- 4Solve for both roots
x₁ = 0.5 x₂ = −2
- 5Check by substitution
f(0.5) = 0 f(−2) = 0
Both should be 0 (allowing for tiny rounding).
- 6Vertex of the parabola
x = −b / 2a = −0.75, y = −3.125 → vertex (−0.75, −3.125)
The parabola opens upward, so the vertex is the minimum point.
Do not forget that the denominator is 2a = 4, not just a. A frequent error is dividing only the square root by 2a.
Example 3: one repeated solution
Solve x² − 6x + 9 = 0. Here D = (−6)² − 4(1)(9) = 36 − 36 = 0, so the square root term disappears.
Live solver: x² − 6x + 9 = 0
- Discriminant D = 0
- Vertex: (3, 0)
Step-by-step working 4 steps
- 1Identify a, b and c
x² − 6x + 9 = 0 a = 1, b = −6, c = 9
- 2Calculate the discriminant
D = b² − 4ac = (−6)² − 4(1)(9) = 0
D is zero: one repeated real root.
- 3One repeated root
x = −b / 2a = 6 / 2 = 3
- 4Vertex of the parabola
x = −b / 2a = 3, y = 0 → vertex (3, 0)
The parabola opens upward, so the vertex is the minimum point.
The only solution is x = 6 ÷ 2 = 3. This equation is a perfect square, (x − 3)² = 0, and its graph just touches the x-axis at x = 3.
Example 4: no real solutions
Solve x² + 2x + 5 = 0. D = 2² − 4(1)(5) = 4 − 20 = −16, which is negative.
Live solver: x² + 2x + 5 = 0
- No real x-intercepts: the parabola never crosses the x-axis.
- Discriminant D = −16
- Vertex: (−1, 4)
Step-by-step working 4 steps
- 1Identify a, b and c
x² + 2x + 5 = 0 a = 1, b = 2, c = 5
- 2Calculate the discriminant
D = b² − 4ac = (2)² − 4(1)(5) = −16
D is negative: no real roots — two complex roots.
- 3Complex roots
x = (−2 ± √16·i) / 2 x = −1 ± 2i
The square root of a negative number introduces i, where i² = −1.
- 4Vertex of the parabola
x = −b / 2a = −1, y = 4 → vertex (−1, 4)
The parabola opens upward, so the vertex is the minimum point.
You cannot take the square root of a negative number within the real numbers, so there are no real solutions. In courses that include complex numbers, the answers are written as x = −1 ± 2i.
Putting the equation in standard form first
The formula needs the equation set equal to zero. Solve x² + 4x = 5: subtract 5 from both sides to get x² + 4x − 5 = 0, so a = 1, b = 4, c = −5. Then D = 16 + 20 = 36, and x = (−4 ± 6) ÷ 2, which gives x = 1 or x = −5.
The "plus" solution of x² + 4x − 5 = 0
Order-of-operations steps 4 steps
Start: (−4 + √(36)) ÷ 2
- Square root
√(36) = 6→ (−4 + 6) ÷ 2 - Negate
−4 = −4→ (−4 + 6) ÷ 2 - Add
−4 + 6 = 2→ 2 ÷ 2 - Divide
2 ÷ 2 = 1→ 1
If a term is missing, its coefficient is 0. For 3x² − 12 = 0, b = 0, so D = 0 − 4(3)(−12) = 144 and x = ±12 ÷ 6 = ±2.
Common mistakes and how to avoid them
- Sign of b. If b is −3, then −b is +3, and b² is +9, not −9.
- Dropping a negative c. With c = −4, the term −4ac becomes +16 when a = 1.
- Dividing wrongly. The whole numerator (−b ± √D) is divided by 2a.
- Forgetting the second root. The ± means two solutions unless D = 0.
- Not rearranging to zero first.
You can check every step of your own examples in the quadratic equation solver, which also shows the factored form and the vertex. When the equation factors easily, factoring trinomials can be quicker, and the algebra formulas cheat sheet keeps the formula handy.
Frequently asked questions
When should I use the quadratic formula instead of factoring?
Use it whenever factoring is not obvious or the numbers are awkward. It works for every quadratic equation.
What is the discriminant?
It is the expression b² − 4ac under the square root. It tells you whether there are two, one or no real solutions.
Can a quadratic have only one solution?
Yes, when the discriminant is zero. The graph touches the x-axis at a single point.
What if a = 0?
Then the equation is not quadratic; it is linear and can be solved with simple inverse operations.
Keep reading
How to Factor Trinomials Step by Step (With Examples)
Factor x² + bx + c and ax² + bx + c with the product-and-sum and AC methods. Worked examples, a check by FOIL and how to spot prime trinomials.
ConceptsThe Quadratic Formula: Where It Comes From
A short derivation of the quadratic formula by completing the square, the meaning of the discriminant, and a worked example you can check with the solver.
Charts & referencesAlgebra Formulas Cheat Sheet: Identities, Exponents, Quadratics
The algebra formulas you need most: special products, exponent and log rules, the quadratic formula, slope and distance, with a worked check.
How-to guidesHow to Complete the Square Step by Step (With Examples)
Complete the square to solve quadratics and find the vertex. Clear steps, worked examples with a ≠ 1, a graph and the link to the quadratic formula.