Home / Math

Solving quadratic equations

Every quadratic equation of the form ax² + bx + c = 0 can be solved by the same formula, and the discriminant inside it tells you in advance what kind of answer to expect: two real roots, one repeated root, or a complex conjugate pair. This solver reports all three cases, complex roots included.

How to use the Quadratic Equation Solver

  1. Enter Coefficient a — it cannot be zero, or the equation is linear.
  2. Enter Coefficient b.
  3. Enter Coefficient c.
  4. Read both roots; complex results are shown in a + bi form.

Formula and a worked example

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

The discriminant is b² − 4ac. Positive means two distinct real roots and the parabola crosses the x-axis twice; zero means one repeated root and it just touches; negative means no real roots and the parabola misses the axis entirely.

Worked example

For x² − 5x + 6 = 0 the discriminant is 25 − 24 = 1, so the roots are (5 ± 1) ÷ 2 — that is x = 3 and x = 2. For x² + x + 1 = 0 the discriminant is −3, giving the complex pair −0.5 ± 0.866i.

Frequently asked questions

What does the discriminant tell me?

b² − 4ac. Positive gives two real roots, zero gives one repeated root, negative gives two complex roots.

What if a is zero?

Then it is not a quadratic. bx + c = 0 solves directly as x = −c ÷ b.

Can I factor instead of using the formula?

Often yes, and it is faster when the roots are whole numbers. The formula always works, factoring does not.

What are complex roots used for?

They appear throughout electrical engineering, signal processing and control theory — anywhere oscillation is modelled.

Related calculators

Other tools people use alongside the quadratic equation solver.

Browse all 50 calculators