Math / calculator
Quadratic Equation Calculator
Solve ax²+bx+c=0 from real coefficients. View the discriminant and two real, repeated or complex-conjugate roots with stable real-root evaluation.
Calculator
Calculator
Solve ax² + bx + c = 0.
Enter finite real coefficients with a nonzero a. The calculator reports two real roots, a repeated root or a complex-conjugate pair and shows the discriminant.
Your result
Enter details to see the result.
Complete the inputs and calculate to see the main result and its supporting breakdown.
Example
Worked example
Example inputs
- Coefficient a
- 1
- Coefficient b
- -3
- Coefficient c
- 2
Calculation breakdown
D=b²−4ac and x=(−b±√D)/(2a). For D>0, q=−[b+sign(b)√D]/2 gives equivalent roots q/a and c/q. For D<0, real part=−b/(2a) and imaginary magnitude=√(−D)/(2|a|). Coefficients are scaled before evaluation.
- Discriminant b²−4ac
- 1
- Root type
- Two real roots
Example result
Roots
2, 1
Real roots use a cancellation-resistant equivalent of the quadratic formula; coefficients are scaled before the discriminant calculation.
How to interpret the result
The roots satisfy the supplied quadratic within floating-point precision. A complex pair is shown as a real part plus or minus an imaginary magnitude; discriminant sign classifies the result, while rounded display values should not be treated as symbolic exactness.
How to use this calculator
- Rewrite the equation as ax²+bx+c=0 and identify finite real coefficients.
- Enter a nonzero a with b and c; use signed values for negative coefficients.
- Solve and read the discriminant, root type and real or complex roots, retaining the displayed precision limits.
How it works
Formula
D=b²−4ac and x=(−b±√D)/(2a). For D>0, q=−[b+sign(b)√D]/2 gives equivalent roots q/a and c/q. For D<0, real part=−b/(2a) and imaginary magnitude=√(−D)/(2|a|). Coefficients are scaled before evaluation.
How do I solve a quadratic equation?
For ax²+bx+c=0 with nonzero a, calculate b²−4ac and apply the quadratic formula. A positive discriminant yields two real roots, zero gives a repeated root, and negative gives complex conjugates. The calculator also uses an equivalent stable formula to reduce real-root cancellation.
What this calculator does
A quadratic has a nonzero coefficient a for x squared. Its discriminant determines whether roots are two distinct real numbers, one repeated real number or a complex-conjugate pair. Stable evaluation reduces cancellation when real roots differ greatly in magnitude.
Who this is useful for
Students solving a real-coefficient quadratic and checking the relationship between discriminant sign, real roots and complex conjugate pairs.
Inputs you will need
Required or selected inputs
- Coefficient a
- Coefficient b
- Coefficient c
Assumptions
- a, b and c are finite real coefficients and a is nonzero.
- Discriminant classification uses floating-point arithmetic on the supplied coefficients; displayed roots are rounded separately.
Limitations
- a=0 is a linear problem and is rejected here rather than labeled a quadratic.
- Coefficient ranges and finite-root checks prevent unsupported overflow, but floating-point inputs near a repeated root still limit classification certainty.
Useful next steps
Compare the polynomial visually without relying on pixel intersections for exact roots using Graphing Calculator.
Evaluate a root substitution or another real expression with Scientific Calculator.
References
OpenStax: quadratic formula — The quadratic formula and discriminant determine root types. The calculator evaluates equivalent scaled formulas to reduce numeric cancellation.
See how HandyChest handles units, validation, rounding, and testing, or Report a problem with this calculator.
Good to know
Frequently asked questions
Why might the two roots have very different sizes?
Their product is c/a and sum is −b/a. Directly subtracting two nearly equal large numbers can lose the smaller root; using q/a and c/q preserves it more reliably.
Keep going