Skip to content

Quadratic Equation Solver

Roots, discriminant and vertex, with the working shown line by line.

Solve any quadratic equation with the full working: discriminant, substitution, roots real or complex, vertex and factored form where it is tidy.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these

ax² + bx + c = 0

1x² − 3x + 2 = 0

The working

1. The discriminant

b² − 4ac = (-3)² − 4(1)(2) = 1

Positive, so the parabola crosses the x-axis twice and there are two distinct real roots.

2. The square root

1 = 1

3. Substituting into the formula

x = ( −(-3) ± √1 ) ÷ (2 × 1)

Check, using Vieta’s formulas

The roots must sum to −b/a = 3 and multiply to c/a = 2. Both follow from the coefficients without solving anything, so they are a genuine check rather than a restatement of the answer.

Two real rootsx1 = 1x2 = 2
Factored form

(x − 1)(x − 2) = 0

Only shown when the roots are tidy. Irrational roots wearing brackets are the decimal answer in disguise, not a factorisation.

Vertex
(1.5, -0.25)
Axis of symmetry
x = 1.5
Opens
upward

This does not use the formula the way it is written on the board. When b² is much larger than 4ac the square root comes out very close to |b|, so one of the two numerators subtracts two nearly equal numbers and the leading digits cancel, leaving an answer built from rounding error.

For x² + 10⁸x + 1 the textbook arrangement returns −7.45 × 10⁻⁹ where the answer is −10⁻⁸, wrong by 25 percent. At 10¹⁰ it returns exactly zero and loses the root altogether. The stable rearrangement used here, published by Forsythe in 1966, chooses the sign so the operation is an addition and recovers the second root from the product of the roots.

How the Quadratic Equation Solver works

Enter a, b and c and get the roots along with every step that produced them: the discriminant and what its sign means, the substitution written out, the vertex and axis of symmetry, and the factored form when the roots are tidy enough for one to be worth showing. Complex roots are given properly rather than reported as an error.

Also known as: quadratic formula calculator · solve quadratic equation · discriminant calculator · roots of a quadratic · quadratic formula solver

Frequently asked questions

What does the discriminant tell me?

b squared minus 4ac, and its sign settles the shape of the answer before you solve anything. Positive means the parabola crosses the x-axis twice, so two distinct real roots. Zero means it touches at one point and the two roots have collapsed into one. Negative means it never reaches the axis, and the roots are a complex conjugate pair.

Why are my roots complex?

Because the discriminant is negative, so the formula asks for the square root of a negative number. That is not an error and it is not a dead end: the roots exist, they are a conjugate pair of the form p plus or minus qi, and they are shown here rather than replaced with a message saying there is no solution.

Does this use the formula I was taught?

It gives the same answers and does not compute them the same way. The familiar arrangement is numerically unstable: when b squared is much larger than 4ac the square root comes out very close to the size of b, so one numerator subtracts two nearly equal numbers and the leading digits cancel. For x squared plus a hundred million x plus one the textbook arrangement is wrong by 25 percent, and by ten billion it returns exactly zero and loses the root entirely. The rearrangement used here, published by Forsythe in 1966, avoids the cancellation.

What if a is zero?

Then it is not a quadratic, it is a straight line, and the quadratic formula would divide by 2a and therefore by zero. The page says so and solves the linear equation instead of returning infinity or a blank.

Why is the factored form sometimes missing?

Because it is only shown when the roots are tidy. Writing an irrational root inside brackets, as in x minus 1.4142136, is the decimal answer wearing a disguise rather than a factorisation, and printing it would suggest a neatness that is not there.

How can I check the answer myself?

Substitute a root back into the original equation and it should come out at zero. There is a second check that does not need the roots at all: Vieta's formulas say the two roots sum to minus b over a and multiply to c over a, both of which follow straight from the coefficients. Both figures are shown on the page for exactly that purpose.

Related calculators