Skip to content
CalculatorLab

Quadratic Equation Calculator

Enter a, b and c for ax² + bx + c = 0. Get the roots, discriminant and vertex at once.

Solutions

x = 2 or 3

Discriminant
1
Type
Two real roots
Equationx² − 5x + 6 = 0
Vertex(2.5, -0.25)
Axis of symmetryx = 2.5
y-intercept6
Parabola opensUpward

Uses x = (−b ± √(b² − 4ac)) ÷ 2a. A negative discriminant means no real solutions, so the roots are shown as a complex pair.

The quadratic formula

Any equation that can be written as ax² + bx + c = 0, with a not zero, is quadratic. The formula gives the solutions directly and works every time, unlike factoring, which only works neatly for some equations.

This calculator uses a numerically stable version of the formula so that results stay accurate even when b is very large compared with a and c.

A worked example

Solve x² − 5x + 6 = 0. Here a = 1, b = −5, c = 6. The discriminant is (−5)² − 4 × 1 × 6 = 1. The roots are (5 + 1) ÷ 2 = 3 and (5 − 1) ÷ 2 = 2.

The vertex is at x = 5 ÷ 2 = 2.5, where the equation equals 2.5² − 12.5 + 6 = −0.25. The parabola opens upward because a is positive, with its lowest point at (2.5, −0.25).

Reading the result

Two real roots mean the parabola crosses the x-axis twice. One real root means it just touches the axis. Complex roots mean it never meets the axis, so the equation has no real-number solution.

Quadratics appear in physics for the path of a thrown object, in business for profit and revenue, and in geometry for area problems.

Checking your answer

Substitute each root back into the equation: it should give zero, or a number very close to zero for decimal answers. The sum of the roots equals −b ÷ a and their product equals c ÷ a, which is a quick check.

Questions people ask

How do you solve a quadratic equation?

Use the quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 5x + 6 = 0, a = 1, b = −5 and c = 6. The discriminant is 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving 2 and 3.

What is the discriminant?

It is b² − 4ac, the part under the square root. If it is positive there are two real roots. If it is zero there is one repeated root. If it is negative there are no real roots, only two complex ones.

What are complex roots?

When the discriminant is negative the square root involves i, where i² = −1. The roots come as a pair, such as −1 + 2i and −1 − 2i. The parabola never crosses the x-axis in that case.

Why can a not be zero?

If a is zero, there is no x² term, so the equation is linear rather than quadratic. It has a single solution, x = −c ÷ b, which you can find without the formula.

What is the vertex of a parabola?

It is the turning point. Its x-coordinate is −b ÷ 2a and the y-coordinate is the value of the equation there. It sits on the axis of symmetry, halfway between the two roots when they exist.