Quadratic Equation Solver
Solve ax²+bx+c=0 with step-by-step solution showing discriminant and roots.
Reviewed by the ToolNestr Editorial Team — July 2026
Enter coefficients a, b, c and click Solve.
The quadratic formula
The standard form of a quadratic equation is ax² + bx + c = 0, where a, b, and c are real numbers and a ≠ 0. The solutions — called roots — are given by the quadratic formula:
x = (−b ± √(b² − 4ac)) / 2a
The expression under the square root, Δ = b² − 4ac, is called the discriminant. It determines the nature of the roots without fully solving the equation. If Δ > 0, the equation has two distinct real roots. If Δ = 0, there is exactly one real root (a repeated root). If Δ < 0, the roots are complex and come as a conjugate pair involving the imaginary unit i.
Worked example: x² − 5x + 6 = 0
Let us walk through a concrete case. Consider the equation x² − 5x + 6 = 0. Here a = 1, b = −5, and c = 6.
1. Identify coefficients
a = 1, b = −5, c = 6.
2. Compute the discriminant
Δ = b² − 4ac = (−5)² − 4·1·6 = 25 − 24 = 1.
3. Apply the quadratic formula
x = (5 ± √1) / 2·1 = (5 ± 1) / 2.
4. Find the two roots
x₁ = (5 + 1) / 2 = 3, x₂ = (5 − 1) / 2 = 2.
Since Δ = 1 > 0, both roots are real and distinct. The parabola crosses the x-axis at x = 2 and x = 3.
You can verify by plugging each root back into the original equation: 2² − 5·2 + 6 = 4 − 10 + 6 = 0, and 3² − 5·3 + 6 = 9 − 15 + 6 = 0. Both work, confirming the solution.
Another example: 2x² − 4x + 2 = 0
Now consider 2x² − 4x + 2 = 0 with a = 2, b = −4, c = 2. The discriminant is Δ = (−4)² − 4·2·2 = 16 − 16 = 0. A zero discriminant means a single repeated root. Applying the formula: x = (4 ± √0) / 4 = 1. The equation has one real root (a double root) at x = 1, and the parabola just touches the x-axis at its vertex.
Complex roots: x² + x + 1 = 0
When the discriminant is negative, the square root of a negative number introduces the imaginary unit i (where i² = −1). For x² + x + 1 = 0, a = 1, b = 1, c = 1. The discriminant is Δ = 1 − 4 = −3. The roots are:
x = (−1 ± √(−3)) / 2 = (−1 ± i·√3) / 2.
These are two complex conjugate roots: x₁ = (−1 + i√3)/2 and x₂ = (−1 − i√3)/2. The parabola does not cross the x-axis — it lies entirely above or below it. Complex roots always come in pairs because the coefficients are real.
Use cases
Physics
Projectile motion, free fall, and kinematics. The height of a thrown object follows a parabolic path; solving for time when height is zero is a quadratic equation.
Engineering
Circuit analysis, structural load calculations, and signal processing all produce quadratic relationships that need solving.
Algebra
Homework, exam prep, and graphing parabolas. Understanding quadratics is foundational for calculus, optimisation, and advanced mathematics.
Relation to parabolas
The graph of y = ax² + bx + c is a parabola. The sign of a determines the opening direction: a > 0 opens upward (like a U), and a < 0 opens downward (like an upside-down U). The vertex is the highest or lowest point, and the roots are where the parabola meets the x-axis. The vertex x-coordinate is given by x = −b / (2a), and the y-coordinate is found by substituting this back into the equation. The axis of symmetry is the vertical line through the vertex.
If the discriminant is positive, the parabola crosses the x-axis at two distinct points. If it is zero, the vertex touches the x-axis. If it is negative, the parabola hovers entirely above (a > 0) or below (a < 0) the x-axis and has no real points of intersection.
Tips for solving quadratic equations
Always check a ≠ 0 first
If a = 0, the equation is not quadratic but linear. Solve it as bx + c = 0, giving x = −c / b. This calculator handles that case automatically.
The discriminant tells you everything
Compute Δ = b² − 4ac before attempting to find roots. Knowing whether Δ is positive, zero, or negative immediately tells you what kind of roots to expect and whether the parabola crosses the x-axis.
Rationalise and simplify
When the discriminant is not a perfect square, leave the root expression in simplified radical form. For complex roots, always write them as a conjugate pair: p ± qi.
Verify by substitution
Plug your computed roots back into the original equation to check they produce zero. This is a simple sanity check that catches arithmetic mistakes.
Related tools
- Prime Number Checker — test whether a number is prime.
- GCD and LCM Calculator — find the greatest common divisor and least common multiple of two numbers.
- Logarithm Calculator — compute logarithms with any base.
Frequently asked questions
What is the discriminant?
D = b² − 4ac. If D > 0 there are 2 real roots; if D = 0 one real root; if D < 0 two complex roots.
What are complex roots?
When the discriminant is negative, the roots involve the imaginary unit i. They come as a conjugate pair.
What if a = 0?
Then it is not a quadratic equation but a linear one: bx + c = 0, solved as x = −c/b.
Where is this used?
Physics, engineering, economics, and any field involving parabolic relationships.