Quadratic Equation Solver
Solve ax² + bx + c = 0 using the quadratic formula. Shows both real and complex roots.
What this calculates
The quadratic formula solves any equation of the form ax² + bx + c = 0. It returns up to two real roots (or two complex conjugate roots when the discriminant is negative). This calculator handles both cases and shows the discriminant so you understand what kind of solution you're getting.
Formula & how it works
x = (−b ± √(b² − 4ac)) / (2a). Discriminant Δ = b² − 4ac. If Δ > 0: two distinct real roots. Δ = 0: one repeated real root. Δ < 0: two complex conjugate roots of form p ± qi, where p = −b/(2a) and q = √(−Δ)/(2a). The formula requires a ≠ 0 (otherwise it's not quadratic — it's linear).
Worked example
x² − 5x + 6 = 0. a=1, b=−5, c=6. Δ = 25 − 24 = 1. Roots = (5 ± 1)/2 = 3 and 2. Factored: (x−2)(x−3) = 0. Different example: x² + x + 1 = 0. Δ = 1 − 4 = −3 < 0. Complex roots: −0.5 ± 0.866i.
Frequently asked questions
What if a = 0?
It's not quadratic anymore — it's linear: bx + c = 0, with solution x = −c/b (assuming b ≠ 0). This calculator returns an error if a is zero.
What are complex roots good for?
Many physics and engineering problems (oscillation, AC circuits, signal processing) naturally produce complex roots. They're not 'fake' — they describe real oscillatory behavior in compact form.
How do I factor instead?
Once you have roots r1 and r2, the factored form is a(x − r1)(x − r2). Integer roots make for clean factoring; irrational roots usually mean factoring isn't worth it — use the formula.
Does this work for any coefficient values?
Yes — integer, decimal, negative. Very large coefficients (above 10¹⁵) start losing precision due to floating-point representation, but that's well beyond practical use.