Quadratic Equation Solver

Enter the three numbers a, b and c of the equation ax² + bx + c = 0. You get the roots, the discriminant, the vertex, the factored form when the roots are rational, a graph and each step of the working.

Free Runs in your browser Checked Tuesday, November 10, 2026

The number multiplied by x². It cannot be 0, because then the equation is not quadratic.

The number multiplied by x. Use a minus sign for a negative number.

The number with no x in it.

Result

Roots (values of x) — Where the graph crosses the x axis, or touches it at one point.
Discriminant D = b² − 4ac — Positive: two real roots. Zero: one double root. Negative: complex roots.
Vertex (turning point) — The lowest or highest point of the parabola, as (x, y).
Factored form — Shown when the roots are rational.

Graph of y = ax² + bx + c

How it is worked out

This tool runs in your browser. What you enter is not sent to us.

How to use it

  1. Type the number in front of x² into Number a. It cannot be 0.
  2. Type the number in front of x into Number b, and the constant into Number c. Use a minus sign for negative numbers.
  3. Read Roots (values of x) and the Discriminant. The result updates as you type.
  4. Check Vertex, Factored form and the graph, and go through How it is worked out to see each step.

The quadratic formula and the discriminant

A quadratic equation has the form ax² + bx + c = 0, where a is not 0. Its roots are given by the quadratic formula. The number under the square root, D = b² − 4ac, is the discriminant, and it decides what kind of roots there are.

x = (−b ± √D) ÷ 2a
D = b² − 4ac
  • D greater than 0: two different real roots.
  • D equal to 0: one real root, −b ÷ 2a, which counts as a double root.
  • D less than 0: two complex roots a ± bi, where i is the square root of −1.

Exact roots and decimal approximations

When D is a perfect square the roots are simple fractions. Otherwise the square root is written exactly: for x² − 8x + 4 = 0, D = 48 = 4² × 3, so the roots are 4 − 2√3 ≈ 0.5359 and 4 + 2√3 ≈ 7.4641.

The decimal values use the stable form of the formula, q = −(b + sgn(b)√D) ÷ 2, with x₁ = q ÷ a and x₂ = c ÷ q. With the textbook form, one root loses most of its digits when −b and √D have opposite signs and nearly the same size. The stable form avoids that loss.

What this calculator does not cover

  • Equations where a is 0, which are linear, and equations of degree three or more.
  • Square factors above 10,000 in D are not removed, so such a root may not be fully simplified.
  • Equations with a variable other than x, or with more than three numbers.

Worked example: x² − 5x + 6 = 0

With a = 1, b = −5 and c = 6, the discriminant is D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1. D is positive and a perfect square, so both roots are rational: x = (5 ± 1) ÷ 2, which gives 3 and 2.

The vertex is at x = 5/2, and the parabola's lowest point is (2.5, −0.25). The factored form is (x − 2)(x − 3), so the graph crosses the x axis at 2 and 3.

Result
Roots x₁ = 2 and x₂ = 3
Discriminant 1
Vertex (2.5, −0.25)
Factored form (x − 2)(x − 3)

Frequently asked questions

What is the discriminant?

The discriminant D = b² − 4ac is the part of the quadratic formula under the square root. If D is positive there are two real roots, if it is zero there is one double root, and if it is negative the roots are complex.

Why do I see roots like 4 − 2√3?

Some roots are neither whole numbers nor simple fractions. The exact form 4 − 2√3 is shown first, followed by its decimal value, 0.5359, so you can use either.

What does the vertex mean?

The vertex is the lowest point of a parabola that opens upwards (a greater than 0) and the highest point of one that opens downwards (a less than 0). Its x value is −b ÷ 2a.

Can a be zero?

No. If a is 0 the x² term disappears and the equation is linear, with the single root −c ÷ b. A quadratic equation needs a number for a that is not zero.

Does it work with decimal numbers?

Yes. Decimal numbers are read exactly, so an equation such as 0.5x² + x + 0.125 = 0 is solved without rounding its numbers first.

Are the numbers I enter sent to a server?

No. The equation is solved in your browser, and nothing you enter is sent to us.

Sources

Figures and text last checked on Tuesday, November 10, 2026.

We use necessary cookies to run the site. With your consent, Google also uses advertising cookies to show personalised ads. If you reject them, you still see ads, but they are not personalised.