Skip to content
YouNeed Tools
Free VPN

Quadratic Equation Solver

Enter a, b and c for ax² + bx + c = 0 to get the roots, exact and as decimals, with the discriminant, vertex and full working.

ax² + bx + c = 0

x = 2 or x = 3

Exact: x = 3 or x = 2

Discriminant (b² − 4ac)

1

Vertex

(2.5, −0.25)

Factored form

(x − 2)(x − 3)

Working

  1. Equation: x² − 5x + 6 = 0, so a = 1, b = −5, c = 6.
  2. Discriminant: b² − 4ac = (−5)² − 4 × 1 × 6 = 25 − 24 = 1.
  3. Quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a = (5 ± √1) ÷ 2.
  4. D > 0, so there are two real roots. √1 ≈ 1.
  5. x₁ = (5 + 1) ÷ 2 = 3; x₂ = (5 − 1) ÷ 2 = 2.

Worked out on your device.

Worked example

Solve 2x² − 4x − 6 = 0. Here a = 2, b = −4, c = −6. The discriminant is (−4)² − 4 × 2 × (−6) = 16 + 48 = 64, and √64 = 8. So x = (4 ± 8) ÷ 4, giving x = 3 or x = −1. Because the roots are whole numbers, the equation factors as 2(x + 1)(x − 3) = 0, and the vertex is at (1, -8).

Three kinds of answer

EquationDiscriminantRoots
2x² − 4x − 6 = 064 (positive)3 and −1
x² + 2x − 1 = 08 (positive, not a square)−1 ± √2
x² + 2x + 5 = 0-16 (negative)−1 ± 2i

Other ways to solve

  • Factoring: find two numbers that multiply to a × c and add to b. Quick when the roots are whole numbers, as in x² − 5x + 6 = (x − 2)(x − 3).
  • Completing the square: rewrite ax² + bx + c as a(x + b/2a)² + (c − b²/4a). This is where the quadratic formula comes from, and it gives the vertex directly.
  • Graphing: the roots are where the parabola crosses the x-axis. Useful for checking, less precise.

The formula always works, which is why exams expect you to know it. When b is large and 4ac small, one root can lose precision on a calculator because two nearly equal numbers are subtracted; working with the exact surd avoids that.

Checking your answer

Put each root back into the equation: for x = 3, 2(9) − 4(3) − 6 = 18 − 12 − 6 = 0. A second check is Vieta’s formulas: the roots add up to −b/a (here 3 + (−1) = 2 = 4 ÷ 2) and multiply to c/a (3 × (−1) = −3 = −6 ÷ 2).

Related tools

Sources

Checked on November 26, 2026:

Frequently asked questions

What is the quadratic formula?
For ax² + bx + c = 0 with a ≠ 0, x = (−b ± √(b² − 4ac)) ÷ 2a. The ± gives the two roots: one with a plus and one with a minus.
What does the discriminant tell me?
The discriminant is b² − 4ac. If it is positive there are two different real roots; if it is zero there is one repeated root (the parabola just touches the x-axis); if it is negative there are no real roots, only two complex ones.
Can it give exact answers?
Yes, when a, b and c are whole numbers. It simplifies the square root (√40 = 2√10) and cancels common factors, so you get answers like (−1 ± √2) or 2 ± 3i as well as decimals.
What if a = 0?
Then the equation is linear, bx + c = 0, with the single answer x = −c ÷ b. The solver says so and solves it.
How do I enter x² − 9 = 0?
Use a = 1, b = 0 and c = −9. Any term that is missing has a coefficient of 0.
What is the vertex?
The turning point of the parabola y = ax² + bx + c, at x = −b ÷ 2a. It is the lowest point when a is positive and the highest when a is negative.

Last updated: 2026-11-26