Quadratic Equation Calculator

Solve ax² + bx + c = 0 with the quadratic formula, discriminant, factorising and the vertex.

Quadratic Calculator Switch tool in More Calculators

Enter the coefficients of ax² + bx + c = 0 (decimals and fractions such as 3/4 are fine).

x² + x + = 0

How do you solve a quadratic equation?

Write it as ax² + bx + c = 0 and use the quadratic formula x = (−b ± √(b² − 4ac)) / (2a). The discriminant b² − 4ac tells you the kind of roots: positive gives two real roots, zero gives one repeated root, and negative gives two complex roots.

Checked by the All Math Solver team · Last reviewed · How we check our answers

How the Quadratic Equation Calculator Works

Quadratic formula \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\), discriminant and factorising

A quadratic equation has the form \(ax^2 + bx + c = 0\) with \(a \neq 0\). The calculator first works out the discriminant \(\Delta = b^2 - 4ac\): if \(\Delta > 0\) there are two real roots, if \(\Delta = 0\) there is one repeated root, and if \(\Delta < 0\) the roots are complex.

It then factorises the quadratic when it has rational roots, applies the quadratic formula, and gives exact answers with surds (for example \(\frac{3 \pm \sqrt{5}}{2}\)) as well as decimals. It also shows the sum and product of the roots and the vertex of the parabola.

How to use the quadratic equation calculator

  1. Write your equation in the form ax² + bx + c = 0 (move every term to one side first).
  2. Enter the numbers a, b and c. Use a minus sign for negative coefficients and 0 for a missing term; decimals and fractions such as 3/4 are fine.
  3. Press Calculate to see the discriminant, the factorised form (when it exists), the quadratic formula, exact and decimal roots, and the vertex.

Example: x² − 5x + 6 = 0 (a = 1, b = −5, c = 6) → Δ = 25 − 24 = 1, (x − 2)(x − 3) = 0, so x = 2 or x = 3

Worked examples

Two different real roots (Δ > 0)

Question: Solve x² − 5x + 6 = 0

  1. a = 1, b = −5, c = 6.
  2. Discriminant: Δ = b² − 4ac = 25 − 24 = 1. It is positive, so there are two different real roots.
  3. Quadratic formula: x = (5 ± √1) / 2 = (5 ± 1) / 2.
  4. Factorised form: (x − 2)(x − 3) = 0.

Answer: x = 3 or x = 2

One repeated root (Δ = 0)

Question: Solve x² − 6x + 9 = 0

  1. a = 1, b = −6, c = 9.
  2. Discriminant: Δ = 36 − 36 = 0, so the two roots are equal.
  3. x = −b / (2a) = 6 / 2 = 3.
  4. The left side is a perfect square: (x − 3)² = 0.

Answer: x = 3 (a repeated, or double, root)

Two complex roots (Δ < 0)

Question: Solve x² + 2x + 5 = 0

  1. a = 1, b = 2, c = 5.
  2. Discriminant: Δ = 4 − 20 = −16. It is negative, so there are no real roots.
  3. √(−16) = 4i, so x = (−2 ± 4i) / 2.

Answer: x = −1 + 2i or x = −1 − 2i

Irrational roots (surds)

Question: Solve 2x² + 3x − 1 = 0

  1. a = 2, b = 3, c = −1.
  2. Discriminant: Δ = 9 + 8 = 17, which is not a perfect square, so the roots are irrational.
  3. x = (−3 ± √17) / 4.

Answer: x = (−3 + √17)/4 ≈ 0.281 or x = (−3 − √17)/4 ≈ −1.781

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) / (2a). The expression b² − 4ac under the square root is called the discriminant.

What does the discriminant tell you?

If b² − 4ac is positive there are two different real roots, if it is zero there is one repeated real root, and if it is negative there are two complex roots (no real solutions).

Can it solve quadratics with complex or irrational roots?

Yes. Irrational roots are given exactly with surds, for example (3 ± √5)/2, plus decimals, and complex roots are written as a ± bi.

What if a = 0?

Then the equation is linear (bx + c = 0), not quadratic. The calculator tells you this and solves the linear equation instead.