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.
Advertisement
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
Advertisement
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.
Advertisement
Full guide
Why the Quadratic Formula Loses Accuracy on One of Its Two Roots
Completing the square takes four lines and produces the formula. It also shows which of the two roots is safe to trust, and the calculator on this site was corrected to use the other route.
Read the full guide →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.
Advertisement
Questions people ask
What is the quadratic formula?
For ax² + bx + c = 0 with a not zero, x equals minus b, plus or minus the square root of b² − 4ac, all divided by 2a. It solves every quadratic equation with real coefficients, whether or not the expression factorises, and produces complex roots when the discriminant is negative.
Covered in depth in Why the Quadratic Formula Loses Accuracy on One of Its Two Roots →
What does a negative discriminant mean?
That the parabola never crosses the x axis, so there are no real roots. The equation still has two roots and they are complex conjugates — the same real part with opposite imaginary parts. Calling this "no solution" is a common shorthand and it is inaccurate; "no real roots" is the correct description.
How do I check my roots are right?
Add them and multiply them. For any quadratic the roots must sum to −b/a and multiply to c/a, which are Vieta's formulas. For 2x² − 10x + 12 the roots must add to 5 and multiply to 6, and 3 and 2 satisfy both. A sign error in the formula almost always breaks one of the two tests.
What happens if a is zero?
It is not a quadratic and the formula cannot be used, because the formula divides by 2a. The equation becomes bx + c = 0, a straight line with a single root at −c/b. If b is zero as well, there is no equation left to solve — just a constant that is either always true or never true.
Should I factor or use the formula?
Compute the discriminant first. If it is a perfect square — 1, 4, 9, 16 and so on — the roots are rational and the expression factorises with whole numbers, which is usually faster. If it is not, factoring will not work neatly and the formula is the direct route.
Where is the vertex of a quadratic?
Its x coordinate is −b divided by 2a, which is also the axis of symmetry. Substitute that value back into the equation to get the y coordinate. Note that −b/(2a) is only half the answer: the vertex is a point, and quoting the x value alone is a common slip.
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
Math
Why the Quadratic Formula Loses Accuracy on One of Its Two Roots
Completing the square takes four lines and produces the formula. It also shows which of the two roots is safe to trust, and the calculator on this site was corrected to use the other route.
August 19, 2026 · 10 min read
Math
Geometry Backwards: Finding the Radius from the Area
Every geometry formula is printed in the direction you need least. Running it backwards is not the same operation reversed; it is a root, and roots can refuse.
August 17, 2026 · 10 min read
Math
When Cross Multiplication Gives You the Wrong Answer
Cross multiplication answers every question you put to it, including the ones it should refuse. The test is one line: if the input were zero, would the output be zero?
August 17, 2026 · 10 min read