Quadratic Equation Solver

Type a, b and c from ax² + bx + c = 0. You get the roots, real or complex, the exact form, the factors when they exist, the vertex and every step.

How it works

The discriminant D = b² − 4ac decides what kind of roots there are. Above 0 there are two real roots, at 0 there is one repeated root, and below 0 there are two complex roots.

The roots come from the quadratic formula x = (−b ± √D) / 2a. The decimal answers use a rearranged form of it that stays accurate when b is very large, where the schoolbook form loses digits.

When a, b and c are whole numbers, the tool also gives the exact roots with square roots, such as x = 1 ± √2, and the factored form when the roots are fractions.

How to use it

  1. 1 Move every term to one side so the equation reads ... = 0.
  2. 2 Type a, the number before x², then b, the number before x, then c, the number on its own.
  3. 3 Read the roots, the exact form and the factors.
  4. 4 Follow the working to see how the answer was reached.

Good to know

  • A missing term has a coefficient of 0: x² − 9 = 0 has b = 0.
  • A bare x² means a = 1, and −x means b = −1.
  • If a is 0 the equation is a straight line, and the tool solves it as one.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Solving a quadratic, step by step

A quadratic equation has an x² term and nothing higher: ax² + bx + c = 0, with a not 0. Its graph is a parabola, a U shape that opens up when a is positive and down when a is negative. The roots, or solutions, are where the parabola crosses the x-axis, and there can be two, one or none on the real line.

Take x² − 5x + 6 = 0, so a = 1, b = −5 and c = 6. The discriminant is b² − 4ac = 25 − 24 = 1. It is above 0, so there are two real roots. The formula gives x = (5 ± √1) / 2, which is (5 + 1) / 2 = 3 or (5 − 1) / 2 = 2. Since both roots are whole numbers, the equation factors as (x − 3)(x − 2) = 0, which you can check by multiplying out.

Now try x² + 2x + 5 = 0. The discriminant is 4 − 20 = −16. There is no real square root of −16, so the parabola sits entirely above the axis. In the complex numbers, √−16 is 4i, where i is the square root of −1. The roots are (−2 ± 4i) / 2, which is −1 + 2i and −1 − 2i. They always come in such pairs, called conjugates.

The vertex is the turning point of the parabola, at x = −b / 2a. For x² − 5x + 6 it is at x = 2.5, where y = −0.25. It sits exactly halfway between the two roots, which is a quick check on any answer. When the roots are irrational, as for x² − 2 = 0, the exact form x = ±√2 is more useful than the decimals ±1.414214, and the tool gives both.

The tool has limits. The working rounds decimals to 6 places to stay readable, while the roots themselves are computed at full double precision. The exact form and the factors need a, b and c to be whole numbers; with decimals you get the decimal roots only. It solves quadratics alone, not cubics or higher, and it does not graph the curve.

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) / 2a. The ± gives the two roots: one with plus, one with minus. For x² − 5x + 6 = 0 it gives (5 ± 1) / 2, which is 3 or 2.

What does a negative discriminant mean?

The parabola never crosses the x-axis, so there are no real roots. The roots are complex numbers with an imaginary part. For x² + 2x + 5 = 0 they are −1 + 2i and −1 − 2i.

How do I factor a quadratic?

Find the roots, then write one bracket per root. Roots of 2 and 3 give (x − 2)(x − 3). With a leading number, roots of 2 and −1/2 for 2x² − 3x − 2 give (2x + 1)(x − 2). The tool does this whenever the roots are fractions.

Related tools

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.