Quadratic Equation Solver

Solve ax²+bx+c=0.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a, b and c to get both roots. x² − 3x + 2 = 0 has Δ = 1 and roots 2 and 1. A negative discriminant gives complex roots.

How to use

1
Step 1
Enter a (not zero), b and c.
2
Step 2
Press Calculate.
3
Step 3
Read the discriminant and the roots.

How it works

The discriminant Δ = b² − 4ac decides the type: positive gives two real roots, zero gives one repeated root, negative gives a complex pair. The roots are (−b ± √Δ) ÷ 2a.

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

Worked example

Complex roots

Input
a = 2, b = 4, c = 5
Output
−1 + 1.22474i, −1 − 1.22474i
Walkthrough
Δ = 16 − 40 = −24. √24 = 4.89898, divided by 2a = 4 gives 1.22474. The real part is −4 ÷ 4 = −1.

Limitations

  • a cannot be 0; that is a linear equation, so use the linear solver.
  • Roots are shown to six significant digits.

Questions

What are the roots of x² − 3x + 2?
2 and 1, with discriminant 1.
What are the roots of 3x² − 5x − 2?
2 and −0.333333.
What are the roots of x² − 6x + 9?
x = 3, a repeated root, since the discriminant is 0.
What are the roots of 2x² + 4x + 5?
−1 + 1.22474i and −1 − 1.22474i.

Features

  • Shows the discriminant
  • Complex roots
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • The essence of calculus

    3Blue1Brown

    Visual calculus story that complements symbolic solvers.

    Watch on YouTube
  • Essence of linear algebra preview

    3Blue1Brown

    Big-picture linear algebra for matrix-related calculators.

    Watch on YouTube