Quadratic Equation Calculator

Parabolas, projectile paths and break-even points all arrive as quadratic equations, and one formula solves them all. What separates the cases is the discriminant: positive means two x-axis crossings, zero means the curve grazes it, and negative means the parabola never touches it. Take the three coefficients and this page returns roots, discriminant and vertex, naming the case instead of leaving a radical to decode.

Enter values

Must not be 0 — that turns the equation into a straight line

Results update as you type.

Results

Real roots
x = 3.00, x = 2.00
Discriminant (b² − 4ac)
1.00
Vertex x (−b ÷ 2a)
2.50

How is the Quadratic Equation calculated?

Three number fields describe the equation: a in front of x², b in front of x, and the constant c. The calculator first checks that a is not zero — a zero a makes the equation a straight line, and the page says so instead of dividing by nothing. It then computes the discriminant b² − 4ac and applies the quadratic formula: two real roots when the discriminant is positive, one repeated root at the vertex when it is zero, and a complex pair written as real ± imaginary when it is negative.

Formula

x = (−b ± √(b² − 4ac)) ÷ (2a), where D = b² − 4ac decides the shape of the answer. a, b and c are the coefficients of ax² + bx + c. D greater than 0 gives two distinct roots, D equal to 0 gives one repeated root at x = −b ÷ 2a, and D below 0 gives complex roots sharing that vertex x as their real part, with imaginary part √(−D) ÷ (2|a|).

Example

Take x² − 5x + 6 = 0, so a = 1, b = −5 and c = 6. The discriminant is (−5)² − 4×1×6 = 25 − 24 = 1, which is positive, so there are two roots: (5 + 1) ÷ 2 = 3 and (5 − 1) ÷ 2 = 2. The vertex sits at −(−5) ÷ 2 = 2.5, exactly halfway between them. Change the constant to x² − 4x + 6 = 0 and the discriminant becomes 16 − 24 = −8: no real roots, and the complex pair 2.00 ± 1.41i.

Things to remember

The discriminant is the fastest health check on any quadratic: one glance tells you how many real answers to expect. Remember the a ≠ 0 rule — if the x² term vanishes you have a line, not a parabola. For problems with two unknowns instead of one, the system-of-equations calculator takes over.

Frequently Asked Questions

What is the quadratic formula used here?

x = (−b ± √(b² − 4ac)) ÷ (2a), where a, b and c are the coefficients of ax² + bx + c. The ± is the whole story: it produces two answers when the discriminant b² − 4ac is positive, and the same answer twice when the discriminant is exactly zero.

What does a negative discriminant mean?

That the equation has no real roots — the parabola sits entirely above or below the x-axis. The calculator still reports the complex-conjugate pair, written as a ± bi, so nothing is lost: for x² − 4x + 6 the pair is 2.00 ± 1.41i, sharing the vertex x as their real part.

Why can't a be zero in a quadratic?

Because a = 0 deletes the x² term, leaving the linear equation bx + c = 0 with at most one root. The formula would divide by 2a = 0, so the calculator flags the case and solves the equation as a straight line instead of printing infinity.

How do you find the vertex of the parabola?

Its x coordinate is always −b ÷ 2a, whatever the discriminant says. For x² − 5x + 6 that gives 2.5, the point exactly midway between the roots 3 and 2 — and when the discriminant is zero, the vertex x is the repeated root itself.