Quadratic Calculator

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

Use this tool

Result

The result appears in this panel after you run the tool.

About this tool

The discriminant is b² − 4ac. Two real roots, one real root, or no real root follow from its sign. The roots use the quadratic formula.

A zero leading coefficient is rejected so the page does not silently become the linear solver.

How to use it

  1. Enter a, b, and c.
  2. Calculate.
  3. Read the discriminant and the roots. a equal to zero is rejected.

Limitations

Real roots from the discriminant

a, b, c, and the branch

The equation is a x² + b x + c = 0. The discriminant is b² − 4 a c. If that quantity is positive, there are two real roots, (−b + √Δ) / (2 a) and (−b − √Δ) / (2 a). If it is exactly zero, there is one real root, −b / (2 a). If it is negative, the page reports the discriminant and states that there is no real root. Complex roots are not invented.

One, negative five, and six

For a = 1, b = −5, and c = 6, the discriminant is 25 − 24 = 1. The roots are (5 + 1) / 2 = 3 and (5 − 1) / 2 = 2. The panel names both roots and states that the discriminant is 1. Those are the solutions of x² − 5x + 6 = 0, which factors as (x − 2)(x − 3). A zero discriminant, for example a = 1, b = −2, c = 1, prints the single root 1.

a cannot vanish, and negatives stay real-only

If a is 0 the equation is no longer quadratic, and the page refuses it rather than quietly switching to a linear solver. Use the linear-equation page for a x + b = c. A negative discriminant is a completed result, not an error banner: a = 1, b = 0, c = 1 yields discriminant −4 and the sentence that there is no real root. Coefficients may be decimals. They are parsed as finite decimals, with commas stripped. The printed roots use at most ten fractional digits, so a repeating expansion is rounded in the display even though the discriminant test itself uses the raw floating-point value. Exact equality to zero is the floating-point comparison, which is reliable for these small integers and less so for noisy decimals that merely look like a perfect square.

Privacy

Your input is processed in your browser and is not uploaded to UtilChain. File names, text, and results are not sent to analytics.