How to Solve a Quadratic Equation: Formula, Discriminant and Examples
Solve ax squared plus bx plus c equals zero with the quadratic formula, understand the discriminant and complex roots, and check answers with a solver.

Quadratic equations appear in school maths, physics problems, business break-even models and engineering. Solving one by hand is a useful skill, and checking the answer takes seconds with the free Quadratic Equation Solver. This guide explains the method so that you understand what the solver is doing.
Quick answer
For ax² + bx + c = 0, the solutions are x = (−b ± √(b² − 4ac)) / 2a. The part under the square root, b² − 4ac, is called the discriminant. If it is positive there are two real roots, if zero one repeated root, and if negative two complex roots.
The Quadratic Equation Solver with the coefficients a, b and c entered.
Worked example 1: two real roots
Solve x² − 5x + 6 = 0. Here a = 1, b = −5, c = 6.
- Discriminant: (−5)² − 4(1)(6) = 25 − 24 = 1.
- Square root of the discriminant: 1.
- x = (5 ± 1) / 2, so x = 3 or x = 2.
Check: 3² − 15 + 6 = 0 and 2² − 10 + 6 = 0. Both work. This equation also factors as (x − 2)(x − 3) = 0.
Worked example 2: complex roots
Solve x² + 2x + 5 = 0. Here a = 1, b = 2, c = 5.
- Discriminant: 4 − 20 = −16, which is negative.
- The square root of −16 is 4i, where i is the imaginary unit.
- x = (−2 ± 4i) / 2 = −1 ± 2i.
There are no real roots, which means the graph never touches the x-axis. The solver shows the complex pair in this form.
What the discriminant tells you
| Discriminant | Roots | The parabola |
|---|---|---|
| Positive | Two different real roots | Crosses the x-axis twice |
| Zero | One repeated real root | Touches the x-axis once |
| Negative | Two complex roots | Does not cross the x-axis |
The vertex and axis of symmetry
The graph of a quadratic is a parabola. Its turning point, the vertex, lies at x = −b / 2a. For x² − 5x + 6 the vertex is at x = 2.5, and its y value is −0.25, so the vertex is (2.5, −0.25). The axis of symmetry is the vertical line x = 2.5. The vertex gives the maximum or minimum value, which is useful in profit and projectile problems.
Ways to solve a quadratic
- Factorising is fastest when the numbers are small and the roots are whole.
- The quadratic formula always works, and it is what the solver uses.
- Completing the square shows where the formula comes from and gives the vertex form.
- Graphing shows the roots as the points where the curve crosses the x-axis.
Common mistakes
- Forgetting that a cannot be zero. If a = 0 the equation is linear, not quadratic.
- Losing a sign on b. When b is negative, −b becomes positive.
- Dividing only part of the numerator by 2a. The whole of (−b ± √D) is divided.
- Not rearranging the equation to equal zero first.
Where quadratics are used
- Projectile motion: the height of a thrown ball over time.
- Business: revenue and profit as functions of price, to find the best price.
- Area problems: finding the dimensions of a rectangle when its area and perimeter relation is known.
- Engineering and computing graphics.
Frequently asked questions
What if the discriminant is not a perfect square? The roots are irrational, such as 1 ± √3. The solver shows decimal values.
Can I use it to check my homework? Yes. Work it out by hand first and use the solver to verify.
Why are complex roots shown? Because a negative discriminant still has solutions in the complex number system, which many courses cover.
Next step
Enter your coefficients in the Quadratic Equation Solver. For other maths helpers see the Exponent and Root Calculator and the Standard Deviation Calculator.

