All calculators

Education

Quadratic Formula Calculator

Enter the coefficients a, b, and c for a quadratic equation in the form ax² + bx + c = 0. We compute the discriminant, identify the root type, and return both roots with a step-by-step breakdown that shows the formula applied to your numbers.

Coefficients

Enter a, b, and c for the equation ax² + bx + c = 0.

Must be nonzero. · e.g. 1

e.g. -5

e.g. 6

Step by step

  1. 1. Identify a, b, and c. a = 1, b = -5, c = 6.
  2. 2. Calculate the discriminant. D = -5² − 4·1·6 = 25 − 24 = 1.
  3. 3. Plug into the formula. x = (−(-5) ± √1) / 2·1
  4. 4. Simplify. x₁ = 3 and x₂ = 2.
Two real roots

Roots

3, 2

Two distinct real roots from D = 1

Equationx² − 5x + 6 = 0
Discriminant (b² − 4ac)1
x₁3
x₂2

The discriminant D = b² − 4ac determines the root type. Positive D gives two real roots, zero gives a repeated root, negative gives a complex conjugate pair.

Was this helpful?

Examples

x² − 5x + 6 = 0

Two real roots · x = 2, 3

x² + 2x + 1 = 0

Repeated root · x = −1

x² + 2x + 5 = 0

Complex roots · x = −1 ± 2i

2x² − 4x − 6 = 0

Two real roots · x = −1, 3

How it works

For any equation in the standard form ax² + bx + c = 0 with a ≠ 0, the two roots come from the quadratic formula:

Roots · x = (−b ± √(b² − 4ac)) / 2a

Discriminant · D = b² − 4ac

The discriminant tells you what kind of roots to expect:

  • D > 0 two distinct real roots
  • D = 0 one repeated real root (double root)
  • D < 0 two complex roots in a conjugate pair
Read the guide: Quadratic Formula explains what each part of the formula means, how the discriminant works, and walks through three examples (two real, one repeated, two complex).

Frequently asked questions

The quadratic formula solves any equation in the form ax² + bx + c = 0. The two roots are x = (−b ± √(b² − 4ac)) / 2a. The expression under the square root, b² − 4ac, is called the discriminant; it tells you whether the roots are real and distinct, real and repeated, or complex.

Identify the three coefficients a, b, and c from your equation. Compute the discriminant b² − 4ac. If it is positive, take its square root and use the formula to find two real roots. If it is zero, the formula gives one repeated root. If it is negative, the roots are a complex conjugate pair.

The discriminant (D = b² − 4ac) describes how many real roots the equation has. D > 0 means two distinct real roots, D = 0 means one repeated real root, and D < 0 means no real roots (the two roots are complex conjugates).

The square root of a negative number is not a real number, so the two roots are complex. They come in a conjugate pair: one is real_part + imaginary_part·i and the other is real_part − imaginary_part·i. The real part is −b / 2a and the imaginary part is √(−D) / 2a.

Yes, but only when the discriminant is exactly zero. In that case, the formula collapses to a single value, x = −b / 2a, which is sometimes called a repeated or double root because it counts twice in the algebra.

If a = 0, the x² term disappears and the equation becomes bx + c = 0, which is linear, not quadratic. The quadratic formula divides by 2a, so a = 0 would also mean dividing by zero. The calculator flags this case and asks you to enter a nonzero a.

Yes. The inputs accept decimals, fractions written as decimals, and negative numbers. Very large or unusual values are handled gracefully; the calculator rounds the displayed roots for readability while computing internally at full floating-point precision.