Quadratic Equation Solver

Enter a, b and c and see the discriminant, both roots including complex ones, the vertex form and a plotted parabola, updating as you type.

🌐 Español

x² - 5x + 6 = 0

1. Discriminant (b² - 4ac)-5² - 4(1)(6) = 1
2. RegimeTwo distinct real roots (discriminant > 0)
3. Roots — x = (-b ± √discriminant) / 2ax₁ = 2, x₂ = 3
4. Vertex form — a(x - h)² + k, where h = -b/2a, k = c - b²/4a1(x - 2.5)² + -0.25, vertex at (2.5, -0.25)

🔒 Private by design: everything runs locally in your browser and never uploaded to any server.

Three coefficients, four things worth knowing

Most quadratic solvers give you the roots and stop. The roots are rarely the only thing the question wanted.

Four outputs update together as you type. The discriminant, which tells you what kind of answer to expect before you have one. The roots themselves, real or complex. The vertex form, which hands you the turning point without any calculus. And a plotted parabola, because seeing that the curve never reaches the axis explains a negative discriminant faster than any sentence does.

Everything recomputes live. There is no solve button, so exploring what happens as one coefficient crosses zero is a matter of holding the arrow key.

Solving a worked example

  1. Type the coefficient of the squared term into the a field.
  2. Type the coefficient of the plain term into b, and the constant into c. The three fields start at 1, minus 5 and 6, which is the classic textbook equation with roots at 2 and 3.
  3. Read the discriminant line first. For those coefficients it is 1, so the label tells you there are two distinct real roots.
  4. Read the roots underneath.
  5. Read the vertex form. Here the turning point sits at 2.5 on the horizontal axis with a minimum value of minus 0.25.
  6. Look at the graph and confirm the curve crosses the axis where the roots say it should.
  7. Change one coefficient at a time and watch all four outputs move together.

Try setting c to 7 with the other two unchanged. The discriminant goes negative, the roots become a conjugate pair, and the parabola lifts clear of the axis. That is the whole lesson in one keystroke.

The discriminant decides everything before you solve

The quantity under the square root in the quadratic formula is what determines the shape of the answer, which is why it is worth computing first rather than as a by-product.

Positive means the square root is a real number, so adding and subtracting it produces two different real roots and the parabola crosses the axis twice. Exactly zero means the square root contributes nothing, both branches collapse to the same value, and the curve touches the axis at a single point. Negative means the square root is imaginary, so the roots come as a conjugate pair and the curve never reaches the axis at all.

Each of the three regimes is labelled explicitly rather than left for you to infer from the roots, so a discriminant of zero says one repeated real root rather than quietly listing the same number twice.

When a is zero, it is not a quadratic

This is where a naive solver divides by zero and prints a NaN or an infinity. Nothing here does.

A zero leading coefficient is caught before the formula runs and split into three separate outcomes, each named on screen. If the middle coefficient is not zero you have a linear equation, and its single root is solved directly. If the middle coefficient is zero but the constant is not, the equation asserts that a non-zero number equals zero, so there is no solution at any value. If all three are zero, the statement is trivially true and every real number is a solution.

The vertex form disappears in all three cases, because a straight line has no turning point to report.

Reading the vertex without calculus

The vertex form rewrites the same expression around its turning point, giving you two numbers. The first is the axis of symmetry, the horizontal position where the parabola turns. The second is the value of the expression there, which is the minimum when the parabola opens upward and the maximum when it opens downward.

That is the answer to almost every applied question involving a quadratic: the height at which a projectile stops rising, the price that maximises revenue, the width that minimises material. Reading two numbers off the screen is quicker and less error prone than differentiating and setting the result to zero, and it agrees with the graph immediately above it.

Where to go next

For arithmetic on the coefficients themselves, particularly when they arrive as fractions and you want to keep them exact, Fraction Calculator adds, subtracts, multiplies and divides without falling back to decimals.

For an expression that is not a quadratic, Scientific Calculator takes brackets, powers, trig and logarithms in one typed line with the answer updating as you go. Percentage Calculator handles the proportion questions that often sit alongside this kind of homework, and GPA Calculator is for what the homework adds up to. The rest is on the calculators hub.

See it in action

Screenshot of the Quadratic Equation Solver tool with the a, b and c coefficients above a worked solution to x squared minus 5x plus 6 - the discriminant computed and substituted, the regime it implies named, and the roots derived from the quadratic formula step by step
Quadratic Equation Solver mid-process: the a, b and c coefficients above a worked solution to x squared minus 5x plus 6 - the discriminant computed and substituted, the regime it implies named, and the roots derived from the quadratic formula step by step.
Diagram: where the work happens on a SysFenix page that has no file input at all: the tool arrives as ordinary JavaScript inside the page, works the answer out on your own device and renders it in place, so the upload, queue and server-side record a typical online tool needs never happen
Where the work happens on a SysFenix page that has no file input at all: the tool arrives as ordinary JavaScript inside the page, works the answer out on your own device and renders it in place, so the upload, queue and server-side record a typical online tool needs never happen.

Frequently asked questions

What happens if I set a to zero?

The equation stops being quadratic, and rather than dividing by zero the tool splits it into three named cases. With b not zero it is really a linear equation and the single root is reported as such. With b zero and c not zero the statement is a contradiction and there is no solution. With all three zero it is an identity that every real number satisfies.

Does it handle complex roots?

Yes. When the discriminant is negative the two roots are reported as a conjugate pair, with the same real part and equal and opposite imaginary parts. They are always ordered with the negative imaginary part first regardless of the sign of a, so the display is stable as you edit the coefficients rather than swapping around.

What is the discriminant actually telling me?

How many times the parabola meets the horizontal axis. A positive value means two crossings and two distinct real roots. Exactly zero means the curve touches the axis at a single point, which is the repeated root. A negative value means the parabola never reaches the axis, which is why the roots are complex rather than real.

What are h and k in the vertex form?

The coordinates of the turning point. The h value is the axis of symmetry, and k is the minimum value of the expression when a is positive or the maximum when a is negative. Reading them straight off is usually faster than differentiating, and it is what optimisation questions are really asking for. There is no vertex at all when a is zero, since a line has no turning point.

How many decimal places are shown?

Up to six, with trailing float noise trimmed. That keeps an irrational root readable while still telling you it is not a round number, and it hides the artifacts that raw binary arithmetic would otherwise leave several places further out.

Why does the graph range change as I type?

Because a fixed window would put the interesting part of most parabolas off screen. The horizontal range is chosen from the roots and the axis of symmetry, so the crossings and the turning point are always visible. The curve is drawn by sampling the expression at a fixed number of points across that range and joining them.

Related tools