Math
Roots of ax² + bx + c = 0, with the discriminant, the vertex, and complex roots when the discriminant is negative.
Results update as you type. No calculate button. All calculations run locally in your browser.
—
—
x = [−b ± √(b² − 4ac)] ÷ 2a. The discriminant D = b² − 4ac decides the root type: D > 0 gives two distinct real roots, D = 0 gives one repeated root, D < 0 gives two complex roots. The vertex (turning point) sits at x = −b ÷ 2a.
x² − 5x + 6 = 0: a = 1, b = −5, c = 6. Discriminant = (−5)² − 4 × 1 × 6 = 25 − 24 = 1. Roots = [5 ± √1] ÷ 2, so x = 3 and x = 2. Check: 3² − 15 + 6 = 0 and 2² − 10 + 6 = 0. The vertex is at x = 2.5.
Only genuine quadratics are solved: a must not be zero. If a = 0 the equation is linear (bx + c = 0) and this page says so instead of dividing by zero. Coefficients may be decimals or negative. Very large coefficients can lose precision in floating-point arithmetic; results are rounded to two decimals for display, so a root like 0.001 may show as 0.
Then it is not a quadratic at all — it is the linear equation bx + c = 0, with the single solution x = −c ÷ b (when b is not zero either). This page flags that case instead of producing nonsense.
Whether the roots are real and how many: positive means two distinct real roots, zero means one repeated root, negative means no real roots — the parabola never crosses the x-axis.
When the discriminant is negative, the roots involve i (the square root of −1). For x² + 2x + 5 = 0 the roots are −1 + 2i and −1 − 2i. They are genuine solutions over the complex numbers, just not points on the real x-axis.
A degree-2 polynomial has two roots counting multiplicity. They can coincide (one repeated root) or be a complex pair, but there are always two.
Factoring is faster when the roots are small integers, as in the example (x − 3)(x − 2). The formula always works, including when factoring is not obvious.
It is the parabola's turning point: the minimum when a > 0, the maximum when a < 0. It sits exactly halfway between the two real roots when they exist.
Results are estimates only and do not constitute professional advice.