Enter the coefficients of ax² + bx + c = 0 and get both roots, the discriminant, the vertex and a graph of the parabola, with every algebra step from the formula worked out and substituted with your numbers.
A quadratic equation is any equation that can be written in the standard form ax² + bx + c = 0, where a, b and c are known numbers and x is the unknown. The name comes from the Latin quadratus, meaning square, because the defining feature is the x² term. The coefficient a is called the quadratic coefficient, b the linear coefficient and c the constant. One restriction matters: a must not be zero, because with a = 0 the x² term vanishes and the equation collapses to the linear equation bx + c = 0, which a simple rearrangement solves.
Graphed, every quadratic equation is a parabola, a symmetric U-shaped curve. The solutions of the equation, its roots, are exactly the places where that parabola crosses the x axis, which is why solving and graphing are two views of the same question. The running example on this page is x² - 5x + 6 = 0, and every number quoted below can be checked against the calculator above.
One formula solves every quadratic equation, whatever its coefficients:
x = [ -b ± √(b² - 4ac) ] ÷ 2a
read it as two answers at once: once with the plus, once with the minus
For the example, a = 1, b = -5 and c = 6. The part under the square root is (-5)² - 4 × 1 × 6 = 25 - 24 = 1, so the formula gives x = (5 ± 1) ÷ 2, which is x = 3 or x = 2. Substitution confirms both: 3² - 5 × 3 + 6 = 9 - 15 + 6 = 0, and 4 - 10 + 6 = 0 for x = 2. Making this substitution a habit is the fastest way to trust an answer.
The expression under the square root, D = b² - 4ac, is called the discriminant, and it single-handedly determines what kind of answers exist:
The formula is not magic; it is the result of completing the square, applied once and kept forever. Start from ax² + bx + c = 0 and divide by a. The plan is to rewrite the x part as a single squared term: x² + (b/a)x becomes (x + b/2a)² if you add and subtract the constant (b/2a)². Moving every constant to the right side isolates that perfect square:
(x + b/2a)² = (b² - 4ac) ÷ (4a²)
the completed-square form of the equation, just before the final square root
Taking the square root of both sides produces the ±, and subtracting b/2a from both sides isolates x, giving exactly the quadratic formula. Every step is reversible, which is why the formula never misses a solution. Completing the square is also worth knowing on its own: it converts any quadratic into vertex form, the form that makes the graph's turning point obvious.
The vertex is the parabola's turning point, its lowest point when the parabola opens upward (a > 0) or its highest when it opens downward (a < 0). Its coordinates come straight from the coefficients: the x coordinate is -b ÷ 2a, which is also the axis of symmetry, the mirror line of the whole curve, and the y coordinate follows by substituting back. For the example, the vertex sits at x = 5 ÷ 2 = 2.5 and y = 6 - 25 ÷ 4 = -0.25, slightly below the x axis, which agrees with the two crossings at 2 and 3 on either side of it.
Three further check values come free. The y-intercept is simply c, because x = 0 kills the other terms. The two roots always sum to -b ÷ a (here 5, and indeed 2 + 3 = 5) and multiply to c ÷ a (here 6, and 2 × 3 = 6). These are Vieta's formulas, and they make excellent quick sanity checks on any computed pair of roots.
Quadratics are ancient. Babylonian clay tablets from around 2000 BC contain worked recipes for problems we would now write as quadratic equations, complete with the equivalent of the positive root, though the Babylonians had no negative numbers and no algebraic notation. Greek geometers solved them with ruler-and-compass constructions instead.
The algebraic treatment arrived with the Persian mathematician al-Khwarizmi, whose book Al-jabr, written around 825 AD, classified quadratics into types and gave step-by-step solving rules, a word from whose title gives us "algebra" itself. Because negative coefficients were still avoided, his single method appeared as many separate cases. European mathematicians of the sixteenth and seventeenth centuries, working after the acceptance of negative numbers, condensed everything into the single formula used today, and René Descartes' coordinate geometry then connected each equation to its parabola, uniting the algebraic and graphical views this calculator presents side by side.
If a is zero, the x² term disappears and the equation becomes bx + c = 0, a linear equation with the single solution x = -c/b. The quadratic formula would still run, but it would divide by 2a = 0, which is undefined. This is why the calculator refuses a = 0 and points out that your equation is actually linear and much simpler to solve.
It means no real-number solution exists: no value of x makes the equation true, and the parabola never touches the x axis. The complete answer uses complex numbers, a conjugate pair written as real part plus and minus imaginary part, and the calculator reports it in that form. In many applied problems a negative discriminant is meaningful in itself, often signaling that an event never happens.
The two roots are interchangeable as solutions: both make the equation true, and nothing labels one more correct than the other. Conventionally the calculator reports the plus root first. If a word problem context picks one (a length cannot be negative, for example), filter the pair by that requirement rather than by the formula's ordering.
Your discriminant is exactly zero, which happens when the equation is a perfect square, like x² + 2x + 1 = (x + 1)². The parabola sits exactly on the x axis at its vertex, so the plus and minus branches of the formula produce the same number. The single root is reported as a repeated root, and it equals -b/2a, the vertex position.
Yes, and it is often the safer choice. Factoring is fast when the numbers cooperate, as with x² - 5x + 6 = (x - 2)(x - 3), but it stalls on equations like 2x² - 4x - 6 with non-obvious factors. The formula works for every quadratic, so using it costs nothing except a moment longer, and its discriminant also tells you whether factoring with whole numbers is even possible.
The vertex is the turning point of the parabola: the minimum value when a is positive and the maximum when a is negative. It answers optimization questions directly, such as the launch height of a projectile or the price that maximizes revenue, at x = -b/2a. The roots tell you where the curve crosses zero; the vertex tells you where it turns around.
Two fast checks. Substitution: put each root back into the original equation and confirm it balances, as 2² - 5 × 2 + 6 = 0 does. Vieta's checks: the roots must sum to -b/a and multiply to c/a, here 5 and 6, which the results panel computes for you. If either check fails, a coefficient was probably entered with the wrong sign.
No. Every calculation runs in your browser. Nothing is stored or transmitted.