Quadratic Equation Solver
Solve ax² + bx + c = 0 for real or complex roots, with the discriminant and vertex, using a numerically stable formula.
Your inputs
Results
Roots
x₁ = 2, x₂ = 1
- Discriminant (b² − 4ac)
- 1
- Root type
- Two real roots
- Larger real root
- 2
- Smaller real root
- 1
- Vertex
- (1.5, -0.25)
✓Exact calculation — rounded only for display
What this calculator does
The quadratic formula solves every quadratic. A stable variant avoids precision loss when one root is tiny.
Formula and method
Δ = b² − 4ac; q = −½(b + sign(b)√Δ); x₁ = q ÷ a, x₂ = c ÷ q; complex roots when Δ < 0: −b/2a ± i√(−Δ)/2|a|
Worked example
Calculated by this tool with its default inputs:
Inputs
- a: 1
- b: -3
- c: 2
Results
- Roots: x₁ = 2, x₂ = 1
- Discriminant (b² − 4ac): 1
- Root type: Two real roots
- Larger real root: 2
- Smaller real root: 1
- Vertex: (1.5, -0.25)
How to read the results
The discriminant tells you whether roots are real and distinct, repeated or complex.
Assumptions and limitations
- a must be non-zero.
Questions
Why not use the textbook formula directly?
Subtracting nearly equal numbers loses precision; the stable form avoids it.
Methodology and verification
- Result type
- Exact mathematical calculation (rounded only for display)
- Formula version
- 1.0
- Automated verification
- 5 reference and validation test cases, checked against independently computed values. The site cannot be built if any of them fail.
- Editorial review
- Awaiting human editorial review. The explanation was drafted with AI assistance; the formula and examples are verified by the automated tests above.
Privacy
Everything you enter is calculated in this browser and is not sent to Numerith or anyone else. Inputs are added to a share link only if you choose to include them. Privacy policy