CALCULATE ALL — every calculation, from tomorrow

Math • Finance • Health • Conversion • Education — 100% free, no sign-up

Math

Quadratic Equation Solver

Solve ax² + bx + c = 0 and see the roots and discriminant.

Solve any quadratic equation ax² + bx + c = 0 by entering the coefficients a, b, and c. The solver shows both roots (or the double root), plus the discriminant so you can see at a glance whether the roots are real.

Introduction

A quadratic equation has the form ax^2 + bx + c = 0, where a is not zero. Its solutions — the x values that make the equation true — are the points where the parabola y = ax^2 + bx + c crosses the x-axis. The quadratic formula, x = (-b +/- sqrt(b^2 - 4ac)) / 2a, always finds them. The part under the square root, b^2 - 4ac, is called the discriminant, and it tells you in advance what to expect: a positive discriminant means two distinct real solutions (the parabola crosses twice), zero means one repeated solution (it just touches the axis), and a negative discriminant means no real solutions (it never reaches the axis — the solutions are complex numbers). Quadratics model anything with acceleration or area: projectile motion, profit maximization, and the shape of satellite dishes.

Before reaching for the formula, check whether the equation factors — x^2 - 5x + 6 = (x - 2)(x - 3) is faster by hand, and factoring builds number sense. Completing the square is the third method and the one that actually derives the formula. The formula itself is the fallback that never fails, including when the roots are fractions or irrational numbers that no factoring attempt would find. The common errors are sign slips on -b (if b is -5, then -b is +5), forgetting to divide the entire numerator by 2a rather than just the square-root term, and miscalculating the discriminant — so write each step out in full.

How it's calculated

Roots come from the quadratic formula x = (−b ± √(b²−4ac)) / 2a. The discriminant b²−4ac tells the story: positive means two real roots, zero means one double root, negative means no real roots.

Worked examples

x^2 - 5x + 6 = 0

Here a = 1, b = -5, c = 6. Discriminant: b^2 - 4ac = 25 - 24 = 1 — positive, so two real solutions. Apply the formula: x = (5 +/- sqrt(1)) / 2 = (5 +/- 1) / 2, giving x = 6/2 = 3 and x = 4/2 = 2. Verify by substitution: 3^2 - 5(3) + 6 = 9 - 15 + 6 = 0, and 2^2 - 5(2) + 6 = 4 - 10 + 6 = 0. Both work. Factoring check: (x - 2)(x - 3) expands to x^2 - 5x + 6 — consistent.

x^2 + 4x + 4 = 0

Here a = 1, b = 4, c = 4. Discriminant: 16 - 16 = 0, so exactly one repeated solution. x = -4 / 2 = -2. Verify: (-2)^2 + 4(-2) + 4 = 4 - 8 + 4 = 0. The parabola y = x^2 + 4x + 4 just touches the x-axis at x = -2 — it never crosses. This is (x + 2)^2 = 0 in disguise, a perfect square trinomial, which is always the case when the discriminant is zero.

Frequently asked questions

How do I solve x² − 5x + 6 = 0?

Enter a=1, b=−5, c=6. The roots are x = 2 and x = 3, because (x−2)(x−3) expands to x² − 5x + 6.

What does the discriminant tell me?

The discriminant b²−4ac predicts the roots before you compute them: if it's positive there are two real roots, if zero there's one repeated root, and if negative there are no real roots.

What if a is zero?

Then it's not quadratic — it's the linear equation bx + c = 0, and the solver gives the single root x = −c/b.

Is the Quadratic Equation Solver free to use?

Yes. The Quadratic Equation Solver on CalculateAll is completely free — no sign-up, no usage limits and nothing to install. The calculation runs entirely in your browser, so the numbers you enter never leave your device.

Does the Quadratic Equation Solver work on mobile phones?

Yes. The Quadratic Equation Solver is fully responsive and works on phones, tablets and computers. Open the page, enter your values, and the result updates instantly — no app download needed.

A projectile problem, solved with the three inputs

A ball is thrown upward from a platform 15 metres above the ground. Ignoring air resistance, its height after t seconds is h(t) = −5t² + 20t + 15 metres. To find when it lands, set h(t) = 0 and enter a = −5, b = 20, c = 15 above. The discriminant is b² − 4ac = 400 − 4(−5)(15) = 400 + 300 = 700, and √700 ≈ 26.46. The formula gives t = (−20 ± 26.46) / −10, so the two roots are t ≈ −0.65 seconds and t ≈ 4.65 seconds. Both are correct algebra, but only one is a real event: the negative root describes where the parabola would have crossed ground level before the throw happened, so you discard it. The ball lands about 4.65 seconds after release. The same three coefficients also locate the peak without extra work: the vertex sits at t = −b / 2a = 2 seconds, where h(2) = −20 + 40 + 15 = 35 metres.

Checking roots with the sum and product

Every pair of roots obeys two shortcuts, often called Vieta's relations: the roots add to −b/a and multiply to c/a. Try a = 2, b = 3, c = −2 in the solver. The discriminant is 9 + 16 = 25, √25 = 5, and the roots are (−3 − 5) / 4 = −2 and (−3 + 5) / 4 = 0.5. Now check: −2 + 0.5 = −1.5, which equals −b/a = −3/2, and −2 × 0.5 = −1, which equals c/a = −2/2. If your hand calculation of a root fails either check, the error is in the arithmetic, not the method — a ten-second test that catches most sign slips before they cost marks. The vertex of this parabola is at x = −0.75, where y = −3.125, so the curve dips below the axis between its two crossings, exactly as two real roots require.

Edge cases in this solver's logic

Enter a = 1, b = 2, c = 5 and the discriminant is 4 − 20 = −16. This solver reports "No real roots" and stops there: it works in real numbers only, even though the equation does have complex solutions, −1 + 2i and −1 − 2i. If a physics or engineering problem expects complex roots, treat the solver's message as "no real crossing" rather than "no solution." At the other boundary, setting a = 0 quietly changes the problem — the solver falls back to the linear root x = −c/b, so a = 0, b = 4, c = −8 returns x = 2, the answer to 4x − 8 = 0, not to any quadratic. If a and b are both 0 there is nothing left to solve and the solver says so. Finally, roots are displayed rounded to four decimal places, so a root shown as 4.6458 is the exact value 4.645751… trimmed — fine for homework answers, but substitute the unrounded value if you chain the result into a further calculation.

Related calculators

References