Quadratic Equation Solver

Solve any quadratic equation ax² + bx + c = 0 instantly: real or complex roots, the discriminant, the vertex and full step-by-step working. Free and private — solved entirely in your browser.

How to use the quadratic equation solver

  1. Write your equation as ax² + bx + c = 0. Move every term to the left side first, so 2x² = 4x + 6 becomes 2x² − 4x − 6 = 0.
  2. Enter a, b and c. Decimals and negative numbers are fine. The equation preview confirms what you typed and the roots update instantly.
  3. Read the solution. You get the discriminant, both roots (real or complex), the vertex, and the full quadratic-formula working you can copy for homework.

About this tool

This free quadratic equation solver applies the quadratic formula x = (−b ± √(b² − 4ac)) / 2a. The discriminant D = b² − 4ac decides the nature of the roots: D > 0 gives two distinct real roots, D = 0 gives one repeated real root, and D < 0 gives a pair of complex conjugate roots, which the solver writes out in a + bi form rather than just saying "no solution". It also reports Vieta's formulas (the sum −b/a and product c/a of the roots) and the parabola's vertex, which are useful for checking answers and sketching the graph.

The solver uses a numerically stable variant of the quadratic formula to avoid the rounding errors the textbook formula suffers from when b is much larger than a and c. Everything runs locally in your browser — no equation you type is ever uploaded or stored. If a = 0, the equation is no longer quadratic; the tool detects this and solves the resulting linear equation bx + c = 0 instead.

Frequently asked questions

What is the discriminant and what does it tell me?

The discriminant is D = b² − 4ac, the expression under the square root in the quadratic formula. If D is positive there are two different real roots; if it is exactly zero the parabola touches the x-axis at one repeated root; if it is negative the roots are complex conjugates and the parabola never crosses the x-axis.

Can this solver find complex (imaginary) roots?

Yes. When D < 0 the roots are x = −b/2a ± i·√(−D)/2a, and the solver prints them in standard a + bi form, for example x₁ = 1 + 2i and x₂ = 1 − 2i. Complex roots of a real quadratic always come as a conjugate pair.

What happens if a is 0?

With a = 0 there is no x² term, so the equation is linear: bx + c = 0. The solver tells you this and returns x = −c/b when b ≠ 0. If both a and b are 0, the equation is either always true (c = 0) or has no solution (c ≠ 0).

How accurate are the results?

Coefficients are handled as double-precision floating-point numbers and the solver uses a cancellation-free form of the quadratic formula, so results are typically accurate to about 15 significant digits. Displayed values are rounded to 8 significant digits; copy the steps for the values shown.