Mathematics Updated May 17, 2026 🕐 4 min read ✓ Verified

How to Solve Quadratic Equations — All Methods Explained

A quadratic equation is any equation that can be written in the form ax2 + bx + c = 0, where a is not zero. Quadratic equations have at most two solutions (roots). The number of real solutions depends on the discriminant, a value calculated from the coefficients a, b, and c. Understanding how to solve quadratic equations is a foundational algebra skill with applications in physics, engineering, economics, and geometry.

quadratic equations algebra discriminant factoring quadratic-formula

Quick reference

Standard form
ax2 + bx + c = 0
a cannot equal zero
Discriminant
D = b2 - 4ac
Determines number of real roots
D > 0
Two distinct real roots
Parabola crosses x-axis twice
D = 0
One repeated real root
Parabola touches x-axis once

What a quadratic equation is

A quadratic equation is a polynomial equation of degree 2. The general form is ax2 + bx + c = 0, where a, b, and c are real numbers and a is not equal to zero. If a were zero, the x2 term would vanish and the equation would be linear, not quadratic.

The graph of a quadratic function y = ax2 + bx + c is a parabola. When a is positive the parabola opens upward. When a is negative it opens downward. The solutions to ax2 + bx + c = 0 are the x-coordinates of the points where the parabola crosses the x-axis (where y = 0). The number of such crossings — zero, one, or two — determines how many real solutions exist.

Examples of quadratic equations: x2 - 5x + 6 = 0, 2x2 + 3x - 2 = 0, x2 - 4 = 0, x2 + 1 = 0. The last example has no real solutions because no real number squared produces a negative result.

The discriminant — predicting solutions before solving

The discriminant D = b2 - 4ac tells you how many real solutions exist before you do any further calculation.

If D > 0: the equation has two distinct real roots. The parabola crosses the x-axis at two different points. If D = 0: the equation has exactly one real root (a repeated root). The parabola touches the x-axis at exactly one point, its vertex. If D < 0: the equation has no real roots. The solutions are complex (involve the square root of a negative number). The parabola does not cross the x-axis at all.

Example: for x2 - 5x + 6 = 0, a = 1, b = -5, c = 6. D = (-5)2 - 4(1)(6) = 25 - 24 = 1. Since D = 1 > 0, there are two distinct real roots.

Example: for x2 - 2x + 1 = 0, D = 4 - 4 = 0. One repeated root.

Example: for x2 + x + 1 = 0, D = 1 - 4 = -3 < 0. No real roots.

The quadratic formula

Formula
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
The two solutions equal negative b plus or minus the square root of the discriminant, all divided by 2a. The plus sign gives one root and the minus sign gives the other. This formula works for every quadratic equation regardless of whether it can be factored.
aCoefficient of x2 — the leading coefficient. Cannot be zero.
bCoefficient of x — the middle term coefficient
cThe constant term — the value when x = 0
±Means calculate both cases: once with addition, once with subtraction, giving two roots

Worked examples — all methods

Example 1Method 1: Factoring — x2 - 5x + 6 = 0
Given: x2 - 5x + 6 = 0
Result: x = 3 or x = 2

Find two numbers that multiply to c = 6 and add to b = -5. Those numbers are -3 and -2: (-3) x (-2) = 6 and (-3) + (-2) = -5. So: x2 - 5x + 6 = (x - 3)(x - 2) = 0. Setting each factor to zero: x - 3 = 0 gives x = 3. x - 2 = 0 gives x = 2. Verification: (3)2 - 5(3) + 6 = 9 - 15 + 6 = 0. Correct.

Example 2Method 3: Quadratic formula — 2x2 + 3x - 2 = 0
Given: a = 2, b = 3, c = -2
Result: x = 0,5 or x = -2

D = b2 - 4ac = 9 - 4(2)(-2) = 9 + 16 = 25. Square root of D = 5. x = (-3 + 5) / (2 x 2) = 2 / 4 = 0,5. x = (-3 - 5) / 4 = -8 / 4 = -2. Verification: 2(0,5)2 + 3(0,5) - 2 = 0,5 + 1,5 - 2 = 0. Correct.

Example 3No real solutions — x2 + x + 1 = 0
Given: a = 1, b = 1, c = 1
Result: No real solutions (D = -3)

D = 12 - 4(1)(1) = 1 - 4 = -3. Since D < 0, the square root of D is not real. The two complex solutions are x = (-1 + i*sqrt(3)) / 2 and x = (-1 - i*sqrt(3)) / 2, where i is the imaginary unit. The parabola y = x2 + x + 1 lies entirely above the x-axis and never crosses it.

