Quadratic Equation Solver
Solve quadratic equations of the form ax² + bx + c = 0 and find both roots.
Did this tool answer your question?
Thanks — this helps us improve the tool.
How to use this tool
- Enter a (coefficient of x²), b (coefficient of x) and c (constant) in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your root 1 (x₁) and the full breakdown beneath it.
Enter coefficients a, b, c for ax² + bx + c = 0. The calculator uses the quadratic formula to find both roots.
Formula
For ax2 + bx + c = 0:
x = (−b ± √(b² − 4ac)) / (2a)
The discriminant is Δ = b² − 4ac. If Δ < 0, there are no real roots.
How it works
The solver computes the discriminant Δ = b² − 4ac first; if it is negative the equation has no real solutions and NaN is returned. Otherwise it applies the quadratic formula to find both roots: x₁ using the positive square root and x₂ using the negative square root. The formula is exact for real coefficients and real roots.
Worked example
Worked example: x² − 5x + 6 = 0
- Inputs: a = 1, b = −5, c = 6.
- Discriminant: Δ = (−5)² − 4(1)(6) = 25 − 24 = 1.
- Root 1: x₁ = (−(−5) + √1) / (2×1) = (5 + 1) / 2 = 3.
- Root 2: x₂ = (5 − 1) / 2 = 2.
x₁ = 3, x₂ = 2
Common mistakes to avoid
- Forgetting to move all terms to one side before identifying a, b, c; e.g. treating x² + 3x = 4 as a=1, b=3, c=4 instead of c=-4.
- Sign errors when reading b from the equation, especially when the middle term is negative (e.g. x² - 5x + 6: b = -5, not 5).
- Concluding no solution exists when the discriminant is negative, missing that two complex roots still exist.
Key terms
- Quadratic equation
- A polynomial equation of degree 2, in the form ax² + bx + c = 0 where a ≠ 0.
- Discriminant (Δ)
- The expression b² − 4ac that determines the nature of the roots: positive → two real roots, zero → one repeated root, negative → no real roots.
- Root
- A value of x that satisfies the equation, i.e., makes the left side equal zero.
- Coefficient
- A numerical factor multiplying a variable term; a is the coefficient of x², b of x.
- Quadratic formula
- The general solution x = (−b ± √Δ) / (2a) that finds both roots of any quadratic equation.
Frequently asked questions
- What is the quadratic formula?
- For ax² + bx + c = 0, the roots are x = (-b ± √(b²-4ac)) / (2a). The discriminant b²-4ac determines the nature of the roots.