Quadratic Formula Calculator: Real and Complex Roots
Quadratic formula
x = (−b ± √(b² − 4ac)) ÷ (2a)
Quadratic coefficient a · Linear coefficient b · Constant c
Divide by the nonzero coefficient a and move the constant to the other side.
x = (−b ± √(b² − 4ac)) ÷ (2a)
Algebraic walkthrough of completing the square; the equations explain the formula while the worked example substitutes your coefficients.
Worked example you can change
x = (−b ± √(b² − 4ac)) ÷ (2a)
- x = (−(-3) ± √((-3)² − 4 × (1) × (2))) ÷ (2 × (1))
- Discriminant = 1; roots ≈ 1 and 2
Calculator
Enter complete decimal numbers; separate list values with commas or spaces. Decimal answers are shown to 15 significant digits; exact integer results retain all digits.
- Discriminant
- 1
- Two real roots
- 1; 2
Formula variants
| Shape or method | Formula | Meaning |
|---|---|---|
| Two real roots | b² − 4ac > 0 | The positive discriminant gives two different real roots. |
| Repeated root | b² − 4ac = 0; x = −b/(2a) | The two solutions coincide, with multiplicity two. |
| Complex conjugates | b² − 4ac < 0 | The square root has an imaginary part; both roots have the same real part and opposite imaginary parts. |
Questions
What is the quadratic formula?
For ax² + bx + c = 0 with a nonzero, x = (−b ± √(b² − 4ac))/(2a). The ± sign gives both roots.
What does the discriminant tell me?
A positive discriminant gives two real roots, zero gives a repeated root, and a negative discriminant gives complex conjugates.
Can a be zero?
No. That would make the equation linear rather than quadratic; enter a nonzero a.
Why can a tiny root still be shown?
The engine uses a stable equivalent of the quadratic formula to avoid cancellation and retains small nonzero roots in scientific notation.
Sources and method
Use the quadratic formula for ax² + bx + c = 0, with two real roots, a repeated root or complex conjugates. The coefficient a must be nonzero.
We calculate with 40 significant digits and round only the displayed result. Diagrams are labelled explanations and are not measurement drawings.
More Math formulas
Browse Math calculatorsUpdated