Quadratic Equation Solver
Solve ax² + bx + c = 0 instantly. Get real or complex roots, discriminant value, and full step-by-step working using the quadratic formula. Runs in your.
Added May 13, 2026
Input
Must be non-zero for a quadratic equation.
Result
Enter a value for coefficient a (x²) to see your result.
How it works
Solves the quadratic equation ax² + bx + c = 0 using the quadratic formula. Returns real or complex roots, the discriminant, and full step-by-step working. Works for any real coefficients including negative and decimal values.
Formula
x = (−b ± √(b² − 4ac)) / (2a)
- a
- Coefficient of x² — must be non-zero for a quadratic
- b
- Coefficient of x
- c
- Constant term
- Δ
- Discriminant = b² − 4ac; determines root type
Step by step
- 01Compute the discriminant Δ = b² − 4ac.
- 02If Δ > 0: two distinct real roots — x = (−b ± √Δ) / (2a).
- 03If Δ = 0: one repeated real root — x = −b / (2a).
- 04If Δ < 0: two complex conjugate roots — x = (−b ± i√|Δ|) / (2a).
Examples
Two real roots: x² − 3x + 2 = 0
Δ = (−3)² − 4·1·2 = 9 − 8 = 1 > 0. x = (3 ± 1) / 2 → x₁ = 2, x₂ = 1.
Inputs
- Coefficient a (x²):
- 1
- Coefficient b (x):
- -3
- Constant c:
- 2
Result
- Root 1 (x₁):
- x₁ = 2
- Root 2 (x₂):
- x₂ = 1
Complex roots: x² + x + 1 = 0
Δ = 1 − 4 = −3 < 0. Two complex conjugate roots.
Inputs
- Coefficient a (x²):
- 1
- Coefficient b (x):
- 1
- Constant c:
- 1
Result
- Root 1 (x₁):
- x₁ = −0.5 + 0.8660254i
- Root 2 (x₂):
- x₂ = −0.5 − 0.8660254i
Frequently asked questions
What is the quadratic formula?
The quadratic formula x = (−b ± √(b² − 4ac)) / (2a) gives both roots of any quadratic equation ax² + bx + c = 0 where a ≠ 0. It works for any real coefficients, regardless of whether the discriminant is positive, zero, or negative.
What does the discriminant tell you?
The discriminant Δ = b² − 4ac reveals the nature of the roots before solving. Δ > 0 means two distinct real roots; Δ = 0 means one repeated real root (a perfect square trinomial); Δ < 0 means two complex conjugate roots with no real solution.
What if a = 0?
When a = 0 the equation becomes linear (bx + c = 0) with one solution x = −c/b. If both a and b are zero but c ≠ 0, there is no solution. If all three are zero, every real number satisfies the equation.
How do I factor using the roots?
If x₁ and x₂ are the two roots, the factored form is a(x − x₁)(x − x₂). For example, x² − 3x + 2 = 0 has roots 2 and 1, so it factors as (x − 2)(x − 1).