Quadratic Formula Calculator

Type the equation as you’d write it (2x^2-5x-3=0, x²=4, 1/2x^2-5/4x+1/8) or fill the three boxes. Returns the exact surd form, decimals to as many places as you want, the discriminant, vertex, axis, Vieta sums, the factored form, a parabola, the working, and a proof that each root satisfies the equation.

Quadratic formula calculator

Solves ax² + bx + c = 0 in exact arithmetic — surds kept as surds, fractions kept as fractions — then checks its own answer by substituting the roots back in.

Write it as you would on paper. 2x^2-5x-3=0, x²=4, 3x^2+2x=1-x and 0.5x^2-1.25x+0.125 all work, and so do fractions like 1/2x^2-5/4x+1/8. Or fill the three boxes instead.

THE ROOTS —  

The check

Putting each root back into the equation has to give exactly zero. This is not a rounded comparison — it is the same exact arithmetic, so a wrong answer could not pass it.

The working

The parabola

What is going on underneath

The discriminant decides everything b² − 4ac is what sits under the square root. Positive and the parabola crosses the axis twice; zero and it just touches, giving one repeated root; negative and it never touches, so the roots are a complex conjugate pair. You can tell which of the three you are getting before solving anything.
Why exact arithmeticThe quadratic formula is the textbook example of catastrophic cancellation. When b² is much bigger than 4ac, the square root comes out almost exactly equal to |b|, and −b + √(b²−4ac) subtracts two nearly equal numbers — which throws away most of the digits you had. This page never does that subtraction in floating point: coefficients become exact fractions, the discriminant is exact, the surd is kept symbolically, and rounding happens once, at the end.
What that is worthOn x² + 100000000x + 1 = 0 the smaller root is −0.00000001. CalculatorSoup and Calculator.net both report −7.45058×10⁻⁹, which is 25% wrong. On x² − 1000000x + 0.0000001 = 0, where the smaller root is about 1×10⁻¹³, Calculator.net reports the root as 0 — and 0 is not a root of that equation at all, since putting it in leaves c behind.
Surds, not decimalsWhen the discriminant is not a perfect square the honest answer has a square root in it. 4 ± √11 is exact; 7.3166247904 is a rounding of it. Both are shown, with the exact form first, and the radical is simplified as far as trial division to 100,000 can take it. Past that the surd stays correct but may not be fully reduced, and the page says so rather than pretending.
When a is zeroIt is not a quadratic any more, it is bx + c = 0, so the answer is −c/b. This page solves it instead of refusing, and says what it did. If b is zero too there is either no solution or every number is one, depending on c.
Vieta's shortcutThe two roots always add up to −b/a and multiply to c/a, without solving anything. It is the quickest way to check whether an answer is plausible, and it works for complex roots too.