Math

Quadratic Equation Solver

Solve ax² + bx + c = 0 with the quadratic formula. Enter the three coefficients to get the roots — real or complex — along with the discriminant, vertex and every step.

x
For ax² + bx + c = 0. Move every term to one side first; use negative numbers for subtraction.

Results

Solutions of x² − 3x + 2 = 0x₁ = 2, x₂ = 1Two distinct real roots
Discriminant Δ1
Vertex(1.5, -0.25)
Factored form
(x − 2)(x − 1)
Parabola opens
Upwards (minimum at the vertex)
Axis of symmetry
x = 1.5
y-intercept
(0, 2)
Sum / product of roots
3 / 2
  1. Identify the coefficients: a = 1, b = -3, c = 2.
  2. Discriminant: Δ = b² − 4ac = (-3)² − 4·(1)·(2) = 1.
  3. Δ > 0, so there are two real roots. √Δ = 1.
  4. Apply x = (−b ± √Δ) / 2a = (3 ± √1) / 2.
  5. Result: x₁ = 2, x₂ = 1

How it works

  1. Rearrange your equation into the form ax² + bx + c = 0.
  2. Enter a, b and c (a cannot be zero).
  3. Read the roots, then follow the steps to see how they were found.

Formula

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

The discriminant Δ decides the type of roots: Δ > 0 gives two real roots, Δ = 0 one repeated root, and Δ < 0 two complex conjugate roots.

Example

Solve 2x² + 3x − 5 = 0.

Inputs

a
2 x²
b
3 x
c
-5

Result

Solutions of 2x² + 3x − 5 = 0x₁ = 1, x₂ = -2.5Two distinct real roots
Discriminant Δ49
Vertex(-0.75, -6.125)
Load this example into the calculator →

Reading the graph of a quadratic

The graph of y = ax² + bx + c is a parabola. Its real roots are where it crosses the x-axis, and its vertex at x = −b ÷ 2a is the highest or lowest point. When a > 0 the parabola opens upwards; when a < 0 it opens downwards.

Frequently asked questions

What if a = 0?

Then the equation is linear (bx + c = 0), not quadratic, and has the single solution x = −c ÷ b when b ≠ 0.

What does a negative discriminant mean?

The parabola never crosses the x-axis, so there are no real roots. The two solutions are complex numbers of the form p ± qi.

Can I solve by factoring instead?

Yes, when the roots are rational. x² − 3x + 2 = (x − 1)(x − 2), giving x = 1 and x = 2. The quadratic formula works for every case, including irrational and complex roots.

How accurate are the results?

Results are computed in double-precision floating point and shown to six decimal places, using a numerically stable version of the formula.