Quadratic equation solver
For x² − 3x + 2 the discriminant is 1: positive, so two distinct real roots, and they come out as 2 and 1. Change c to 3 and the discriminant goes to −3, the roots become the complex pair 1.5 ± 0.866i, and the vertex row still reads 1.5 and 0.75 — a parabola whose lowest point sits above the axis, which is the same fact stated geometrically.
Enter the three coefficients of ax² + bx + c = 0 and this returns both roots at once, the discriminant b² − 4ac that decides what kind of roots they are, and the vertex of the parabola. For x² − 3x + 2 the discriminant is 1, so there are two real roots, and they are 2 and 1. When the discriminant is negative the roots are a complex pair and they are reported as one rather than left blank.
How to use it
Every quadratic is solved by the same formula, x = (−b ± √(b² − 4ac)) ÷ 2a, and the interesting part is not the roots but the term under the square root. Read it first and you know what the answer will look like before you have computed any of it.
The discriminant decides everything
b² − 4ac is the discriminant, and its sign is the whole classification. Positive gives two distinct real roots, and the parabola crosses the x-axis twice. Zero gives one repeated root, where the curve touches the axis and turns without crossing. Negative gives a complex conjugate pair, and the curve never reaches the axis at all — which is why a graph is sometimes the fastest sanity check on an algebra slip. Checking the sign first is also the quickest way to catch a transcription error: a negative discriminant on a problem that was supposed to have real roots almost always means a sign was copied wrong, not that the mathematics went strange.
Getting a quadratic equation into standard form
The formula only applies to standard form, ax² + bx + c = 0, with every term on one side and zero on the other. 3x² = 12 − x becomes 3x² + x − 12 = 0, so a is 3, b is 1 and c is −12. Two things trip people up here. A missing term means its coefficient is zero, not that it is absent: x² − 9 = 0 has b = 0. And if a itself is zero, the equation is not a quadratic at all but a linear one, with the single root −c ÷ b; this tool says so rather than dividing by zero and returning nonsense.
The vertex is the answer to a different question
Roots are where the curve meets the axis; the vertex is its turning point, at x = −b ÷ 2a with y = c − b² ÷ 4a. When the problem is a maximum or a minimum — the peak of a trajectory, the output that minimises a cost, the profit-maximising price — the vertex is what you want and the roots are incidental. It also sits exactly halfway between the two roots when they are real, which makes it a free check on them.
Two ways to check the answer in seconds
A pair of roots must sum to −b ÷ a and multiply to c ÷ a. For 2x² − 7x + 3 the roots are 3 and 0.5: they sum to 3.5, which is 7 ÷ 2, and multiply to 1.5, which is 3 ÷ 2. Both agree, so the roots are right. This catches a sign slip faster than re-deriving anything. The other check is substitution — put a root back into the original expression and it should come to zero, or near enough that the difference is floating point. On that note, two solvers can disagree very slightly on the smaller root when b² is enormous next to 4ac, because the subtraction in the numerator cancels most of the significant digits. That is a limit of the arithmetic, not a disagreement about the mathematics.
What it will not do
It gives numbers, not a derivation, and it does not factorise. Factorising is only available when the roots happen to be rational, which most quadratics outside a textbook are not; the formula works for every one of them. Nor does it solve cubics or anything higher — a general formula exists for the cubic and quartic and stops being useful long before it stops existing.
What people use it for
- Solving a quadratic for both roots at once rather than one at a time
- Checking the discriminant to see whether real roots exist before solving
- Finding the turning point of a parabola for a maximum or minimum
- Getting the complex pair when the discriminant is negative
- Verifying homework roots against the sum and product of the coefficients
- Checking a projectile or trajectory calculation that lands on a quadratic
Questions
x = (−b ± √(b² − 4ac)) ÷ 2a. The plus and the minus give the two roots, and the term under the root is the discriminant that decides whether they are real.
Its sign classifies the roots before you calculate them. Positive means two distinct real roots and the parabola crosses the axis twice. Zero means one repeated root where it just touches. Negative means a complex conjugate pair and no crossing at all.
Move everything to one side so it reads ax² + bx + c = 0. 3x² = 12 − x becomes 3x² + x − 12 = 0, giving a = 3, b = 1, c = −12. A term you cannot see has a coefficient of zero rather than no coefficient.
Then it is not a quadratic, it is linear, and the single solution is −c ÷ b. The formula would divide by zero, so this says so instead of returning an answer.
At x = −b ÷ 2a, with y = c − b² ÷ 4a. It is the turning point, so it is the maximum or minimum of the curve — usually the actual answer when a quadratic came out of an optimisation rather than an equation to solve. With real roots it also sits exactly midway between them.
They must add to −b ÷ a and multiply to c ÷ a. For 2x² − 7x + 3 the roots 3 and 0.5 sum to 3.5 and multiply to 1.5, which is exactly what the coefficients demand. A sign error fails this immediately.
Almost always cancellation on the smaller root when b² is very large next to 4ac: the numerator subtracts two nearly equal numbers and most of the significant digits vanish. It is a floating-point limit that every solver shares to some degree, not a disagreement about the maths.
Only when the roots are rational, which is a minority of quadratics once they stop coming from a textbook. The formula works for all of them, including the ones with irrational or complex roots.