Quadratic Equation Calculator

Solve quadratic equations of the form ax² + bx + c = 0 with the quadratic formula. Enter a, b and c to find the solutions.

Discriminant
1.00
Two real solutions
x₁
2
x₂
1
Embed on your website →

How to use the quadratic equation calculator

  1. Enter the coefficients a, b and c from the equation ax² + bx + c = 0.
  2. The calculator automatically works out the discriminant and the solutions as you type.
  3. Read the explanation below to understand what the discriminant tells you.

How the quadratic equation is solved

Every quadratic equation of the form ax² + bx + c = 0 can be solved with the quadratic formula:

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

Worked example: for x² − 3x + 2 = 0 we have a = 1, b = −3 and c = 2. The discriminant is (−3)² − 4 × 1 × 2 = 1, and since it is positive there are two real solutions: x = (3 ± 1) ÷ 2, giving x₁ = 2 and x₂ = 1. The sign of the discriminant decides everything: positive gives two solutions, zero gives one, and negative gives no real solutions at all.

The expression under the square root, b² − 4ac, is called the discriminant and determines how many real solutions the equation has:

  • Positive discriminant — the equation has two real solutions.
  • Discriminant equal to zero — the equation has one solution (a double root).
  • Negative discriminant — the equation has no real solutions (the solutions are complex numbers).
Note: a cannot be 0 — that would remove the x² term, and the equation would no longer be a quadratic equation.

The connection to the parabola

Graphically, y = ax² + bx + c is a parabola, and the solutions of ax² + bx + c = 0 are precisely the points where that parabola crosses the x-axis. This matches what the discriminant tells you: a positive discriminant means the parabola crosses the axis in two places, zero means it just touches the axis at a single point — the vertex — and a negative discriminant means the whole parabola lies above or below the axis without crossing it at all.

The vertex itself sits at x = −b ÷ (2a), exactly midway between the two roots when two real solutions exist. Substituting that x value back into the equation gives the y coordinate, which is the minimum value of the function when a is positive and the maximum when a is negative.

Frequently asked questions

What does the discriminant tell me?

The discriminant (b² − 4ac) tells you how many real solutions the equation has: positive gives two solutions, zero gives one (a double root), and negative gives no real solutions.

What happens if a is 0?

Then the equation is no longer a quadratic equation, since the x² term disappears. The calculator shows an error message in this case — use a regular linear equation instead.

Are there solutions when the discriminant is negative?

Not real solutions. The equation then has two complex solutions, involving the square root of a negative number (imaginary numbers). This calculator only shows real solutions.

Embed this calculator on your website

Copy the code below to show this calculator directly on your blog or website — completely free.