Quadratic Formula Calculator
Roots, discriminant and vertex — including the complex roots most calculators refuse.
Updated
x² term
x term
constant
Roots of ax² + bx + c = 0
x = 2 or 1
Discriminant b² − 4ac = 1, so there are two distinct real roots.
- Discriminant
- 1
- Vertex
- (1.5000, -0.2500)
- Axis of symmetry
- x = 1.5000
- Sum of the roots
- 3
- Product of the roots
- 2
The sum and product lines are a free check on the answer: for any quadratic the roots must add to −b/a and multiply to c/a. If your own working gives roots that fail those two, the slip is in the working rather than in the formula.
In short
What does the discriminant tell you?
The sign of b² − 4ac decides how many real roots exist. Positive gives two, zero gives one repeated root, and negative gives none — the two roots are complex conjugates instead. For x² − 3x + 2 the discriminant is 1, so there are two: x = 2 and x = 1.
A negative discriminant means no REAL roots. It does not mean the equation has no solutions.
How to use the quadratic formula calculator
A quadratic equation is any equation of the form ax² + bx + c = 0 where a is not zero. The quadratic formula solves all of them: x equals minus b, plus or minus the square root of b squared minus four a c, all over two a. It works regardless of whether the expression factorises neatly, which is why it is worth having when factoring stalls.
The part under the square root is called the discriminant, and it is the number to read first. It decides the entire character of the answer before you have computed a single root. Positive means the parabola crosses the x axis twice. Zero means it touches at exactly one point. Negative means it never reaches the axis at all.
b² − 4ac
The discriminant
read its sign first
−b/a
The roots always sum to
Vieta's first formula
c/a
And always multiply to
Vieta's second
Those last two are a free check on any answer, however it was obtained. For 2x² − 10x + 12 = 0 the roots must add to 5 and multiply to 6, which points at 2 and 3 before the formula has been touched. If your own working produces roots that fail either test, the mistake is in the working rather than in the formula.
The vertex is the other thing worth taking from the same coefficients. Its x coordinate is −b divided by 2a, which is also the axis of symmetry, and substituting that back gives the y coordinate. The vertex is the turning point: the lowest point when a is positive and the highest when a is negative.
- b² − 4ac > 0
- two distinct real roots
- b² − 4ac = 0
- one repeated real root, at the vertex
- b² − 4ac < 0
- two complex conjugate roots, no real ones
- a = 0
- not a quadratic — the formula divides by 2a
- A perfect square discriminant
- the roots are rational and it factorises
That last row is a useful practical test. If the discriminant comes out as 1, 4, 9, 16 or any other perfect square, the expression factorises with whole numbers and factoring will be quicker than the formula.
The square root inside the formula
Where the discriminant is not a perfect square, the roots stay irrational. Simplified radical form gives them exactly rather than as a rounded decimal.
Open the square root calculator →Quadratics covering all three discriminant cases, with the vertex and the root sum shown so each answer can be checked two independent ways.
| Equation | Discriminant | Roots |
|---|---|---|
| x² − 3x + 2 = 0 | 1 | 2 and 1 |
| x² − 5x + 6 = 0 | 1 | 3 and 2 |
| x² − 4x + 4 = 0 | 0 | 2, repeated |
| x² + 1 = 0 | −4 | i and −i |
| x² + 2x + 5 = 0 | −16 | −1 ± 2i |
| 2x² − 10x + 12 = 0 | 4 | 3 and 2 |
| x² − 2 = 0 | 8 | ±1.4142 |
| 3x² + 5x − 2 = 0 | 49 | 0.3333 and −2 |
| x² − 6x + 9 = 0 | 0 | 3, repeated |
| 4x² + 4x + 1 = 0 | 0 | −0.5, repeated |
The three cases, and what the parabola is doing
Every quadratic draws a parabola, and the roots are wherever it meets the x axis. That is the picture behind the discriminant: a parabola sitting low enough crosses the axis twice, one resting exactly on it touches once, and one floating entirely above or below never reaches it. The algebra and the geometry are saying the same thing.
- x² − 3x + 2
- discriminant 1 → roots 2 and 1
- x² − 4x + 4
- discriminant 0 → root 2, twice
- x² + 1
- discriminant −4 → roots i and −i
- The middle one
- has its vertex on the axis
- Same formula
- three different kinds of answer
The repeated root is the boundary between the other two. Nudge the constant term of x² − 4x + 4 down and two real roots appear; nudge it up and they become complex. The single root is the exact moment of transition, which is why it is counted twice rather than once.
When the roots are complex they are always a conjugate pair, provided a, b and c are real numbers. That follows directly from the formula: the only difference between the two roots is the plus or minus in front of the square root, so their real parts are identical and their imaginary parts are opposite.
When factoring beats the formula
The formula always works, which does not make it always the fastest route. If the discriminant is a perfect square the roots are rational and the expression factorises with whole numbers — spotting that x² − 5x + 6 is (x − 2)(x − 3) takes seconds, while the formula takes a line of arithmetic and a square root.
Do
- Read the discriminant before computing anything else
- Check the roots against −b/a and c/a
- Try factoring first when the coefficients are small whole numbers
- Say "no real roots" rather than "no solutions"
Don't
- Apply the formula when a is zero — it divides by 2a
- Report −b/(2a) as the vertex; it is only the x coordinate
- Forget the minus sign in front of b
- Assume a negative discriminant means the calculation failed
When a is zero there is no parabola at all. The equation collapses to bx + c = 0, a straight line with a single root at −c/b, and the quadratic formula cannot be applied because it divides by 2a. This page detects that case and solves the linear equation instead of returning an error.
The formula, worked line by line
One formula, one number sitting inside it that decides everything about the answer, and two further identities that check the result for free once you have it.
“Read the discriminant first. It tells you what kind of answer exists before you have worked out what the answer is.”
It also prevents the commonest misreading. A calculator returning "no real roots" has not failed; it has told you the parabola never crosses the axis, which is a fact about the equation rather than about the arithmetic.
x = (−b ± √(b² − 4ac)) ÷ 2a
discriminant D = b² − 4ac
vertex x = −b ÷ 2a, and y = a·x² + b·x + c at that point
sum of roots = −b ÷ a
product of roots = c ÷ a- a, b, c
- 2, −10, 12
- Discriminant
- 100 − 96 = 4
- Square root of it
- 2
- Roots
- (10 ± 2) ÷ 4
- Which is
- 3 and 2
- Check
- 3 + 2 = 5 = −b/a, and 3 × 2 = 6 = c/a
The discriminant being 4, a perfect square, was the signal that the roots would be rational. Dividing through by 2 first would have given x² − 5x + 6, which factors on sight as (x − 3)(x − 2) — the same answer with no square root at all.
Where the formula comes from
Completing the square on ax² + bx + c = 0 produces it directly, which is why the formula is not something to be taken on trust. Divide through by a, move the constant across, add the square of half the x coefficient to both sides, and take the square root. The discriminant appears naturally as whatever ends up under that root.
A note on the history
- Old Babylonian tablets
- procedures equivalent to specific quadratic problems
- Brahmagupta, 628 CE
- an explicit rule for solving the quadratic
- Al-Khwarizmi, 9th century
- a systematic classification of the cases
- Modern symbolic form
- much later, once algebraic notation existed
- Negative and complex roots
- accepted later still
The tidy claim that "the Babylonians knew the quadratic formula" reads a modern symbolic identity back into procedures that were written as recipes for particular problems. The procedures are real; the formula as we write it is not what they had.
That distinction matters more than it might seem, because it also explains why the negative and complex cases arrived so late: a method built around geometric areas has no room for a negative length, and the general formula only becomes possible once the notation stops describing shapes.
Questions people ask
Sources
Where the constants and formulas on this page come from. Each line names the figure it backs.
The discriminant b² − 4ac determines whether a quadratic with real coefficients has two distinct real roots, one repeated real root, or two complex conjugate roots.
Quadratic Formula — Wolfram MathWorld
Vieta's formulas relate the sum and product of the roots of a polynomial to its coefficients.
Vieta's Formulas — Wolfram MathWorld
Brahmagupta gave an explicit rule for solving quadratic equations in the seventh century.
Brahmagupta — MacTutor History of Mathematics Archive, University of St Andrews
Related guides
How Are Loan Payments Calculated? Amortization, Explained
One level payment, front-loaded interest — the formula worked by hand, the two levers you control, and why the smaller payment is often the costlier loan.
July 23, 2026 · 13 min read
How Does Inflation Work? The Math That Shrinks Money
One growth factor, two answers — what today's money will buy later, and how many future dollars it takes to keep up.
July 23, 2026 · 13 min read
How Is Sales Tax Calculated? Rates, Rules, and the Reverse Math
The combined-rate reality, the one-multiplication forward formula, and the division that pulls the tax back out of any total.
July 23, 2026 · 13 min read