Quadratic Equation Solver

Solve ax² + bx + c = 0 with the quadratic formula. Get real or complex roots, the discriminant, the vertex, the axis of symmetry and the factored form.

How to use the quadratic Equation Solver

  1. Write your equation in the standard form ax² + bx + c = 0, moving every term to one side.
  2. Enter the coefficients a, b and c, including their signs. If a term is missing, its coefficient is 0.
  3. The result updates instantly as you type. There is no button to press.
  4. Use Copy result to copy the figures, or Copy link to share a link that reopens the quadratic Equation Solver with the same inputs.

How it works

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. Its graph is a parabola, and the solutions, called roots, are the x-values where the parabola crosses the x-axis. Quadratics turn up throughout science and everyday problems: projectile motion, areas, profit maximisation and optics.

This solver uses the quadratic formula, which works for every quadratic. The discriminant, b² − 4ac, tells you what kind of roots to expect before you finish. If it is positive there are two different real roots. If it is zero there is one repeated root, and the vertex touches the x-axis. If it is negative there are no real roots: the parabola never crosses the axis, and the roots are a pair of complex numbers.

To avoid rounding errors when b is large compared with a and c, the solver uses a numerically stable form of the formula rather than the textbook version. It also reports the vertex (the parabola's highest or lowest point), the axis of symmetry, the y-intercept and the factored form a(x − r₁)(x − r₂), so you can check the answer by expanding it back out.

Formula

x = (−b ± √(b² − 4ac)) / 2a Discriminant D = b² − 4ac Vertex = (−b / 2a, c − b² / 4a)

For D < 0 the roots are −b/2a ± (√(−D) / 2a) i. The sum of the roots is −b/a and their product is c/a (Vieta's formulas), which is a handy check.

Example

Solve x² − 3x + 2 = 0. Here a = 1, b = −3 and c = 2. The discriminant is 9 − 8 = 1, so there are two real roots: x = (3 ± 1) ÷ 2, giving x = 1 and x = 2. The factored form is (x − 1)(x − 2), and the vertex is at (1.5, −0.25). For x² + 2x + 5 = 0, D = 4 − 20 = −16, so the roots are complex: x = −1 ± 2i.

Frequently asked questions

What if a = 0?

Then the equation is linear, bx + c = 0, not quadratic, and has the single solution x = −c/b. The solver handles this case automatically.

What does a negative discriminant mean?

The parabola does not touch the x-axis, so there are no real solutions. The two solutions are complex conjugates of the form p ± qi.

How can I check my roots?

Substitute each root back into ax² + bx + c; the result should be zero. Or check that the roots add up to −b/a and multiply to c/a.