KKwikfig.

Quadratic Equation Solver

Solve any quadratic equation with the formula, see the discriminant verdict, the factorisation where it exists, and the vertex of the parabola. Runs entirely in your browser — your numbers never leave this device.

x² − 5x + 6 = 0
Roots
x₁ = 3, x₂ = 2
Two different real roots (discriminant > 0).
Discriminant b² − 4ac
1
Vertex
(2.5, −0.25)
Kind
two real
Points on the parabola around the vertex
xy
06
12
20
30
42
56
612

How it works

For ax² + bx + c = 0 (a ≠ 0): x = (−b ± √(b² − 4ac)) / (2a) | Discriminant: D = b² − 4ac | Vertex: x = −b / (2a), y found by substituting that x back into the equation
The discriminant decides the roots before you solve
Discriminant D = b² − 4acRoot typeWhat the graph does
D > 0Two distinct real rootsParabola crosses the x-axis twice
D = 0One repeated real rootParabola touches the x-axis at its vertex
D < 0Two complex conjugate roots (a ± bi)Parabola never reaches the x-axis

Enter the three coefficients of ax² + bx + c = 0 and the solver works the quadratic formula in the open: it computes the discriminant D = b² − 4ac first, because that one number decides everything that follows, then substitutes a, b and c into x = (−b ± √D) / (2a) and shows both branches of the ± separately. Watch the signs as you type — the most common quadratic mistake is not the formula but a dropped minus sign: in x² − 5x + 6 the coefficient b is −5, not 5, and the solver's substitution line makes that visible.

The discriminant is a verdict before it is a calculation. If D is positive, its square root is a real number and the ± produces two different real roots — the parabola crosses the x-axis twice. If D is exactly zero, the two branches land on the same value: one repeated root, and the parabola just touches the axis at its vertex. If D is negative, the square root does not exist among real numbers and the roots are a complex conjugate pair, written with i where i² = −1; the parabola then never crosses the axis at all. The solver reports which case you are in and gives complex roots in a ± bi form rather than hiding them behind an error.

Alongside the roots you get the vertex — the turning point of the parabola — at x = −b / (2a), with its y-value worked by substitution, plus a factorisation whenever the roots are rational numbers: an equation with roots 2 and 3 is (x − 2)(x − 3) = 0 underneath, which both checks the formula's answer and is the form most courses actually want. If a is entered as zero the solver says plainly that the equation is no longer quadratic — with no x² term it is a linear equation, and dividing by 2a would be dividing by zero.

Worked examples

Two real roots: x² − 5x + 6 = 0

Input
a = 1, b = −5, c = 6
Working
D = b² − 4ac = 25 − 24 = 1, positive, so expect two real roots. x = (5 ± √1) / 2 = (5 ± 1) / 2, giving x = 6/2 = 3 and x = 4/2 = 2. Factorisation check: (x − 2)(x − 3) = x² − 5x + 6. Vertex: x = 5/2 = 2.5, and y = 2.5² − 5 × 2.5 + 6 = 6.25 − 12.5 + 6 = −0.25.
Result
Roots x = 3 and x = 2, vertex (2.5, −0.25)

One repeated root: x² + 2x + 1 = 0

Input
a = 1, b = 2, c = 1
Working
D = 4 − 4 = 0, so the ± adds and subtracts nothing: x = −2 / 2 = −1, a single repeated root. Factorisation check: x² + 2x + 1 = (x + 1)², so the equation is really (x + 1)² = 0. The vertex sits on the axis at (−1, 0).
Result
One repeated root x = −1

Complex roots: x² + 1 = 0

Input
a = 1, b = 0, c = 1
Working
D = 0 − 4 = −4, negative, so there are no real roots. √D = √(−4) = 2i, and x = (0 ± 2i) / 2 = ± i. Check: i² = −1, so i² + 1 = 0 — the complex roots genuinely satisfy the equation, and they arrive as the conjugate pair i and −i.
Result
Roots x = i and x = −i

Frequently asked questions

What does the discriminant tell me?

Everything about the kind of answer to expect, before any root-finding: D = b² − 4ac positive means two distinct real roots, zero means one repeated real root, and negative means two complex roots and no real ones. It works because the discriminant is the part under the square-root sign in the quadratic formula — the sign of what you are about to root decides whether real answers exist.

Why does the quadratic formula have a ± in it?

Because a square has two square roots: both 3 and −3 square to 9. The ± is the formula keeping both possibilities, which is exactly where the two roots of a quadratic come from. When the discriminant is zero the two possibilities coincide (adding and subtracting 0 change nothing), and when it is negative both roots are complex and form a conjugate pair.

How do I find the vertex of the parabola?

The vertex always sits halfway between the roots, at x = −b / (2a) — for x² − 5x + 6 that is x = 2.5, midway between the roots 2 and 3. Substitute that x back into the equation to get its y-value, −0.25 for that example. Whether the vertex is a minimum or a maximum depends on the sign of a: positive a opens upwards (a minimum), negative a opens downwards (a maximum).

When can a quadratic be factorised instead of using the formula?

When the roots are rational numbers, the equation splits into two brackets whose constants multiply to c/a and combine to give b — x² − 5x + 6 = (x − 2)(x − 3) because 2 and 3 multiply to 6 and add to 5. Irrational or complex roots cannot be spotted this way by inspection, which is why the formula is the general method and factorising is a shortcut that only sometimes applies. The solver shows the factorisation whenever it exists.

What if a is zero?

Then there is no x² term and the equation is not quadratic at all — it is linear, like 2x + 1 = 0, with at most one solution. The quadratic formula would divide by 2a = 0, which is undefined, so the solver identifies the situation and explains it instead of attempting the calculation.

Does this solver upload my equation anywhere?

No. It runs 100% in your browser — the coefficients you type are solved locally on your device, nothing is uploaded or stored, and no record of your equation remains once you close the page.

Related tools

More in Math Calculators · Browse all tools