Skip to content
Toolcroft

Quadratic Equation Solver

Math Calculators

Use this browser-based solver to find real or complex roots of ax² + bx + c = 0. View the discriminant, vertex, and solution steps.

1x² + -3x + 2 = 0

Solution

Two real roots
x₁
2
x₂
1
Discriminant (b²−4ac)
1
Vertex x (h)
1.5
Vertex y (k)
-0.25
Show step-by-step solution

ax² + bx + c = 0

1x² + -3x + 2 = 0

Discriminant = b² − 4ac = -3² − 4 × 1 × 2 = 1

√discriminant = 1

x = (−-3 ± 1) / (2 × 1)

Stable evaluation: q = −½(b + sign(b)√discriminant); x₁ = q/a and x₂ = c/q

x₁ = 2

x₂ = 1

Vertex: (1.5, -0.25)

Parabola: 1x² + -3x + 2

Loading chart…
Quadratic parabola
xf(x) = 1x² + -3x + 2
-3.500024.7500
-2.388914.8735
-1.27787.4660
-0.16672.5278
0.94440.0586
2.05560.0586
3.16672.5278
4.27787.4660
5.388914.8735
6.500024.7500

How to use this tool

  1. Enter coefficients. Type the values of a, b, and c for your equation ax² + bx + c = 0. Decimals and negative numbers are accepted.
  2. View roots. The two roots (real or complex) are displayed instantly, along with the discriminant and vertex of the parabola.
  3. Check your work. The step-by-step solution shows how the quadratic formula was applied so you can verify each step.

The quadratic formula

For any equation of the form ax² + bx + c = 0, the solutions are:

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

For two distinct real roots, the calculator evaluates an equivalent, more numerically stable form: q = −½(b + sign(b)√(b² − 4ac)), followed by x₁ = q/a and x₂ = c/q. This avoids loss of precision when the usual formula subtracts two nearly equal numbers, such as when one root is very small and the other is very large. For a repeated root, it uses the direct value −b/(2a).

Interpreting the discriminant

Discriminant (b²−4ac)Root type
Positive (> 0)Two distinct real roots
Zero (= 0)One repeated real root (tangent to x-axis)
Negative (< 0)Two complex conjugate roots (no real x-intercepts)

The vertex of the parabola

The vertex (h, k) is the turning point of the parabola y = ax² + bx + c:

h = −b / 2a      k = c − b² / 4a

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.

Completing the square

The quadratic formula is derived by completing the square on ax² + bx + c = 0:

  1. Divide through by a: x² + (b/a)x + c/a = 0
  2. Move the constant: x² + (b/a)x = −c/a
  3. Add (b/2a)² to both sides: (x + b/2a)² = (b² − 4ac) / 4a²
  4. Take the square root and solve for x to get the quadratic formula.

Understanding this derivation helps students connect the formula to the structure of the parabola.

Worked examples

EquationDiscriminantRoots
x² − 5x + 6 = 025 − 24 = 1 > 0x = 2, x = 3 (two real roots)
x² − 4x + 4 = 016 − 16 = 0x = 2 (repeated root)
x² + x + 1 = 01 − 4 = −3 < 0x = (−1 ± i√3) / 2 (complex pair)

Graphing connection

Every part of ax² + bx + c corresponds to a geometric property of the parabola:

  • The roots (solutions) are the x-intercepts — where the parabola crosses the x-axis.
  • The vertex formula (h = −b/2a) gives the turning point and axis of symmetry.
  • The sign of a determines orientation: a > 0 opens upward (minimum); a < 0 opens downward (maximum).

Frequently asked questions

What is the quadratic formula?

The quadratic formula solves ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) / 2a. Enter your a, b, and c values above to get the roots instantly.

How does the solver avoid rounding error for very different-sized roots?

For real roots, the displayed result is algebraically equivalent to the quadratic formula, but the calculator first computes q = −½(b + sign(b)√(b² − 4ac)) and then uses q/a and c/q. This avoids subtracting nearly equal floating-point values when one root is much smaller than the other. A repeated root uses −b/(2a) directly.

What is the discriminant?

The discriminant is b² − 4ac. If it is positive, the equation has two distinct real roots. If zero, one repeated real root. If negative, two complex conjugate roots.

What happens when a = 0?

If a = 0 the equation is linear (bx + c = 0), not quadratic. This solver requires a ≠ 0.

What are complex roots?

When the discriminant is negative, the square root of a negative number produces an imaginary component. The roots are a pair of complex conjugates: α + βi and α − βi.

Browse all math calculators