How it’s calculated
The quadratic formula solves ax² + bx + c = 0. The part under the square root, D = b² − 4ac, is the discriminant: if D is positive there are two real roots, if D is zero there is one repeated root, and if D is negative the roots are a complex-conjugate pair (shown as re ± im·i).
For accuracy the calculator uses the equivalent stable form q = −½(b + sign(b)·√D), with roots q ÷ a and c ÷ q. This avoids subtracting two nearly equal numbers, so a tiny root such as 1×10⁻⁸ is not lost.
Example: x² − 3x + 2 = 0. D = 9 − 8 = 1, so x = (3 ± 1) ÷ 2 gives x = 1 and x = 2. The vertex is at h = 1.5, k = 2 − 9/4 = −0.25.
Frequently asked questions
What does it mean if the discriminant is negative?
The parabola never crosses the x-axis, so there are no real solutions. The two solutions are complex numbers, written as a real part ± an imaginary part with i = √−1.
What if a = 0?
Then there is no x² term and the equation is linear: bx + c = 0, with the single solution x = −c ÷ b.
How do I find the vertex of a parabola?
The vertex is at x = −b ÷ 2a. Substitute that x into the equation to get the y-value k.
Can I solve an equation that is not equal to zero?
Move every term to one side first. For example 2x² + 3x = 5 becomes 2x² + 3x − 5 = 0, so a = 2, b = 3, c = −5.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator