Davided.

Quadratic Equation Calculator

Solve any quadratic equation ax² + bx + c = 0 — discriminant, real or complex roots, vertex, axis of symmetry, canonical and factored form, plus an interactive parabola graph.

✓ Last reviewed: Sources: Wikipedia — Quadratic equation

Report a correction

Spotted a wrong result, label or typo? Tell us — we review every report.

Coefficient of the x² term. Must not be 0 — otherwise the equation isn't quadratic.

Coefficient of the x term.

The constant term.

Your result

Fill in the fields above to see your result.

Related calculators

Quadratic equation calculator: discriminant, roots, vertex, and parabola graph in one tool

This quadratic equation calculator — also called a quadratic formula calculator — solves any equation of the form ax² + bx + c = 0. Type in the three coefficients, a, b and c, and it instantly returns the discriminant, both roots (real or complex), the vertex of the parabola and its axis of symmetry, the sum and product of the roots, the vertex form and factored form of the equation, and an interactive graph of the parabola with the vertex and roots marked on it.

Most quadratic calculators online split this into separate tools: one for the discriminant, another for the roots, another for the vertex, another for the parabola graph. Here it’s one equation, one set of coefficients, one page — every piece of information you’d need for homework, a test, or a quick engineering check, worked out at once.

How to use the quadratic equation calculator

  1. Enter coefficient a — the number multiplying x². It can be any positive or negative number except zero.
  2. Enter coefficient b — the number multiplying x. Leave it at 0 if your equation has no linear term.
  3. Enter coefficient c — the constant term. Leave it at 0 if your equation has no constant.
  4. Read the results: the discriminant, the roots x₁ and x₂ (real, a repeated real root, or complex), the vertex coordinates, the sum and product of the roots, and the graph.

If you set a = 0, the calculator tells you so instead of guessing — ax² + bx + c = 0 stops being a quadratic equation the moment a is zero (more on that below).

How the calculator works

The discriminant (the “delta”)

The discriminant of a quadratic equation is Δ = b² − 4ac. Its sign alone tells you how many real solutions the equation has, before you calculate anything else:

Discriminant What it means
Δ > 0 two distinct real roots
Δ = 0 one real root, repeated (a double root)
Δ < 0 no real roots — two complex conjugate roots instead

For x² − 5x + 6 = 0 (a=1, b=−5, c=6): Δ = (−5)² − 4·1·6 = 25 − 24 = 1. Since Δ > 0, the equation has two distinct real roots.

Finding the roots with the quadratic formula

The quadratic formula gives the roots directly from the coefficients: x = (−b ± √Δ) / (2a). What happens next depends on the sign of Δ:

  • Δ > 0: x₁ = (−b − √Δ)/(2a) and x₂ = (−b + √Δ)/(2a) — two different real numbers. For x² − 5x + 6 = 0, √Δ = √1 = 1, so x₁ = (5 − 1)/2 = 2 and x₂ = (5 + 1)/2 = 3.
  • Δ = 0: a single formula, x = −b/(2a), with nothing to take the square root of. For x² − 4x + 4 = 0, Δ = 16 − 16 = 0, so x = 4/2 = 2 (a double root — the parabola just touches the x-axis at this one point, exactly at its vertex).
  • Δ < 0: there’s no real number whose square is negative, so the roots become complex roots (also called imaginary roots), written as a ± bi. The real part is −b/(2a); the imaginary part is √(−Δ)/(2a). For x² + 2x + 5 = 0, Δ = 4 − 20 = −16, so x = −1 ± i·√16/2 = −1 + 2i and −1 − 2i.

Internally, the calculator uses a numerically stable version of this formula for the Δ > 0 case (avoiding the precision loss that a naive implementation suffers when b² and 4ac are close in size), so the two roots stay accurate even for extreme coefficients.

The vertex of the parabola and the axis of symmetry

Every quadratic equation ax² + bx + c = 0 corresponds to a parabola y = ax² + bx + c, and every parabola has a single turning point: its vertex. The coordinates are xᵥ = −b/(2a) and yᵥ = c − b²/(4a). The vertical line x = xᵥ is the parabola’s axis of symmetry — the parabola is a mirror image of itself on either side of it.

For x² − 5x + 6 = 0: xᵥ = −(−5)/(2·1) = 2.5, yᵥ = 6 − 25/4 = −0.25. So the vertex sits at (2.5, −0.25), and the axis of symmetry is the line x = 2.5 — exactly halfway between the two roots, 2 and 3.

When a > 0, the parabola opens upward and the vertex is a minimum. When a < 0, it opens downward and the vertex is a maximum. Either way, the roots — when they exist — are always the same distance from the axis of symmetry, one on each side.

Vieta’s formulas: sum and product of the roots

Vieta’s formulas connect the roots directly to the coefficients, without solving the equation first: x₁ + x₂ = −b/a and x₁ · x₂ = c/a. They hold even when the roots are complex — the imaginary parts cancel out in the sum, and the product always comes out as a real number, so both quantities are useful checks on any answer.

For x² − 5x + 6 = 0: x₁ + x₂ = 2 + 3 = 5, and indeed −b/a = 5. x₁ · x₂ = 2 · 3 = 6, and indeed c/a = 6. For the complex-root example above, x² + 2x + 5 = 0: (−1+2i) + (−1−2i) = −2 = −b/a, and (−1+2i)(−1−2i) = 1 + 4 = 5 = c/a.

Vertex form and factored form

The vertex form of a quadratic equation rewrites it as y = a(x − h)² + k, where (h, k) is the vertex — a form that makes the maximum or minimum obvious at a glance. For x² − 5x + 6 = 0, the vertex form is y = 1·(x − 2.5)² − 0.25.

The factored form, y = a(x − x₁)(x − x₂), only exists when Δ ≥ 0, since it needs real roots to write down. For x² − 5x + 6 = 0, that’s y = (x − 2)(x − 3). At Δ = 0 it becomes a squared factor, like y = (x − 2)² for x² − 4x + 4 = 0; at Δ < 0 there’s no real factored form, so the calculator doesn’t show one.

What if a = 0?

By definition, a quadratic equation requires a ≠ 0 — that coefficient is what makes the x² term exist in the first place. If you set a to 0, the equation collapses to bx + c = 0, a straight line, not a parabola. The calculator flags this instead of returning a discriminant or roots, and if b isn’t zero either, it points you to the linear solution x = −c/b. For 3x − 6 = 0 (a=0, b=3, c=−6), that hint is x = −(−6)/3 = 2.

Step-by-step examples

Example 1: two distinct real roots — x² − 5x + 6 = 0

Here a=1, b=−5, c=6.

  1. Δ = (−5)² − 4·1·6 = 25 − 24 = 1. Since Δ > 0, expect two real roots.
  2. √Δ = 1, so x₁ = (5 − 1)/2 = 2 and x₂ = (5 + 1)/2 = 3.
  3. Vertex: xᵥ = 2.5, yᵥ = 6 − 6.25 = −0.25. Axis of symmetry: x = 2.5.
  4. Check with Vieta: sum = 2 + 3 = 5 = −b/a ✓; product = 2 · 3 = 6 = c/a ✓.
  5. Factored form: y = (x − 2)(x − 3). Vertex form: y = (x − 2.5)² − 0.25.

Example 2: a repeated (double) root — x² − 4x + 4 = 0

Here a=1, b=−4, c=4.

  1. Δ = (−4)² − 4·1·4 = 16 − 16 = 0 → a single, repeated real root.
  2. x = 4/2 = 2 (used for both x₁ and x₂).
  3. Vertex: xᵥ = 2, yᵥ = 4 − 4 = 0 — the vertex sits exactly on the x-axis, because the double root and the vertex are the same point here.
  4. Factored form: y = (x − 2)².

Example 3: complex (imaginary) roots — x² + 2x + 5 = 0

