Quadratic Equation Solver

A quadratic equation has the form ax² + bx + c = 0. The quadratic formula gives its roots, and the discriminant tells you whether they are real or complex.

calculated
calculated
calculated
Type in any field to change it. Press × on a value to calculate that field instead.

How to use the quadratic equation solver

Enter the coefficients a, b and c of ax² + bx + c = 0. The discriminant and both roots appear instantly. Click Show steps to see the formula with your numbers.

If the discriminant is negative, the roots are complex and the calculator shows a warning — there is no real x that solves the equation.

The quadratic formula

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

Worked example

2x² − 7x + 3 = 0, so a = 2, b = −7, c = 3.

  • Discriminant = (−7)² − 4 × 2 × 3 = 49 − 24 = 25
  • x₁ = (7 + 5) ÷ 4 = 3
  • x₂ = (7 − 5) ÷ 4 = 0.5

Check: 2(3)² − 7(3) + 3 = 18 − 21 + 3 = 0 ✓

Discriminant cases

Discriminant Roots
Positive Two different real roots
Zero One repeated real root
Negative Two complex roots (no real solution)

Other ways to solve a quadratic

Method Best when
Factoring Roots are whole numbers or simple fractions
Completing the square Deriving the vertex form or the formula itself
Quadratic formula Always works
Graphing Seeing roughly where the roots are

Example by factoring: 2x² − 7x + 3 = (2x − 1)(x − 3), so x = 0.5 or x = 3 — the same as the calculator.

Vertex of the parabola

The turning point of y = ax² + bx + c is at:

x = −b ÷ (2a),   y = c − b² ÷ (4a)

For 2x² − 7x + 3, the vertex is at x = 1.75, y = −3.125. The parabola opens upward when a > 0 and downward when a < 0.

Real-world quadratics

  • Projectile motion: height h = −4.9t² + vt + h₀ (metres, seconds). Set h = 0 to find when it lands.
  • Area problems: a rectangle with perimeter 20 and area 21 gives x² − 10x + 21 = 0, so the sides are 3 and 7.
  • Profit: revenue minus cost often forms a quadratic; the vertex gives the maximum profit.

Complex roots

When the discriminant is negative, the roots are complex: x = −b ÷ 2a ± i√(−D) ÷ 2a. For x² + 2x + 5 = 0, the roots are −1 ± 2i.

Sum and product of roots

For any quadratic, x₁ + x₂ = −b ÷ a and x₁ × x₂ = c ÷ a. In the example: 3 + 0.5 = 3.5 = 7/2 and 3 × 0.5 = 1.5 = 3/2.

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ 2a. It gives both solutions of ax² + bx + c = 0.

What does the discriminant tell me?

If it is positive there are two real roots; if zero, one repeated root; if negative, no real roots (the roots are complex).

What if a = 0?

Then it is not quadratic — it is the linear equation bx + c = 0, with the single solution x = −c ÷ b.

How do I find the roots of x² − 5x + 6 = 0?

a = 1, b = −5, c = 6. The discriminant is 1, so x = (5 ± 1) ÷ 2, giving 3 and 2.

What is the vertex form of a quadratic?

y = a(x − h)² + k, where (h, k) is the vertex. It comes from completing the square.

Embed this calculator

Free to use on your website or blog. Copy this code: