The Quadratic Formula Explained: Discriminant, Vertex and Worked Examples
The quadratic formula x = (−b ± √(b² − 4ac)) / 2a solves every quadratic equation in one line, but the line hides a small story about completing the square, the geometry of parabolas, and a single number — the discriminant — that decides whether you get two roots, one, or none. Here is how all of that fits together, with worked numbers you can drop straight into the calculator.
One formula that solves every quadratic
A quadratic equation is anything you can write as ax² + bx + c = 0 with a non-zero. The quadratic formula calculator takes the three coefficients and returns the values of x that make the left-hand side equal zero. There are at most two of them, and the formula that produces them looks like this:
x = (−b ± √(b² − 4ac)) / 2a
That single line is one of the most reliably useful results in all of school algebra. It works on every quadratic, gives an exact answer whenever the coefficients are exact, and tells you straight away — through the sign of one sub-expression — whether you are dealing with two roots, one, or none over the real numbers. The rest of this article unpacks where the formula comes from, what each piece of it means, and how to read its output without getting lost in the symbols.
Where the formula comes from: completing the square
The quadratic formula is not a magic chant. It is the result of doing the same algebraic move — completing the square — once and for all on a generic ax² + bx + c = 0 so you never have to do it again. The derivation is worth stepping through once because it explains every appearance of every symbol in the final formula.
Start with ax² + bx + c = 0 and divide through by a:
x² + (b/a)x + c/a = 0
Move the constant across, then add (b/2a)² to both sides so the left becomes a perfect square:
x² + (b/a)x + (b/2a)² = (b/2a)² − c/a
Tidy the right-hand side over a common denominator of 4a² and factor the left as a square:
(x + b/2a)² = (b² − 4ac) / 4a²
Take the square root of both sides — remembering both branches, hence the ± — and isolate x:
x + b/2a = ± √(b² − 4ac) / 2a
x = (−b ± √(b² − 4ac)) / 2a
That is the formula in its standard textbook form. Every piece of it has a story: the −b/2a in the numerator is the axis of symmetry of the underlying parabola, the b² − 4ac under the root is the discriminant, and the 2a in the denominator comes from the (b/2a)² move that made the square complete. Hold those three ideas in mind and the formula stops feeling arbitrary.
The discriminant: one number that decides everything
The expression Δ = b² − 4ac sitting under the square root has a name — the discriminant — because its sign discriminates between the three possible kinds of root. You can read the nature of the solutions off the discriminant before you ever take a square root or apply the ±.
- Δ > 0: two distinct real roots. The parabola
y = ax² + bx + ccrosses the x-axis at two different points. - Δ = 0: one real repeated root, equal to
x = −b/(2a). The parabola just touches the x-axis at its vertex. - Δ < 0: no real roots. The parabola never crosses the x-axis. The formula still works, but the square root of a negative number produces a pair of complex conjugate roots.
The same Δ also predicts whether a quadratic with integer coefficients will factor nicely over the rationals: it factors cleanly if and only if Δ is a perfect square (0, 1, 4, 9, 16…). That is a useful sanity check when you are deciding whether to bother with the formula or just try to factor.
A worked example, step by step
Take the equation 2x² − 4x − 6 = 0. Read off the coefficients: a = 2, b = −4, c = −6. Plug into the quadratic formula calculator if you want to see every intermediate value on screen, or follow the four steps by hand:
- Discriminant:
Δ = (−4)² − 4·2·(−6) = 16 + 48 = 64. Positive, so two real roots. - Square root:
√64 = 8. - Numerator:
−b ± √Δ = 4 ± 8, giving 12 and −4. - Denominator:
2a = 4. Divide each numerator value:x = 12/4 = 3andx = −4/4 = −1.
Cross-check by factoring: 2x² − 4x − 6 = 2(x − 3)(x + 1), which is zero exactly when x = 3 or x = −1. Both checks agree. The same numbers come out of the calculator with a few extras — the vertex, the axis of symmetry, the discriminant itself, and the sum and product of the roots — but the manual procedure is identical to what the code does under the hood.
Now try a quadratic with no real roots: x² + 2x + 5 = 0. Here Δ = 4 − 20 = −16. The square root becomes √(−16) = 4i, the formula returns x = (−2 ± 4i)/2 = −1 ± 2i, and the two roots are complex conjugates. The parabola sits entirely above the x-axis with its vertex at (−1, 4); it never crosses, which is precisely why no real root exists.
Vertex, axis of symmetry, and the shape of the parabola
The function y = ax² + bx + c traces out a parabola. The vertex of that parabola is the point where it turns around — the minimum if it opens upward, the maximum if it opens downward — and it always sits at x = −b/(2a). Substitute that x back into the equation and the y-coordinate simplifies to y = c − b²/(4a).
That formula for the vertex is not a separate fact you need to memorise. It falls out of the derivation above: x + b/2a = ±√Δ/2a is symmetric around x = −b/2a, so when the two roots exist they sit equidistant on either side. The vertical line x = −b/2a is the parabola's axis of symmetry, and the parabola is mirror-symmetric across it.
Whether the parabola opens upward or downward is determined entirely by the sign of a. Positive a opens upward, negative a opens downward; the magnitude of a controls how steeply it climbs. A useful sketch in your head: a = 1 is the unit parabola y = x²; a = 2 is the same shape squashed horizontally by a factor of √2; a = −1 is the unit parabola flipped upside down. The calculator reports the vertex, axis of symmetry and opening direction so you can build the sketch directly without having to plot points.
Vieta's formulas: two quick sanity checks
If r₁ and r₂ are the two roots of ax² + bx + c = 0, then:
- Sum of roots:
r₁ + r₂ = −b/a - Product of roots:
r₁ · r₂ = c/a
These are Vieta's formulas. They follow from expanding a(x − r₁)(x − r₂) = ax² + bx + c and matching coefficients. They are useful for two things. First, they give a fast sanity check after you compute the roots: if your sum and product do not match −b/a and c/a, something has gone wrong. In the worked example above, 3 + (−1) = 2 = −(−4)/2 and 3·(−1) = −3 = −6/2, both ticked.
Second, Vieta lets you go the other direction — build a quadratic with given roots — without ever invoking the formula. If you want the roots 5 and −2, sum is 3 and product is −10, so the monic quadratic with those roots is x² − 3x − 10 = 0. That trick comes up a lot when you are designing exam questions or working backwards from desired solutions.
Common mistakes to avoid
Most of the errors people make when applying the quadratic formula by hand come from a small list of habits worth being deliberate about.
- Sign of b. The formula has −b in the numerator, not b. If the equation already has a negative b, the negatives cancel; if b is positive, the −b is negative. Slow down on this step.
- Brackets on 4ac. When a or c is negative,
4accan flip sign in a way that surprises you. Write the multiplication out with explicit parentheses:4·(2)·(−6)rather than4·2·−6. - Dividing only part of the numerator. The 2a denominator divides the entire numerator, both the −b and the ±√Δ. Write the fraction with a long bar so you do not accidentally divide one term and not the other.
- Forgetting a is non-zero. If a = 0 the equation collapses to
bx + c = 0, which is linear, not quadratic. The formula divides by 2a and would explode. Always check that you actually have a quadratic before reaching for the formula. - Stopping at the discriminant. Computing Δ is the first step, not the last. A common slip is to write Δ = 64, conclude “two real roots”, and forget to finish the calculation.
How to solve a quadratic in practice
The quadratic formula is not always the fastest route. A practical workflow looks like this:
- Try to factor first if the coefficients are small integers. If you can spot two integers whose product is ac and whose sum is b, you have a factored form in seconds.
- If factoring is not obvious, compute the discriminant. If Δ is a perfect square, the equation does factor over the rationals — try a bit harder or use the formula. If it is not a perfect square, the formula is your fastest path.
- Reach for the formula for anything with decimal coefficients or any quadratic you need to solve at speed without hunting for factors.
- Use the calculator for repeated problems. The quadratic formula calculator on this page also returns the vertex, axis of symmetry and Vieta sums, which the by-hand procedure does not give you for free.
Completing the square — the very move that derives the formula — is also worth knowing as a separate technique. It is how you convert ax² + bx + c into vertex form a(x − h)² + k, which is what you need for graphing and for solving optimisation problems where the vertex is the actual answer you care about.
When the formula is not enough
Quadratics are degree-two polynomials. Once the highest power of x climbs to three, four or higher, the quadratic formula stops applying. Cubic and quartic polynomials do have their own closed-form solutions — the cubic formula and Cardano's formula respectively — but they are messy enough that in practice everyone just numerically solves them. From degree five onward, no closed-form solution in radicals exists at all (the Abel–Ruffini theorem), and numerical root-finding is the only path.
Inside the quadratic world, the formula always works, but it is not always the most numerically robust route on a computer. When b² is much larger than 4ac and they have the same sign, the discriminant can be a small difference of two large numbers and floating-point cancellation can wipe out precision. Production code typically uses the alternative form x = 2c / (−b ∓ √(b² − 4ac)) for whichever of the two roots would otherwise suffer. The numbers in textbook exercises never hit that regime, but it is worth knowing the trick exists.
Frequently asked questions
For a tighter reference covering the formula, the discriminant, complex roots, Vieta's formulas, the vertex, and the common manual-calculation traps, see the FAQ block on the quadratic formula calculator page itself. Those answers are short and designed to be skimmed alongside the calculator output. The article above gives the longer story behind each of them.
Frequently asked questions
What does the quadratic formula actually solve?
It solves any equation that can be written in the standard form ax² + bx + c = 0 where a, b and c are real numbers and a is non-zero. The two values it returns are the points where the parabola y = ax² + bx + c crosses (or touches, or fails to cross) the horizontal axis. Almost every real-world quadratic — projectile motion, area problems, breakeven analysis — can be rearranged into this form so the formula applies.
Why does the formula always have ±?
Because squaring loses sign information. If something squared equals a positive number d, that something could be either +√d or −√d. The quadratic formula is derived by completing the square and then taking a square root, so the ± is just keeping both possibilities on the table. When the discriminant is positive you really do get two distinct roots; when it is zero the two values collapse into one; when it is negative the two roots become complex conjugates.
What is the discriminant and what does each sign mean?
The discriminant is Δ = b² − 4ac, the quantity under the square root. Its sign classifies the roots without you having to compute them: Δ > 0 means two distinct real roots and a parabola that cuts the x-axis twice; Δ = 0 means one real repeated root and a parabola tangent to the x-axis at its vertex; Δ < 0 means no real roots, a complex conjugate pair, and a parabola that floats entirely above or below the x-axis.
When should I use the formula instead of factoring?
Factoring is faster when the coefficients are small integers and the roots are rational, because you can spot the factors by inspection. The quadratic formula is the right choice when the discriminant is not a perfect square, when the coefficients are decimals, or when you simply want a reliable mechanical procedure that never fails. It also produces exact surd answers when the discriminant is a non-square integer, which is harder to read off a factored form.
Can the quadratic formula handle complex roots?
Yes — when the discriminant is negative, the square root in the numerator becomes the square root of a negative number, which the formula keeps as i·√|Δ|. The two roots then take the form x = −b/(2a) ± i·√|Δ|/(2a): a real part and an imaginary part of opposite signs. Complex roots always come in conjugate pairs for polynomials with real coefficients.
How do I find the vertex of the parabola from a, b and c?
The vertex sits on the axis of symmetry at x = −b/(2a). Substitute that x back into y = ax² + bx + c to get the y-coordinate, which simplifies to y = c − b²/(4a). When a > 0 the parabola opens upward and the vertex is the minimum; when a < 0 it opens downward and the vertex is the maximum. The two roots, when real, are mirror images across the vertical line x = −b/(2a).
What can go wrong when I use the formula by hand?
The two most common slips are sign errors on b (forgetting that −b in the formula flips the sign you read off the equation) and bracket errors when computing 4ac with negative coefficients. A third trap is catastrophic cancellation when b² and 4ac are both large but close in value: the discriminant comes out as a small difference of two large numbers and floating-point precision suffers. Using a calculator like the one on this page sidesteps both pitfalls.
Is the quadratic formula taught the same way everywhere?
The formula itself is universal — it has been known in essentially its modern form since the work of al-Khwarizmi in the 9th century — but conventions differ. Some textbooks write it as x = (−b ± √(b² − 4ac)) / 2a, some as x = (−b ± √Δ) / 2a after defining Δ separately, and a few prefer the alternative form x = 2c / (−b ∓ √(b² − 4ac)), which is numerically more stable in the catastrophic-cancellation case mentioned above.
Informational only. Not personalised financial, legal, or tax advice.