Quadratic Formula Calculator: Real and Complex Roots

Quadratic formula

x = (−b ± √(b² − 4ac)) ÷ (2a)

Quadratic coefficient a · Linear coefficient b · Constant c

a = 1b = -3c = 2x² + (b/a)x = −c/a(x + b/(2a))² = (b² − 4ac)/(4a²)x = (−b ± √(b² − 4ac))/(2a)Δ = 1x1 ≈ 1x2 ≈ 2

Divide by the nonzero coefficient a and move the constant to the other side.

x = (−b ± √(b² − 4ac)) ÷ (2a)

Algebraic walkthrough of completing the square; the equations explain the formula while the worked example substitutes your coefficients.

Worked example you can change

x = (−b ± √(b² − 4ac)) ÷ (2a)

Editable worked example
a = , b = , c =
  1. x = (−(-3) ± √((-3)² − 4 × (1) × (2))) ÷ (2 × (1))
  2. Discriminant = 1; roots ≈ 1 and 2

Calculator

Enter complete decimal numbers; separate list values with commas or spaces. Decimal answers are shown to 15 significant digits; exact integer results retain all digits.

Calculator inputs
Discriminant
1
Two real roots
1; 2

Formula variants

Related formulas and when to use them
Shape or methodFormulaMeaning
Two real rootsb² − 4ac > 0The positive discriminant gives two different real roots.
Repeated rootb² − 4ac = 0; x = −b/(2a)The two solutions coincide, with multiplicity two.
Complex conjugatesb² − 4ac < 0The square root has an imaginary part; both roots have the same real part and opposite imaginary parts.

Questions

What is the quadratic formula?

For ax² + bx + c = 0 with a nonzero, x = (−b ± √(b² − 4ac))/(2a). The ± sign gives both roots.

What does the discriminant tell me?

A positive discriminant gives two real roots, zero gives a repeated root, and a negative discriminant gives complex conjugates.

Can a be zero?

No. That would make the equation linear rather than quadratic; enter a nonzero a.

Why can a tiny root still be shown?

The engine uses a stable equivalent of the quadratic formula to avoid cancellation and retains small nonzero roots in scientific notation.

Sources and method

Use the quadratic formula for ax² + bx + c = 0, with two real roots, a repeated root or complex conjugates. The coefficient a must be nonzero.

We calculate with 40 significant digits and round only the displayed result. Diagrams are labelled explanations and are not measurement drawings.

More Math formulas

Browse Math calculators

Updated