Home / Math / Quadratic Formula Calculator

Quadratic Formula Calculator

Enter the coefficients a, b and c of ax² + bx + c = 0. You get both roots, whether real or complex, the discriminant, the vertex of the parabola and the factored form when the roots are real.

By Adzita Editorial Team · Updated 2026-11-03 · How we build and check our tools

Cannot be zero; otherwise the equation is not quadratic.

The quadratic formula

Any equation of the form ax² + bx + c = 0 with a ≠ 0 is solved by completing the square, which gives the quadratic formula:

x = (−b ± √(b² − 4ac)) ÷ 2a

The part under the root, D = b² − 4ac, is the discriminant. It decides the type of answer before any root is computed. A positive D gives two distinct real roots, zero gives one repeated root, and a negative D gives two complex roots that are conjugates of each other. In the negative case the roots are −b/2a ± i√(−D)/2a, where i is the imaginary unit with i² = −1.

Vertex, axis and the shape of the parabola

The graph of y = ax² + bx + c is a parabola. Its axis of symmetry is the vertical line x = −b ÷ 2a, exactly halfway between the two roots when they are real. The vertex lies on that line, and its height is found by substituting the x value back into the equation. If a is positive the parabola opens upward and the vertex is the minimum; if a is negative it opens downward and the vertex is the maximum.

Complex roots mean the vertex lies entirely above or entirely below the x-axis, so the curve never crosses it. The y-intercept is always c, since x = 0 removes the other terms.

Checking the roots by hand

Vieta's formulas give two fast checks. The roots add up to −b ÷ a and multiply to c ÷ a. For 2x² + 4x − 6 the sum should be −2 and the product −3, and the roots 1 and −3 satisfy both. You can also substitute a root into the original equation and confirm that it returns zero.

The calculator uses a numerically stable form of the formula. When b is large compared with the other terms, subtracting two nearly equal numbers loses digits, so it computes the larger-magnitude root first and obtains the other from the product c ÷ a.

Common mistakes

Results are rounded to six decimal places for display. For related ideas see the square root calculator.

Worked example

Solve 2x² + 4x − 6 = 0. The discriminant is 16 + 48 = 64, a perfect square, so the roots come out as whole numbers.

Inputs

Coefficient a (of x²)2
Coefficient b (of x)4
Constant c-6

Result

x = -3 and x = 1

Two distinct real roots, because the discriminant is positive.

Discriminant b² − 4ac64
Root x₁-3
Root x₂1
Factored form2(x + 3)(x − 1)
Sum of roots (−b ÷ a)-2
Product of roots (c ÷ a)-3
Vertex(-1, -8)
Axis of symmetryx = -1
y-intercept-6
OpensUpward (minimum at the vertex)

Accuracy note: Results use standard double-precision arithmetic, so very large or very small values may be rounded. Check important results by another method.

Frequently asked questions

What is the quadratic formula?

The formula x = (−b ± √(b² − 4ac)) ÷ 2a gives both solutions of ax² + bx + c = 0 for any coefficients with a not equal to zero.

What does the discriminant tell me?

If b² − 4ac is positive there are two real roots, if it is zero there is one repeated root, and if it is negative the roots are a pair of complex numbers.

Can the calculator find complex roots?

Yes. When the discriminant is negative it shows the roots in the form p + qi and p − qi, where p is −b ÷ 2a and q is the square root of −D divided by 2|a|.

How do I find the vertex of a parabola?

The x coordinate is −b ÷ 2a. Substitute that value into ax² + bx + c to get the y coordinate. The page shows both coordinates for you.

What happens if a equals zero?

The equation is then linear, bx + c = 0, with one solution x = −c ÷ b. The quadratic formula would divide by zero, so the page asks for a nonzero a.

Square Root CalculatorSquare, cube and nth roots with simplified radical form and perfect-power check.Exponent CalculatorRaise a base to any power: whole, negative or fractional, with exact integers and scientific notation.Pythagorean Theorem CalculatorFind the hypotenuse or a leg of a right triangle, with area, perimeter, angles and triple check.Scientific CalculatorEvaluate typed expressions with trig, logs, roots, powers and factorials in degrees or radians.

References and sources

  1. Stewart, J., Precalculus: Mathematics for Calculus: chapters on quadratic equations and complex numbers.
  2. Press, W. H. et al., Numerical Recipes: the stable quadratic formula that avoids cancellation.

Check primary sources for anything you rely on.