Quadratic Formula Calculator
Enter coefficients for ax² + bx + c = 0 to inspect the discriminant, real or complex roots, and vertex. With a = 0 the equation becomes linear rather than quadratic.
The quadratic formula
- For ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) ÷ 2a.
- Discriminant b² − 4ac > 0: two real roots; = 0: one double root; < 0: two complex roots.
- Vertex x = −b ÷ 2a.
- a cannot be 0 (then it is a linear equation).
How to use the Quadratic Formula Calculator
- Enter the coefficients a, b and c from ax² + bx + c = 0.
- The discriminant is calculated as b² − 4ac.
- A positive discriminant produces two distinct real roots.
- A zero discriminant produces one repeated real root.
- A negative discriminant produces a complex-conjugate pair. The calculator also finds the vertex coordinates.
Checking roots without solving again
For ax² + bx + c = 0, the two roots always add up to −b/a and multiply to c/a (Vieta's formulas). That gives a quick check: for 2x² + 3x − 2 = 0 the roots 0.5 and −2 add to −1.5 = −3/2 and multiply to −1 = −2/2.
Special cases are faster by hand. If c = 0, factor out x: 3x² − 6x = 0 gives x = 0 or x = 2. If b = 0, solve x² = −c/a directly. When the discriminant b² − 4ac is negative, the roots are a complex pair a ± bi with the same sum and product rules.
Root types and numeric limits
Positive discriminant gives two real roots; zero gives a repeated root; negative gives a complex conjugate pair. Results use floating-point arithmetic and can lose precision for extreme or nearly cancelling coefficients. When a and b are both zero, there is no unique solution.
Examples
x² − 3x + 2 = 0
With a = 1, b = −3 and c = 2, the discriminant is 1 and the roots are x = 1 and x = 2.
x² + 2x + 1 = 0
The discriminant is zero, so the equation has one repeated real root at x = −1.
x² + 1 = 0
The discriminant is −4, so there are no real roots. The complex roots are i and −i.
Ball thrown upward
Height h = −4.9t² + 20t + 1.5 metres. Setting h = 0 and taking the positive root gives t ≈ 4.16 seconds until the ball lands. The negative root has no physical meaning here.
Rectangle with a known area
A rectangle is 3 cm longer than it is wide and has an area of 40 cm². x(x + 3) = 40 gives x² + 3x − 40 = 0, with roots 5 and −8. The width is 5 cm and the length 8 cm.
Check the result in context
Substitution check: x² − 3x + 2 = 0 has discriminant 1 and roots 1 and 2. At either root the expression is 0; vertex is (1.5, −0.25).
Solved examples
| Equation | Discriminant | Roots |
|---|---|---|
| x² − 5x + 6 = 0 | 1 | 3 and 2 |
| x² + 2x + 1 = 0 | 0 | −1 (double root) |
| 2x² − 4x − 6 = 0 | 64 | 3 and −1 |
| x² − 2 = 0 | 8 | 1.4142 and −1.4142 |
| x² + 1 = 0 | −4 | ±i |
| x² + 4x + 13 = 0 | −36 | −2 ± 3i |
More solved equations with Vieta's check
| Equation | Discriminant | Roots | Sum (−b/a) | Product (c/a) |
|---|---|---|---|---|
| 2x² + 3x − 2 = 0 | 25 | 0.5 and −2 | −3/2 | −1 |
| x² − 4x + 4 = 0 | 0 | 2 (double root) | 4 | 4 |
| 3x² − 6x = 0 | 36 | 2 and 0 | 2 | 0 |
| x² + x + 1 = 0 | −3 | −0.5 ± 0.8660i | −1 | 1 |
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0 with a not equal to zero, the roots are found from negative b plus or minus the square root of b² − 4ac, all divided by 2a.
What is the discriminant?
The discriminant is b² − 4ac. Its sign determines whether a quadratic has two real roots, one repeated real root or two complex roots.
What happens if a equals zero?
The equation is no longer quadratic. When b is nonzero, it becomes a linear equation and can be solved as x = −c/b.
Can this calculator show complex roots?
Yes. When the discriminant is negative, the calculator displays the real and imaginary parts of both complex roots.
How is the vertex of a quadratic found?
The vertex x-coordinate is −b divided by 2a. Substituting that x-value into ax² + bx + c gives the vertex y-coordinate.
How can I check quadratic roots quickly?
Add them and multiply them. The sum should equal −b/a and the product c/a. If either check fails, recheck the signs of a, b and c.
What if b is zero?
The equation becomes ax² + c = 0, so x² = −c/a. If −c/a is positive there are two roots ±√(−c/a); if it's negative the roots are imaginary.
Does a negative discriminant mean no solution?
It means no real roots, but there are two complex roots when a is nonzero. For x² + 1 = 0 they are +i and −i.
More math tools
Graphing Calculator
Graph functions, trace points, view tables and analyze equations.
Open tool →Scientific Calculator
Advanced calculator for trig, logs, roots, powers, factorials and more.
Open tool →Slope Calculator
Calculate slope from two points plus line equation, angle, grade and point distance.
Open tool →Factor Calculator
Find factors, factor pairs and prime factorization for a whole number.
Open tool →Exponent Calculator
Calculate powers using positive, negative or decimal exponents.
Open tool →Significant Figures Calculator
Count significant figures and round numbers to a selected number of significant digits.
Open tool →