Quadratic Formula Calculator
Solve a quadratic equation ax² + bx + c = 0 for its real root using the quadratic formula. Returns the principal solution x₁, or flags when no real solution exists.
Last updated: May 2026
Compare with similar
About this calculator
A quadratic equation has the form ax² + bx + c = 0, where a, b, and c are coefficients and a ≠ 0. The quadratic formula gives its solutions: x = (−b ± √(b² − 4ac)) / (2a). This calculator computes the principal root x₁ using the plus sign, x₁ = (−b + √(b² − 4ac)) / (2a); the second root x₂ uses the minus sign in front of the square root. The expression under the root, b² − 4ac, is called the discriminant, and it determines the nature of the solutions. If the discriminant is positive, there are two distinct real roots; if it is exactly zero, there is one repeated real root; and if it is negative, there are no real solutions (the roots are complex), which this calculator reports as 'No real solutions'. Geometrically, the roots are the x-values where the parabola y = ax² + bx + c crosses the x-axis, so a positive discriminant means two crossings, zero means the vertex just touches the axis, and negative means the parabola never reaches it. Edge cases: the formula requires a ≠ 0, because if a were zero the equation would be linear, not quadratic, and dividing by 2a would fail. To get both roots, solve once here for x₁ and then compute x₂ = (−b − √(b² − 4ac)) / (2a) by hand, or note that the two roots sum to −b/a and multiply to c/a, which provides a quick verification.
How to use
Example 1 — solve x² − 5x + 6 = 0. Enter a = 1, b = −5, c = 6. The discriminant is (−5)² − 4(1)(6) = 25 − 24 = 1, which is positive, so there are two real roots. x₁ = (5 + √1) / 2 = 6 / 2 = 3. Verify: the other root is x₂ = (5 − 1) / 2 = 2, and indeed (x − 2)(x − 3) = x² − 5x + 6, with roots summing to 5 and multiplying to 6. Example 2 — solve x² + 2x + 5 = 0. Enter a = 1, b = 2, c = 5. The discriminant is 2² − 4(1)(5) = 4 − 20 = −16, which is negative, so the calculator returns 'No real solutions'. Verify: the parabola opens upward with its vertex above the x-axis, so it never crosses, confirming the roots are complex rather than real.
Frequently asked questions
What is the discriminant and what does it tell me?
The discriminant is the quantity b² − 4ac found under the square root in the quadratic formula, and it reveals how many real solutions the equation has before you finish solving. If it is positive, the equation has two distinct real roots; if it equals zero, there is exactly one real root (a repeated root where the parabola touches the x-axis at its vertex); and if it is negative, there are no real roots because you cannot take the real square root of a negative number. This calculator reports 'No real solutions' in that last case. Checking the discriminant first is a fast way to understand the solution before computing the actual values. It is one of the most useful quick checks in all of algebra.
Why does this calculator only show one root?
It returns the principal root x₁, computed with the plus sign in the ± of the quadratic formula. Every quadratic with a positive discriminant actually has two roots, and the second, x₂, uses the minus sign: x₂ = (−b − √(b² − 4ac)) / (2a). You can compute x₂ quickly by hand, or use the relationships that the two roots sum to −b/a and multiply to c/a. For instance, knowing x₁ = 3 and that the roots multiply to 6 immediately gives x₂ = 2. When the discriminant is zero, both roots are identical, so the single value is the complete answer.
What happens if the coefficient a is zero?
If a = 0, the equation is not actually quadratic — it reduces to the linear equation bx + c = 0, whose single solution is x = −c/b. The quadratic formula cannot be used because it divides by 2a, and dividing by zero is undefined. So this calculator requires a nonzero a. If you find yourself with a = 0, switch to a linear-equation solver instead. This is a common setup error: always confirm there is a genuine x² term before applying the quadratic formula. The presence of that squared term is what makes an equation quadratic.
How do I find complex roots when there is no real solution?
When the discriminant is negative, the roots are complex numbers involving the imaginary unit i, where i² = −1. You compute them as x = (−b ± √(|discriminant|) · i) / (2a). For example, x² + 2x + 5 = 0 has discriminant −16, so the roots are (−2 ± 4i) / 2 = −1 ± 2i. This calculator reports 'No real solutions' rather than computing these, because it works in real numbers. If your problem requires complex roots — common in engineering and physics — take the absolute value of the discriminant, attach i, and apply the formula. The real part is −b/(2a) and the imaginary part comes from the square root term.
When should I NOT use the quadratic formula?
Do not use it when a = 0, because the equation is linear, not quadratic, and the formula breaks down. While the formula always works for genuine quadratics, simpler methods are sometimes faster: easily factorable equations can be solved by inspection, and equations of the form x² = k are solved by taking square roots directly. For equations of higher degree (cubics, quartics), the quadratic formula does not apply at all. Also, if you need complex roots, remember this calculator returns only real solutions and flags the rest. Finally, watch your signs when entering b and c, as a sign error is the most common cause of a wrong answer.