Quadratic Formula Calculator

Solve ax² + bx + c = 0 — both roots and the discriminant, step by step.

Root x₁
2.0000
  1. Discriminant (b² − 4ac)1.0000
  2. Root x₁2.0000
  3. Root x₂1.0000
Inputs used
  • a (x² coefficient)1
  • b (x coefficient)-3
  • c (constant)2

About this calculator

The quadratic formula solves any equation of the form ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) ÷ 2a. The two signs of the ± give the two roots.

The discriminant, b² − 4ac, tells you what to expect before solving: positive means two distinct real roots, zero means one repeated root (both answers below will match), and negative means the roots are complex — this calculator reports an error in that case, since there's no real solution to show.

The coefficient a can't be zero (that's a linear equation, not a quadratic — solve −c/b directly). Sign mistakes on b and c are the most common source of wrong answers: match the equation form exactly.

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0, the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. The plus and minus signs give the two solutions. Solving x² − 3x + 2 = 0 this way gives x = 2 and x = 1.

What does the discriminant tell you?

The discriminant is b² − 4ac. If it is positive there are two distinct real roots, if it is zero there is one repeated root, and if it is negative the roots are complex and there is no real solution.

Can a quadratic equation have no real solutions?

Yes — when the discriminant b² − 4ac is negative. For example x² + x + 1 = 0 has discriminant 1 − 4 = −3, so its parabola never crosses the x-axis and both roots are complex.

Why can't the coefficient a be zero?

If a = 0 the x² term vanishes and the equation bx + c = 0 is linear, not quadratic. It has a single solution, x = −c ÷ b, and the quadratic formula would divide by 2a = 0.

Embed this calculator on your site

Paste this HTML where you want the calculator to appear. It stays free, works on any site, and updates automatically. Adjust the height to taste.

Results are informational only — not financial, medical or legal advice.