Quadratic Equation Calculator
Enter the coefficients a, b and c to solve ax² + bx + c = 0. The calculator uses the quadratic formula, reports the discriminant, and shows the full working — including complex roots when they occur.
CalculatorEnter values below
Formula
x = (−b ± √(b² − 4ac)) / 2a where the discriminant Δ = b² − 4ac
How it works
- 1
A quadratic equation has the form ax² + bx + c = 0 with a ≠ 0.
- 2
The discriminant Δ = b² − 4ac tells you how many real roots exist.
- 3
Δ > 0 gives two real roots, Δ = 0 gives one repeated root, Δ < 0 gives a complex conjugate pair.
- 4
The roots are then found with x = (−b ± √Δ) / 2a.
Worked examples
Two real roots
Solve x² − 3x + 2 = 0.
- Δ = (−3)² − 4(1)(2) = 9 − 8 = 1
- x = (3 ± 1) / 2
- x₁ = 2, x₂ = 1
Answer: x = 2 or x = 1
Complex roots
Solve x² + x + 1 = 0.
- Δ = 1 − 4 = −3
- Real part = −0.5, Imaginary part = √3 / 2 ≈ 0.866
- x = −0.5 ± 0.866i
Answer: x = −0.5 ± 0.866i
Frequently asked questions
What is the quadratic formula?
The quadratic formula is x = (−b ± √(b² − 4ac)) / 2a. It solves any equation of the form ax² + bx + c = 0.
What does the discriminant tell me?
The discriminant Δ = b² − 4ac determines the nature of the roots: positive means two real roots, zero means one repeated root, and negative means two complex conjugate roots.
Can this calculator handle complex roots?
Yes. When the discriminant is negative, the calculator returns the two complex conjugate roots in the form a ± bi.
What is a quadratic equation?
A quadratic equation is any equation that can be written as ax² + bx + c = 0, where a, b and c are constants and a is not zero. Its graph is a parabola.
Why must the coefficient a not be zero?
If a = 0 the x² term disappears and the equation becomes linear (bx + c = 0), not quadratic. The quadratic formula divides by 2a, so a = 0 would be undefined.
Can I solve a quadratic by factoring instead?
Yes — factoring is often faster when the roots are whole numbers. The quadratic formula always works, including for messy or complex roots, so it’s a reliable fallback.