Quadratic Equation Solver

Solve ax² + bx + c = 0 for x, including complex roots.

How to Solve a Quadratic Equation

  1. Enter the coefficients a, b, and c from ax² + bx + c = 0.
  2. The roots (real or complex) appear instantly.

Frequently Asked Questions

What is the discriminant and why does it matter?

The discriminant is b² − 4ac. If it's positive, the equation has two distinct real roots; if it's exactly zero, there's one repeated real root; if it's negative, the two roots are complex numbers (involving the imaginary unit i).

What happens if I enter 0 for a?

The equation is no longer quadratic (there's no x² term), so the quadratic formula doesn't apply — a must be non-zero for this solver to work.

How are complex roots displayed?

In the standard real + imaginary form, like "2 + 3i," where i represents the square root of −1.

Is my data sent anywhere?

No — the calculation happens entirely in your browser using JavaScript, so nothing you enter is ever sent to a server.