How to solve a quadratic equation
Enter the coefficients a, b and c for an equation in the form ax² + bx + c = 0. The discriminant helps describe the roots, while the calculator provides the resulting solutions.
Check the coefficients
Make sure a is not zero when you intend to solve a quadratic equation. Use the displayed result to verify the roots in the original equation.
MATH CALCULATORS
Quadratic Equation Calculator
Solve ax² + bx + c = 0, calculate the discriminant and see the working used to find the roots.
Solve ax² + bx + c = 0
Quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2a
What the discriminant means
The discriminant is D = b² − 4ac. If D is positive, there are two distinct real roots. If D is zero, there is one repeated real root. If D is negative, the roots are complex.
How to use the quadratic equation calculator
- Enter the coefficients a, b and c.
- Make sure a is not zero so the equation remains quadratic.
- Select Solve Equation.
- Review the discriminant and roots shown in the result.
Worked example
For x² − 5x + 6 = 0, the coefficients are a = 1, b = −5 and c = 6. The discriminant is 1, so the roots are x = 2 and x = 3.
Common mistakes
Keep the signs of b and c when substituting into the formula. Also check the denominator 2a and verify the resulting roots in the original equation when accuracy matters.
Real and complex roots
A negative discriminant means there are no real roots. This calculator displays the corresponding complex roots in the form real ± imaginary i.
Important limitation
This calculator handles a quadratic equation in one variable in standard form ax² + bx + c = 0. It does not expand or rearrange a general equation entered as text.
Related calculators
Linear Equation Calculator · Pythagorean Theorem Calculator · Percentage Calculator · All Calculators
How this calculation is checked
The solver applies the stated equation, validates required coefficients, handles edge cases and explains how to verify the result by substitution.
See Calcora calculation methodology for formulas, assumptions and checking standards.
Common questions
How should I check the answer?
Substitute the calculated value back into the original equation. The two sides should agree within normal rounding.
What if the inputs do not define one solution?
The solver reports special cases such as no solution or infinitely many solutions instead of forcing a misleading numeric answer.
Use the discriminant to interpret the roots
A quadratic equation has the form ax² + bx + c = 0, with a ≠ 0. The discriminant D = b² − 4ac determines the type of roots. If D is positive, there are two distinct real roots; if D is zero, there is one repeated real root; if D is negative, the roots are a complex-conjugate pair.
Worked example
For x² − 5x + 6 = 0, a = 1, b = −5 and c = 6. The discriminant is 25 − 24 = 1, so the roots are (5 ± 1)/2, giving x = 3 and x = 2. Substituting either value into the original expression gives zero.
Numerical stability and limitations
For coefficients with very different magnitudes, direct use of the quadratic formula can lose precision due to floating-point rounding. High-precision work may require a numerically stable solver. If a = 0, the equation is linear rather than quadratic.
Frequently asked questions
What does a negative discriminant mean?
There are no real roots; the two solutions are complex numbers when coefficients are real.
Why must a not equal zero?
If a is zero, the x² term disappears and the equation is not quadratic.
How can I verify both roots?
Substitute each root into ax² + bx + c and check that the result is zero, allowing for rounding.