Solve any quadratic equation

Enter a, b and c coefficients to get both roots, the discriminant, and step-by-step working.

Open Equation Solver →

Method 2: Completing the square

Completing the square converts ax2 + bx + c = 0 into the form (x + p)2 = q, which can then be solved by taking the square root of both sides.

For x2 + 6x + 5 = 0: Step 1: Move constant to right side: x2 + 6x = -5. Step 2: Add (b/2)2 = (6/2)2 = 9 to both sides: x2 + 6x + 9 = 4. Step 3: Factor the left side: (x + 3)2 = 4. Step 4: Square root both sides: x + 3 = +2 or x + 3 = -2. Step 5: Solve: x = -1 or x = -5.

Completing the square is more work than factoring or the quadratic formula for most equations, but it is important because it is the algebraic technique used to derive the quadratic formula itself, and it appears directly in calculus and in converting conic sections to standard form.

Choosing the right method

SituationBest methodReason
Equation can be factored easilyFactoringFastest when factors are obvious
Cannot identify factors quicklyQuadratic formulaAlways works, guaranteed solution
Need to derive the vertex of a parabolaCompleting the squareGives vertex form directly
Graphing calculator availableGraphical methodVisual — shows nature of roots clearly
a = 1 and b is evenCompleting the squareClean arithmetic, easy to execute

Common mistakes

✗ Forgetting that two different sign combinations from the quadratic formula give two separate roots
✓ Calculate both x = (-b + sqrt(D)) / (2a) and x = (-b - sqrt(D)) / (2a) separately. They are different equations and produce different results unless D = 0.
✗ Dividing by a variable when solving, which loses solutions
✓ Never divide both sides by x or any expression containing x. This eliminates x = 0 as a potential solution. Instead factor out the common term: x2 - 3x = 0 should be factored as x(x - 3) = 0, giving x = 0 or x = 3.
✗ Incorrectly reading off a, b, c when the equation is not in standard form
✓ Always rearrange to ax2 + bx + c = 0 first. For 3x2 = 2x - 1, rewrite as 3x2 - 2x + 1 = 0 giving a = 3, b = -2, c = 1. The sign of each term is part of the coefficient.
✗ Concluding that no real solutions means no solutions
✓ Complex solutions exist even when D < 0. The equation has no real roots but does have two complex conjugate roots. In many applied problems, complex roots indicate a physically impossible scenario. In pure mathematics, they are valid solutions.

Methodology

All solutions verified by substitution back into the original equation. The quadratic formula is derived by completing the square on the general form ax2 + bx + c = 0. The discriminant D = b2 - 4ac determines the nature of roots: D > 0 (two real), D = 0 (one real repeated), D < 0 (two complex conjugate roots).

Formula source: standard algebra. The quadratic formula has been known in various forms since Babylonian mathematics circa 2000 BCE.

Cite this guide
APAMLAChicago
Last updated: May 2026

Solve any quadratic equation now

Enter a, b and c to get both roots, the discriminant, vertex, and full step-by-step solution.

Solve now →

Frequently asked questions

What is the discriminant and why does it matter?
The discriminant is D = b2 - 4ac. It determines how many real solutions the equation has before you solve it. D > 0 means two distinct real roots. D = 0 means exactly one real root (the parabola is tangent to the x-axis). D < 0 means no real roots and two complex conjugate roots. Checking the discriminant first saves time — if D < 0 you know immediately that no real solutions exist.
When should I use factoring vs the quadratic formula?
Use factoring when you can quickly identify two integers that multiply to c and add to b. This works well when a = 1 and c is a small integer. Use the quadratic formula when factoring is not obvious, when a is not 1, when coefficients are large, or when you need an exact numerical answer. The quadratic formula always works. Factoring is faster when it applies.
Why does the quadratic formula have a plus-or-minus sign?
Because the equation has at most two roots. The plus-minus (±) notation means you calculate the formula twice: once adding the square root of the discriminant and once subtracting it. This produces two values of x, which are the two roots. When D = 0, both calculations give the same result, confirming the single repeated root.
What does it mean if a quadratic has complex roots?
Complex roots occur when D < 0 and the square root of a negative number appears in the quadratic formula. The roots take the form p + qi and p - qi, where i is the imaginary unit (square root of -1). In the context of graphing, complex roots mean the parabola does not cross the x-axis. In physics and engineering, complex roots often indicate oscillating or resonant behaviour in systems.
Sources & References

Formula based on standard mathematical and financial methods. Results are for informational purposes. Last reviewed May 2026. Version 1.