Here a=1, b=2, c=5.

  1. Δ = 2² − 4·1·5 = 4 − 20 = −16. Negative, so there are no real roots.
  2. Real part: −b/(2a) = −1. Imaginary part: √16/2 = 2. Roots: x = −1 + 2i and x = −1 − 2i.
  3. Vertex: xᵥ = −1, yᵥ = 5 − 1 = 4. Since a > 0 and the vertex sits above the x-axis (yᵥ = 4 > 0), the whole parabola stays above the x-axis — consistent with there being no real roots.
  4. No factored form exists over the real numbers; the graph still draws the full parabola, just without root markers.

Example 4: irrational roots — x² − 2 = 0

Here a=1, b=0, c=−2.

  1. Δ = 0 − 4·1·(−2) = 8. √8 = 2√2 ≈ 2.8284.
  2. x₁ = −√2 ≈ −1.4142, x₂ = √2 ≈ 1.4142 — neither root is a whole number, so the calculator shows the rounded decimal value.
  3. Vertex: xᵥ = 0, yᵥ = −2 — since b = 0, the vertex sits directly on the y-axis and the parabola is symmetric around it.

Frequently asked questions

How do you calculate the discriminant of a quadratic equation?

The discriminant is Δ = b² − 4ac, calculated directly from the three coefficients of ax² + bx + c = 0. For x² − 5x + 6 = 0 (a=1, b=−5, c=6), Δ = 25 − 24 = 1. Its sign — positive, zero, or negative — tells you immediately how many real solutions the equation has, without solving it first.

What does a negative discriminant mean?

A negative discriminant means the equation has no real solutions — the parabola never crosses the x-axis. Instead, the two solutions are complex conjugates of the form a ± bi. For x² + 2x + 5 = 0, Δ = −16, and the roots are −1 + 2i and −1 − 2i; graphically, the parabola stays entirely above (or below) the x-axis.

How many solutions does a quadratic equation have when the discriminant is zero?

When Δ = 0, the equation has exactly one real solution, counted as a repeated (double) root: x = −b/(2a). For x² − 4x + 4 = 0, Δ = 0 and x = 2. Geometrically, this is the single point where the parabola’s vertex just touches the x-axis instead of crossing it.

How do you find the vertex of a parabola?

The vertex of a parabola y = ax² + bx + c has coordinates xᵥ = −b/(2a) and yᵥ = c − b²/(4a). For x² − 5x + 6 = 0, that’s xᵥ = 2.5 and yᵥ = −0.25. If a > 0 the vertex is the parabola’s minimum point; if a < 0, it’s the maximum.

What is the vertex form of a quadratic equation?

The vertex form is y = a(x − h)² + k, where (h, k) are the vertex’s coordinates — the same numbers you get from xᵥ and yᵥ above. For x² − 5x + 6 = 0, the vertex form is y = (x − 2.5)² − 0.25, and it makes the minimum value of the function (−0.25, reached at x = 2.5) immediately visible.

How do you solve a quadratic equation without the quadratic formula, by factoring?

Factoring rewrites ax² + bx + c as a(x − x₁)(x − x₂), where x₁ and x₂ are the roots — setting either factor to zero gives a solution. For x² − 5x + 6 = 0, that’s (x − 2)(x − 3) = 0, so x = 2 or x = 3. Factoring only works this cleanly when the discriminant is zero or positive, since it needs real roots to begin with.

How do you check quadratic equation solutions using Vieta’s formulas?

Vieta’s formulas state that x₁ + x₂ = −b/a and x₁ · x₂ = c/a, letting you verify roots without redoing the whole calculation. For x² − 5x + 6 = 0 with roots 2 and 3: sum = 5 = −b/a, and product = 6 = c/a — both check out, confirming the roots are correct.

Can a, b, or c be negative or fractional?

Yes — a, b, and c can be any real numbers, positive, negative, or decimal, as long as a is not zero. Negative or fractional coefficients don’t change which formulas apply; for example, a < 0 simply flips the parabola to open downward, turning its vertex into a maximum instead of a minimum.

What happens if a = 0 — is it still a quadratic equation?

No — by definition, a quadratic equation requires a ≠ 0, since a = 0 removes the x² term entirely. The equation then becomes linear, bx + c = 0, with a single solution x = −c/b instead of a discriminant and two roots. For 3x − 6 = 0, that solution is x = 2.

Sources