Quadratic Equation Solver - Roots, Discriminant, Vertex and Factored Form with Steps

Enter the three numbers a, b and c of ax² + bx + c = 0 to find the roots, whether real or complex, along with the discriminant, the vertex, the axis of symmetry, the y-intercept and, when the roots are rational, the factored form.

About this tool

The working is written out step by step. The coefficients can be whole numbers, decimals or fractions, and they are handled exactly, so nothing is lost to rounding.

How it works

A quadratic equation has the form ax² + bx + c = 0 with a not equal to 0. The quadratic formula gives its solutions: x = (-b ± √(b² - 4ac)) / (2a). The part under the square root, D = b² - 4ac, is the discriminant.

The discriminant tells you what kind of roots to expect. If D is positive there are two different real roots and the parabola crosses the x-axis twice. If D is zero there is one repeated real root and the parabola just touches the axis. If D is negative there are no real roots: the two roots are complex conjugates, a + bi and a - bi, where i is the square root of -1.

The graph of y = ax² + bx + c is a parabola with its vertex at x = -b / (2a) and y = c - b² / (4a). The vertical line through the vertex is the axis of symmetry. The parabola opens upward with a minimum at the vertex when a is positive, and downward with a maximum when a is negative. The y-intercept is c.

When D is the square of a rational number the roots are rational and the equation factors. The page reads coefficients as exact fractions, so it spots this without rounding error and gives the factors with whole-number coefficients, like (2x - 1)(x - 2). Otherwise it shows the exact roots with a square root, such as (1 ± √5) / 2, and computes the decimals with the numerically stable form of the formula, which avoids the loss of digits (catastrophic cancellation) that the plain formula can cause when b² is much larger than 4ac.

If a is 0 the x² term vanishes and the equation is linear, so the tool solves bx + c = 0 instead. If a and b are both 0 there is either no solution (when c is not 0) or every number is a solution (when c is 0).

Worked examples

x² - 3x + 2 = 0

D = (-3)² - 4 × 1 × 2 = 9 - 8 = 1. The roots are (3 ± 1) / 2, which are 1 and 2, so it factors as (x - 1)(x - 2). The vertex is at (1.5, -0.25).

2x² - 5x + 2 = 0

D = 25 - 16 = 9, so the roots are (5 ± 3) / 4, which are 2 and 1/2 (0.5). Because they are rational it factors as (2x - 1)(x - 2).

x² - x - 1 = 0

D = 1 + 4 = 5, which is not a perfect square, so the roots are irrational: (1 ± √5) / 2, or about -0.6180339887 and 1.618033989 (the golden ratio).

x² + 2x + 5 = 0

D = 4 - 20 = -16, which is negative, so there are no real roots. The roots are (-2 ± 4i) / 2, which is -1 + 2i and -1 - 2i. The vertex is at (-1, 4).

What the discriminant D = b² - 4ac tells you

DiscriminantRootsParabolaExample
D is positiveTwo different real rootsCrosses the x-axis twicex² - 3x + 2 = 0 has D = 1 and roots 1 and 2
D is zeroOne repeated real rootTouches the x-axis at its vertexx² - 2x + 1 = 0 has D = 0 and the root 1
D is negativeTwo complex roots, a + bi and a - biNever reaches the x-axisx² + 2x + 5 = 0 has D = -16 and roots -1 + 2i and -1 - 2i
D is a perfect squareRational roots, so it factorsCrosses at rational points2x² - 5x + 2 = 0 has D = 9 and factors as (2x - 1)(x - 2)

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0 with a not equal to 0, x = (-b ± √(b² - 4ac)) / (2a). The plus sign gives one root and the minus sign gives the other. Put in a, b and c, work out the discriminant under the square root first, then finish the arithmetic.

What does the discriminant tell me?

Its sign tells you the kind of roots. Positive means two different real roots, zero means one repeated real root, and negative means two complex roots with no real solutions. Its value also shows whether the roots are rational: if it is a perfect square the equation factors neatly.

What are complex roots and what does a + bi mean?

When the discriminant is negative the square root is of a negative number, which is written with i, where i² = -1. The roots are then a + bi and a - bi, called complex conjugates. The real part is -b / (2a), and the size of the imaginary part is the square root of -D divided by twice the size of a.

How do I know if a quadratic can be factored?

It factors with rational numbers exactly when the discriminant is the square of a rational number. For x² - 3x + 2, D = 1, so it factors as (x - 1)(x - 2). For x² - x - 1, D = 5 is not a perfect square, so it does not factor over the rationals.

What happens if a is 0?

Then there is no x² term and the equation is linear: bx + c = 0 gives x = -c / b. If b is also 0, the equation is either never true (c is not 0) or always true (c is 0). The tool handles all three cases and says which one applies.

How do I find the vertex of the parabola?

The x-coordinate of the vertex is -b / (2a) and the y-coordinate is c - b² / (4a). The vertex is the lowest point if a is positive and the highest point if a is negative. The vertical line x = -b / (2a) is the axis of symmetry.

Can I type fractions and decimals?

Yes. Type 0.25 or 1/4 and the value is stored exactly, so a root such as 1/3 is not blurred into 0.333 and a discriminant of 0.01 is not shown as 0.0099999. Up to 12 digits after the point are accepted, and values up to 1,000,000,000,000,000 in size.

What is a repeated root?

When D = 0 the two roots are the same number. The parabola touches the x-axis at its vertex, and the quadratic is a perfect square: x² - 2x + 1 = (x - 1)².

Updated Oct 13, 2026