Quadratic Equation Calculator
Enter the coefficients a, b and c to find the discriminant and the two roots.
What this calculator does
Enter the three coefficients of ax² + bx + c = 0 and the calculator returns the discriminant and both roots. At the defaults — a = 1, b = −5, c = 6 — the discriminant is 1 and the roots are x = 3 and x = 2, the two places where the parabola crosses the x-axis.
The quadratic formula
Every quadratic equation yields to one formula. It packages the method of completing the square into a single expression: subtract the constant, square-complete, take the square root, and solve for x. The plus-or-minus sign matters because taking a square root legally produces two values, and each one is a root.
Worked example: x² − 5x + 6 = 0
Compute the discriminant first: (−5)² − 4 × 1 × 6 = 25 − 24 = 1. Its square root is 1. Now the two roots: (−(−5) + 1) ÷ 2 = 6 ÷ 2 = 3, and (−(−5) − 1) ÷ 2 = 4 ÷ 2 = 2. Check by substitution: 3² − 5 × 3 + 6 = 9 − 15 + 6 = 0, and 2² − 5 × 2 + 6 = 4 − 10 + 6 = 0. Both satisfy the equation, matching the calculator exactly.
What the discriminant tells you
| Discriminant | Roots | Parabola behavior |
|---|---|---|
| Positive | Two distinct real roots | Cuts the x-axis twice |
| Zero | One repeated real root | Touches the x-axis once at the vertex |
| Negative | Two complex roots | Never crosses the x-axis |
Three quick cases show the rule. The equation x² − 5x + 6 = 0 has discriminant 1, barely positive, so its roots 3 and 2 sit close together. The equation x² + 2x + 1 = 0 has discriminant 4 − 4 = 0 and a single repeated root at x = −1, exactly where the parabola kisses the axis. The equation x² + 1 = 0 has discriminant −4, so no real x solves it — the parabola floats one unit above the axis forever.
Beyond the roots
The same coefficients answer questions the roots do not. The axis of symmetry sits at x = −b ÷ 2a, which for the defaults is 5 ÷ 2 = 2.5 — halfway between the roots 2 and 3, as geometry demands. The sign of a says which way the parabola opens: positive upward, negative downward. And the vertex y-value, found by plugging the axis position back into the equation, gives the minimum or maximum, which is why these three numbers solve most projectile and profit-optimization word problems.
Factoring is the shortcut when it works. Since x² − 5x + 6 = (x − 2)(x − 3), the roots appear by inspection — but only when the numbers cooperate. The discriminant hints beforehand: when it is a perfect square, as 1 is here, the roots are rational and the expression factors cleanly. When it is not, the formula is the only route, and the roots will be irrational decimals.
Special inputs
Setting a = 0 demotes the equation to linear: bx + c = 0 has the single root −c ÷ b, which the calculator reports directly. Setting both a and b to 0 leaves c = 0, solvable only when c is itself 0. Fractional and decimal coefficients work identically — the formula never sees the difference — and the calculator accepts values down to steps of 0.1 on each input.
Common mistakes
- Squaring a negative b carelessly: (−5)² = 25, not −25, and b² is never negative
- Dropping the plus-or-minus and reporting only one root
- Dividing by a instead of 2a; the denominator is the full 2a
- Sign-slipping −b: with b = −5 the value of −b is +5, so the numerator starts positive
- Forgetting to multiply c by 4a; with a = 1 the term is still 4c, not c
A graph is the fastest error check. Sketch the parabola roughly: if you computed roots 3 and 2 for an upward-opening parabola, both crossings should sit on the positive x-axis, as they do here. Roots on the wrong side of the axis, or a repeated root claimed for a visibly two-crossing parabola, usually trace back to a sign error in the discriminant.
Where quadratics appear in 2026
SAT and ACT algebra sections lean on quadratics heavily, and grid-in answers in the current format require exact values, so a roots pair like 3 and 2 must be found precisely rather than estimated from a graph. Physics word problems use the same equation for projectile motion: a ball thrown upward at 20 feet per second from 6 feet follows a height equation whose zeros are the launch and landing times. Business courses finish the theme with revenue parabolas, where the two roots bracket the price range that keeps profit above zero.
Frequently asked questions
How do I solve x² − 5x + 6 = 0?
The discriminant is 25 − 24 = 1, so x = (5 ± 1) ÷ 2, giving roots 3 and 2. Both check out: 9 − 15 + 6 = 0 and 4 − 10 + 6 = 0.
What does a negative discriminant mean?
No real roots exist; both roots are complex. The equation x² + 1 = 0 has discriminant −4, and its parabola never touches the x-axis.
What if a is zero?
The equation stops being quadratic and becomes linear. The calculator solves bx + c = 0 directly and reports the single root −c ÷ b.
What does a discriminant of zero mean?
One repeated root. The equation x² + 2x + 1 = 0 has discriminant 0 and the single root x = −1, where the parabola touches the axis at its vertex.
How do I find the vertex from a, b and c?
The axis of symmetry is x = −b ÷ 2a. For a = 1, b = −5 it sits at x = 2.5, midway between the roots 2 and 3; substitute that x back in to get the minimum or maximum y-value.
Why does the formula have a plus-or-minus sign?
Square roots produce two values: √1 is both 1 and −1. Taking each branch gives the two roots, and dropping the sign loses one of them.
When can I factor instead of using the formula?
When the discriminant is a perfect square. Here it is 1, and the factoring (x − 2)(x − 3) = 0 reads the roots straight off. A non-square discriminant forces the formula and irrational roots.
How do I solve 2x² − 4x − 6 = 0?
The discriminant is 16 + 48 = 64, its square root is 8, and the roots are (4 + 8) ÷ 4 = 3 and (4 − 8) ÷ 4 = −1.
Do the roots always add to −b ÷ a?
Yes, by Vieta’s rule: the roots of the default equation sum to 5, which equals −(−5) ÷ 1, and multiply to 6, which equals c ÷ a. It is a one-line check on any solution.
Method and sources
- Quadratic formula: x = (-b +/- sqrt(b^2 - 4ac)) / 2a.