Calculators & Converters

Quadratic Equation Solver

Enter three real coefficients to solve a quadratic equation in standard form. The solver reports the discriminant and distinguishes two real roots, a repeated root, a complex pair, and the linear or constant cases that occur when the leading coefficient is zero.

Free online tool

Loading tool…

Solve ax² + bx + c = 0

Enter real coefficients. An a value of zero is handled as a linear or constant equation. Roots are approximate to 12 significant digits.

Calculations run locally in your browser. This tool does not upload the numbers you enter.

GET STARTED

How to use the Quadratic Equation Solver

  1. 01

    Move every term to the left so the equation has the form ax² + bx + c = 0.

  2. 02

    Enter a, b, and c, including zero for a missing term. Use a minus sign for negative coefficients.

  3. 03

    Calculate and read the root classification. Copy or download the equation and its approximate roots.

Examples

Two real roots

With a = 1, b = −5, and c = 6, the discriminant is 1 and the roots are 2 and 3.

Complex conjugates

With a = 1, b = 2, and c = 5, the discriminant is −16. The roots are −1 + 2i and −1 − 2i.

Reading the discriminant

For nonzero a, the discriminant is b² − 4ac. A positive value gives two distinct real roots; zero gives a repeated real root; and a negative value gives a complex conjugate pair. In the complex result, i is the number satisfying i² = −1.

A more stable real-root calculation

For two distinct real roots, the solver computes the root whose numerator avoids subtraction of nearly equal values, then obtains the other from the product-of-roots identity c/a. Coefficients are scaled first. This reduces a common cancellation problem, but arithmetic and displayed values are still approximate.

When the equation is not quadratic

If a is zero and b is nonzero, the solver returns x = −c/b. If a and b are both zero, c = 0 makes every real number a solution; otherwise there is no solution. These cases are not forced into the quadratic formula.

What to know

  • Numerical roots use floating-point arithmetic and 12-significant-digit display; extreme coefficient ratios can exceed the supported range.

Common questions

Can I enter fractions such as 1/3?

Enter a decimal approximation such as 0.333333333333, or multiply the entire equation by a denominator first. Expression parsing is not provided.

Why can near-repeated roots be sensitive?

When b² and 4ac nearly match, a tiny coefficient change or rounding error can change the sign of the discriminant. The displayed classification follows the supplied floating-point values.

Does it show radicals?

No. The tool returns numerical roots, rounded for display to 12 significant digits, rather than symbolic radical simplifications.

What does a repeated root mean?

Both quadratic-formula branches have the same value. For example, x² − 4x + 4 = 0 has the repeated root x = 2.

Sources & references