Quadratic Solver

Solves ax² + bx + c = 0 for any coefficients, showing the discriminant, the roots including complex ones, and the working. It also gives the vertex, which is what you usually want when the quadratic is modelling something real.

Live demo · real result from this tool
Rootsx = 5 or x = -2
Discriminant (b² − 4ac)
49
Nature
Two distinct real roots
Vertex
(1.5, -12.25) — minimum
Axis of symmetry
x = 1.5
y-intercept
-10
Sum of roots (−b/a)
3
Product of roots (c/a)
-10

Working

x = (−b ± √(b² − 4ac)) / 2ab² − 4ac = (-3)² − 4(1)(-10) = 49x = (3 ± √49) / 2x = 5 or x = -2 Decimal values:x₁ = 5x₂ = -2

Processed on your device — nothing is uploaded.

How to use Quadratic Solver

  1. Enter the coefficients a, b and c — a cannot be zero, or the equation is linear.
  2. Read the discriminant to see what kind of roots to expect.
  3. Read the roots and the vertex, with the working shown.
  4. If a is 0 the equation is linear, not quadratic, and has a single root at −c/b.
  5. Complex roots are returned as a conjugate pair when the discriminant is negative.
  6. The sum of the roots is −b/a and their product is c/a — a quick way to check an answer.

The discriminant tells you the shape of the answer

b² − 4ac decides everything before you compute a root. Positive means two distinct real roots, so the parabola crosses the x-axis twice. Zero means one repeated root, where the curve touches the axis at its vertex. Negative means no real roots — the parabola misses the axis entirely and the solutions are a complex conjugate pair. Checking the discriminant first tells you what kind of answer to expect and catches an arithmetic slip before you finish.

Completing the square, and where the formula comes from

The quadratic formula is not arbitrary: it is what you get by completing the square on the general form. Divide through by a, move c across, add (b/2a)² to both sides to make a perfect square, and take the root. That derivation is worth doing once, because it explains the ±, explains why the vertex sits at x = −b/2a, and makes the formula something you can reconstruct rather than something you have to remember.

The vertex is usually the interesting answer

Roots tell you where a quantity is zero. In most word problems — projectile height, profit against price, area against a fixed perimeter — the question is really about the maximum or minimum, which is the vertex at x = −b/2a. If a is positive the parabola opens upward and the vertex is a minimum; if negative it opens downward and the vertex is a maximum. Many students find the roots correctly and then answer the wrong question.

Where the formula loses precision

When b² is much larger than 4ac, one root involves subtracting two nearly equal numbers, and floating-point arithmetic loses significant digits doing it — catastrophic cancellation. Numerical libraries avoid it by computing the well-conditioned root with the formula and the other as c/(a·x₁), using the relationship that the product of the roots is c/a. It rarely matters for homework and matters a great deal in simulation code.

Frequently asked questions

What is the quadratic formula?
x = (−b ± √(b²−4ac)) / 2a, which gives both roots of ax² + bx + c = 0.
What does the discriminant tell me?
b²−4ac indicates the root type: positive gives two real roots, zero gives one repeated root, negative gives two complex roots.
Can it return complex roots?
Yes — when the discriminant is negative the solver reports the complex-conjugate root pair.
What does it mean if the discriminant is negative?
The parabola never crosses the x-axis, so there are no real solutions — the roots are a complex conjugate pair, a ± bi. If the problem is modelling something physical, a negative discriminant usually means the situation described cannot happen: the projectile never reaches that height, the profit never hits that target.
How do I find the vertex of a parabola?
x = −b/2a, then substitute that back to get y. It sits exactly halfway between the roots when they are real, which is worth remembering as a check. It is the maximum if a is negative and the minimum if a is positive.
Can I solve a quadratic without the formula?
Often, and faster. Factoring works when the roots are rational — try it first for tidy coefficients. Completing the square always works and is where the formula comes from. The formula is the fallback that never fails, which is why it is worth memorising even though it is rarely the quickest route.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close