Skip to content
Calculator.hair

Quadratic Formula Calculator

Coefficient of x²

Coefficient of x

Constant term; fractions such as 3/4 work too

Press Calculate to see the results.

Enter the coefficients a, b and c of ax² + bx + c = 0 and this quadratic formula calculator returns both roots, real or complex, along with the discriminant, the vertex of the parabola and the step-by-step working. Fractions such as 1/4 and radicals such as √2 are accepted.

A quadratic equation is a polynomial equation whose highest power of the unknown is two. Its standard form is ax² + bx + c = 0, where a, b and c are known numbers and a is not zero; if a were zero the x² term would vanish and the equation would be linear. The graph of y = ax² + bx + c is a parabola that opens upward when a is positive and downward when a is negative, and the solutions of the equation, called roots or zeros, are the x-values where that parabola meets the x-axis.

Some quadratics factor neatly. x² − 5x + 6 = 0 becomes (x − 2)(x − 3) = 0, so x = 2 or x = 3. Most do not, and the quadratic formula solves every case without guessing. The ± sign produces two answers: one using the plus and one using the minus.

The expression under the square root, b² − 4ac, is called the discriminant, and its sign tells you what kind of roots to expect before you finish the calculation. A positive discriminant gives two different real roots and a parabola that crosses the x-axis twice. A discriminant of zero gives one repeated root, and the parabola just touches the axis at its vertex. A negative discriminant has no real square root, so the two roots are complex numbers of the form p ± qi and the parabola never reaches the axis.

The default example, x² + x + 1/4 = 0, has a discriminant of 1 − 1 = 0, so its only root is x = −1/2. That is because the left side is a perfect square: (x + 1/2)².

Derivation of the Quadratic Formula

The formula comes from a technique called completing the square, which rewrites the equation so that x appears only once, inside a squared term. Starting from ax² + bx + c = 0 with a ≠ 0, the steps are:

  • Divide every term by a: x² + (b/a)x + c/a = 0.
  • Move the constant to the right side: x² + (b/a)x = −c/a.
  • Add (b/2a)², the square of half the x coefficient, to both sides: x² + (b/a)x + (b/2a)² = (b/2a)² − c/a.
  • The left side is now a perfect square: (x + b/2a)² = (b² − 4ac) ÷ 4a².
  • Take the square root of both sides, remembering both signs: x + b/2a = ±√(b² − 4ac) ÷ 2a.
  • Subtract b/2a from both sides: x = (−b ± √(b² − 4ac)) ÷ 2a.

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

a, b, c
the coefficients of ax² + bx + c = 0, with a ≠ 0
b² − 4ac
the discriminant, which decides how many real roots there are

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a.

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 two roots are complex conjugates.

Can I enter fractions or square roots?

Yes. Each coefficient box accepts expressions such as 1/4, -3/2, 2√3 or sqrt(5).

What happens if a is zero?

The equation is then linear, bx + c = 0, and the calculator returns its single solution x = −c ÷ b.

How do I find the vertex of a parabola?

The vertex is at x = −b ÷ 2a. Substitute that x into the equation to get the y-coordinate, which equals c − b² ÷ 4a.

Updated by Calculator.hair. How we build and check our calculators