Deriving and Using the Quadratic Formula: A Step-by-Step Guide
Solve any quadratic equation with confidence. We explain how the quadratic formula works, how to find the discriminant, and what the roots represent.

Solve any quadratic equation instantly with step-by-step working using our Quadratic Formula Calculator, or read our comprehensive guide below.
In algebra, a quadratic equation is any equation that can be rearranged in standard form as:
ax² + bx + c = 0
Where x represents an unknown, and a, b, and c represent known numbers, where a is not equal to zero. When you graph a quadratic equation, it forms a U-shaped curve called a parabola. Solving the equation means finding where the parabola crosses the x-axis. These points are called the "roots" or "x-intercepts."
Before applying any method, always rearrange the equation so one side equals zero and the terms sit in descending order: x² term, x term, constant. Most student errors are born in this rearrangement step, not in the formula itself.
The Quadratic Formula
While some quadratic equations can be factored easily, the quadratic formula is a universal method that works for all quadratic equations, no matter how complex the numbers are.
x = [-b ± √(b² - 4ac)] / 2a
Step-by-Step Example
Let's solve the equation: 2x² - 5x - 3 = 0
-
Identify a, b, and c:
- a = 2
- b = -5
- c = -3
-
Plug into the formula: x = [-(-5) ± √((-5)² - 4 * 2 * -3)] / (2 * 2)
-
Simplify the discriminant (the part under the square root): Discriminant = 25 - (-24) = 49
-
Calculate the square root: √49 = 7
-
Solve for the two possible values of x (using ±):
- Option 1 (Plus): x = (5 + 7) / 4 = 12 / 4 = 3
- Option 2 (Minus): x = (5 - 7) / 4 = -2 / 4 = -0.5
The roots of the equation are 3 and -0.5.
Always verify roots by substitution when time allows. Plugging x = 3 into the original gives 2(9) - 5(3) - 3 = 18 - 15 - 3 = 0, exactly as required.
Enter your own numbers and see the result instantly — free, no signup.
Where the Formula Comes From: Completing the Square
The quadratic formula is not a spell to memorize blindly. It is what falls out when you solve the general equation once, using a technique called completing the square.
Start with ax² + bx + c = 0 and divide everything by a:
x² + (b/a)x + c/a = 0
Move the constant across: x² + (b/a)x = -c/a. Now add (b/2a)² to both sides, which turns the left side into a perfect square:
(x + b/2a)² = (b² - 4ac) / 4a²
Take the square root of both sides — remembering the ±, because both a positive and negative root square to the same value:
x + b/2a = ±√(b² - 4ac) / 2a
Subtract b/2a, and the famous formula appears: x = [-b ± √(b² - 4ac)] / 2a. Every quadratic you will ever meet is solved by this single act of completing the square, done in advance.
Understanding the Discriminant
The expression underneath the square root, b² - 4ac, is called the discriminant. It tells you exactly how many real solutions the equation has before you even finish the math:
| Discriminant Value | Number of Roots | Graph Appearance |
|---|---|---|
| Positive (>0) | Two real roots | The parabola crosses the x-axis in two places. |
| Zero (=0) | One real root | The tip (vertex) of the parabola touches the x-axis exactly once. |
| Negative (<0) | No real roots (Two complex/imaginary roots) | The parabola does not touch the x-axis at all. |
Smart solvers compute the discriminant first, before any other work. It takes ten seconds, and it tells you whether to expect two answers, one answer, or complex answers — so a surprise ending never catches you off guard.
Case 1: Two Real Roots
Solve x² + 6x + 5 = 0. Here a = 1, b = 6, c = 5.
The discriminant is 36 - 20 = 16, and √16 = 4. Then x = (-6 + 4) / 2 = -1, or x = (-6 - 4) / 2 = -5.
Check: at x = -1, we get 1 - 6 + 5 = 0. At x = -5, we get 25 - 30 + 5 = 0. Both roots work.
Case 2: One Repeated Root
Solve x² - 4x + 4 = 0. The discriminant is 16 - 16 = 0, so the ± contributes nothing.
The single root is x = 4 / 2 = 2. The parabola y = x² - 4x + 4 just grazes the x-axis at its vertex, touching at exactly x = 2.
Equations like this one also factor perfectly, as (x - 2)². A zero discriminant is your signal that a perfect-square factorization was hiding there all along.
Case 3: Complex Roots
Solve x² + 2x + 5 = 0. The discriminant is 4 - 20 = -16, which is negative, so no real roots exist.
Using √-16 = 4i, the formula gives x = (-2 ± 4i) / 2, which simplifies to x = -1 + 2i and x = -1 - 2i. Complex roots always arrive in conjugate pairs like this.
A Real-World Example: The Rectangle Problem
Word problems are where the formula earns its keep. Suppose a rectangle's length is 3 meters more than its width, and its area is 40 square meters. Find its dimensions.
Let the width be w. Then the length is w + 3, and area gives w(w + 3) = 40, or w² + 3w - 40 = 0.
The discriminant is 9 + 160 = 169, and √169 = 13. So w = (-3 + 13) / 2 = 5, or w = (-3 - 13) / 2 = -8.
A width of -8 meters is physically meaningless, so we discard it. The rectangle is 5 meters by 8 meters, and indeed 5 × 8 = 40. Negative roots appear often in applied problems; the context decides whether they count.
The Vertex and the Axis of Symmetry
The formula also hands you the parabola's most important point for free. The axis of symmetry sits at x = -b / 2a — the very expression the ± splits around.
For our first example, 2x² - 5x - 3, the axis is x = 5 / 4 = 1.25. Substituting back, the vertex is at (1.25, -6.125), the lowest point of the curve.
Notice the roots 3 and -0.5 average to exactly 1.25. The axis always lies midway between the roots, which makes a beautiful self-check for any quadratic you solve.
Factoring, Graphing, or the Formula?
Factoring is fastest when it works, but many quadratics refuse to factor over the integers. x² + 6x + 5 factors neatly; x² + 6x + 2 does not, and only the formula (or completing the square) will crack it.
Graphing shows you the roots visually and builds intuition, but reading exact values off a curve is unreliable unless the roots are whole numbers.
The formula is the universal fallback: slower than lucky factoring, but guaranteed. Professionals typically glance for a factorization for a few seconds, then switch to the formula without hesitation.
If you want the guaranteed route with every step displayed, the Quadratic Formula Calculator shows the substitution as well as the answer, and the Square Root Calculator helps when you need to simplify the radical part by hand.
Common Mistakes to Avoid
Losing the sign of b. When b is negative, -b becomes positive. In 2x² - 5x - 3, the formula starts with -(-5) = +5. Writing -5 instead is the single most common quadratic error.
Dividing only part of the numerator by 2a. The bar under the formula covers everything: both -b and the square root term are divided. Splitting the division halfway produces answers that fail every substitution check.
Forgetting the ±. Stopping after the "plus" root throws away half the answer set. Two roots exist whenever the discriminant is positive, and an exam will rarely forgive a missing one.
Applying the formula before setting the equation to zero. If the equation reads x² = 5x - 6, you must first rewrite it as x² - 5x + 6 = 0. Reading off b = 5 from the unarranged form flips its sign and ruins the result.
FAQ
Why do we need the ± symbol? Because a square root has both a positive and negative solution. For example, 3² is 9, but (-3)² is also 9. The ± ensures we find both places where the parabola crosses the x-axis.
Can 'a' ever be zero? No. If 'a' is zero, the x² term disappears. The equation becomes bx + c = 0, which is a linear equation (a straight line), not a quadratic equation (a parabola).
What if the discriminant is not a perfect square? The roots are then irrational numbers. You can leave them in exact radical form, such as x = ±√2 for the equation x² - 2 = 0, or approximate them as decimals (±1.414) when the problem asks for measurements.
Does the formula work with fractions or decimals as coefficients? Yes. The formula accepts any real values for a, b, and c, including fractions and decimals. If fractions make you uneasy, multiply the entire equation by the common denominator first to clear them, then apply the formula as usual.
For complex equations that require immediate answers with step-by-step breakdown, use the CalcUnit Quadratic Formula Calculator.



