Quadratic Equation Solver
Solve any quadratic equation and see the roots, discriminant, and vertex.
What Is the Quadratic Equation Solver?
A quadratic equation is any equation you can write as ax squared plus bx plus c equals zero, where a is not zero. The quadratic formula solves any such equation for x, and this calculator applies it, then reports everything else you normally need alongside it: the discriminant, both roots, their sum and product, and the vertex of the parabola. The discriminant is the part students most often skip, and it is the part that tells you what kind of answer you are going to get before you calculate it. A positive discriminant gives two real roots, a zero discriminant gives one repeated root where the parabola touches the axis, and a negative discriminant gives no real roots at all, which is a real result rather than a failed calculation. The calculator handles all three cases and shows the substitution at each step so the answer can be checked by hand.
Key Statistics
-
Discriminant b² − 4ac
The single expression that decides whether a quadratic has two roots, one root, or no real roots. Every classification question about a quadratic reduces to the sign of this one number, which is why it appears at the centre of the quadratic formula.
Source: Standard algebra, as presented in the quadratic formula
-
c / a
The product of the two roots, whatever they turn out to be. This is one of Vieta's formulas and it gives you a fast way to sanity check a solver's output without recomputing anything.
Source: Vieta's formulas
The Formula
For ax² + bx + c = 0, the roots are x = (−b ± √(b² − 4ac)) / 2a. The discriminant is b² − 4ac. The sum of the roots is −b / a. The product of the roots is c / a. The vertex sits at x = −b / 2a, and its y value is found by substituting that x back into the equation.
Worked Examples
Solve x² − 3x + 2 = 0. The discriminant is 9 − 8, which is 1, so there are two real roots. Applying the formula gives x = (3 ± 1) / 2, which is 2 and 1. As a check, the roots sum to 3, matching −b / a, and multiply to 2, matching c / a.
Two real roots from a clean factorisation
- Take a = 1, b = -3, c = 2.
- Compute the discriminant: (-3)² − 4(1)(2) = 9 − 8 = 1.
- The discriminant is positive, so expect two distinct real roots.
- Substitute into the formula: x = (3 ± √1) / 2.
- √1 is 1, so x = (3 + 1) / 2 = 2 and x = (3 − 1) / 2 = 1.
Roots: x = 2 and x = 1
One repeated root when the discriminant is zero
- Take a = 1, b = -4, c = 4.
- Compute the discriminant: (-4)² − 4(1)(4) = 16 − 16 = 0.
- A zero discriminant means the parabola touches the x axis at exactly one point.
- Substitute: x = (4 ± √0) / 2 = 4 / 2 = 2.
One repeated root: x = 2, multiplicity two
No real roots, and why that is a valid answer
- Take a = 1, b = 0, c = 1, giving x² + 1 = 0.
- Compute the discriminant: 0² − 4(1)(1) = −4.
- A negative discriminant means no real solutions exist.
- In the complex numbers the roots are 0 + 1i and 0 − 1i, which are conjugates.
No real roots, complex roots are i and −i
Real World Use Cases
Algebra and school mathematics
Solving quadratics is one of the most commonly assessed topics at GCSE, A level and in first year university courses. Working through several examples builds fluency with the substitution and catches sign errors early.
Physics projectile problems
The height of a thrown ball over time is a quadratic, and finding when it lands means solving for t. The same applies to the stopping distance of a braking vehicle and to many oscillating systems in mechanics.
Engineering and structural design
Load capacity curves, resonance conditions and many control systems are quadratic. Solving them tells you the operating points where the design behaves as intended and the ones where it does not.
Business and finance break-even points
Revenue and cost curves are linear and quadratic respectively, so their intersection, the break-even volume, is found by setting the difference to zero and solving the resulting quadratic.
Expert Tips
- ✓ Compute the discriminant before the roots. It tells you in one step whether you are looking for two roots, one root, or a complex pair, and it is far cheaper than working through a formula that returns NaN.
- ✓ Always check that a is not zero before using the formula. With a = 0 the equation is linear, and dividing by a would give a meaningless answer.
- ✓ Verify with Vieta's formulas rather than substituting back. The roots should sum to −b / a and multiply to c / a, which catches sign and arithmetic slips in seconds.
- ✓ Keep the negative sign on b in view while substituting. Writing −(−3) instead of −3 is the single most common source of an error here.
- ✓ Factorise first when the coefficients are integers. If the roots are whole numbers you can find them faster by factorising than by running the formula.
Frequently Asked Questions
What is the quadratic formula? ▼
For ax² + bx + c = 0, the quadratic formula is x = (−b ± √(b² − 4ac)) / 2a. It gives every root of the equation and works for any values of a, b and c provided a is not zero.
How do I know how many roots a quadratic has? ▼
Look at the discriminant b² − 4ac. Positive means two distinct real roots, zero means one repeated real root, and negative means no real roots. Computing the discriminant first is the fastest way to know what to expect.
What does it mean when the discriminant is negative? ▼
The quadratic has no real solutions. The parabola never crosses the x axis. This is a valid mathematical answer rather than a failure. Over the complex numbers there are still two roots, and they are always a conjugate pair of the form p + qi and p − qi.
What if a is zero? ▼
With a = 0 the equation becomes bx + c = 0, which is linear rather than quadratic. It has the single solution x = −c / b. The quadratic formula divides by a, so it cannot be used in this case, and this calculator switches to the linear solution automatically.
What are Vieta's formulas? ▼
For ax² + bx + c = 0 with roots x1 and x2, Vieta's formulas state that x1 + x2 = −b / a and x1 × x2 = c / a. They are a fast way to check a solver's output without substituting the roots back into the full equation.
How do I find the vertex of a quadratic? ▼
The x coordinate of the vertex is −b / 2a. Substitute that value back into ax² + bx + c to get the y coordinate. The calculator returns both, and the x value is also the axis of symmetry.
Why are my answers different from the back of the book? ▼
The most common cause is a sign error when moving terms across the equals sign, which turns a positive c into a negative one. The second is dropping the negative in front of b. Compare your discriminant with the book's, since that usually identifies which of the two went wrong.
Can I use the quadratic formula if the roots are not whole numbers? ▼
Yes. The formula handles any real coefficients and returns whatever the roots happen to be, including fractions and decimals. If the discriminant is not a perfect square you will see decimals or a square root left in the answer, which is expected.
What is a repeated root? ▼
When the discriminant is exactly zero, both roots are the same number. Graphically the parabola touches the x axis and turns back, so the single solution has a multiplicity of two. For x² − 4x + 4 = 0 the repeated root is x = 2.
When should I factorise instead of using the formula? ▼
When the coefficients are integers and the roots are likely to be whole numbers or simple fractions. Factorising x² − 7x + 10 into (x − 5)(x − 2) is faster than substituting into the formula, and it confirms the answer at the same time. The formula is the fallback when factoring does not work cleanly.
Common Mistakes to Avoid
- ⚠ Using the equation ax² + bx = c, where c is already negative, and then treating it as c = 0. Put every term on one side first.
- ⚠ Forgetting the negative sign in front of b, so a positive b is substituted as if it were negative.
- ⚠ Dropping the denominator of 2a entirely, which gives an answer off by a factor of 2a.
- ⚠ Expecting the quadratic formula to work when a = 0. The formula is undefined there and the equation is linear.
- ⚠ Reading a negative discriminant as a calculation error. It is a valid answer meaning there are no real solutions.
Related Tools & Comparisons
Last updated: · by CalculatorPro Tools