Skip to content
MoneyDeck

Quadratic Equation Solver

Solve ax² + bx + c = 0 for real or complex roots, with vertex and graph

Updated · Free, no signup

Solutions

x = 3 or x = 2

Root 1 (x₁)

3

Root 2 (x₂)

2

Type of roots

Two distinct real roots

Discriminant (b² − 4ac)

1

Vertex

(2.5, -0.25)

Axis of symmetry

x = 2.5

y-intercept

6

Factored form

(x − 3)(x − 2)
  • x² − 5x + 6 = 0: the parabola opens upward, so the vertex is a minimum at y = -0.25.
  • The discriminant is a perfect square, so the roots are rational and the quadratic factors over the integers or fractions.

Graph of y = ax² + bx + c

About the Quadratic Equation Solver

This quadratic equation solver finds the solutions of any equation of the form ax² + bx + c = 0 using the quadratic formula. Enter the three coefficients and it returns both roots — real or complex — along with the discriminant that tells you which case you are in, the vertex of the parabola, the axis of symmetry, the y-intercept and the factored form when the roots are real.

It is designed for algebra and pre-calculus students checking homework, teachers preparing examples, and anyone who needs to solve a quadratic that shows up in physics (projectile motion), geometry (areas) or finance (break-even points). The graph shows where the parabola crosses the x-axis, which is exactly where the roots are.

If a = 0 the equation is linear rather than quadratic, and the solver returns the single solution x = −c ÷ b instead. Coefficients can be negative or decimal.

How to use the quadratic equation solver

  1. 1Rearrange your equation so it reads ax² + bx + c = 0.
  2. 2Enter a, b and c, including any negative signs.
  3. 3Read the roots and check the discriminant to see whether they are real or complex.
  4. 4Use the vertex, axis of symmetry and graph to sketch the parabola.

Formula and method

x = (−b ± √(b² − 4ac)) ÷ 2a; Δ = b² − 4ac; vertex = (−b/2a, c − b²/4a)

The quadratic formula comes from completing the square on ax² + bx + c = 0. The discriminant Δ = b² − 4ac decides the kind of roots: Δ > 0 gives two different real roots, Δ = 0 gives one repeated root (the parabola just touches the x-axis), and Δ < 0 gives two complex conjugate roots of the form p ± qi.

To avoid rounding error when b² is much larger than 4ac, the solver computes q = −½(b + sign(b)·√Δ) and takes the roots q/a and c/q, which is mathematically identical to the textbook formula but more accurate. The vertex lies on the axis of symmetry x = −b/2a, halfway between the roots.

a, b, c
Coefficients of x², x and the constant (a ≠ 0)
Δ
Discriminant, b² − 4ac
x₁, x₂
The two roots (solutions)
i
Imaginary unit, √−1

Worked examples

x² − 5x + 6 = 0

Δ = (−5)² − 4·1·6 = 25 − 24 = 1, so there are two real roots: x = (5 ± 1) ÷ 2, giving 3 and 2. The vertex sits halfway between them at x = 2.5, where y = −0.25.

2x² + 4x + 5 = 0 (complex roots)

Δ = 16 − 40 = −24 is negative, so the roots are complex: x = (−4 ± √24·i) ÷ 4 = −1 ± 1.2247i. The parabola stays entirely above the x-axis.

Projectile: −4.9t² + 20t + 1.5 = 0

A ball thrown upward at 20 m/s from 1.5 m lands when its height is 0. Δ = 400 + 29.4 = 429.4, and the positive root t ≈ 4.16 s is when it hits the ground; the negative root has no physical meaning here.

x² − 6x + 9 = 0 (repeated root)

Δ = 36 − 36 = 0, so the parabola just touches the x-axis at its vertex, x = 3. The expression is the perfect square (x − 3)².

Frequently asked questions

What is the quadratic formula?+

For ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ 2a. The ± gives the two roots, and the expression under the square root is called the discriminant.

What does the discriminant tell you?+

If b² − 4ac is positive there are two distinct real roots, if it is zero there is exactly one repeated real root, and if it is negative there are two complex roots and the graph never crosses the x-axis.

How do I find the vertex of a parabola?+

The x-coordinate is −b ÷ 2a; substitute it back into the equation to get the y-coordinate. For x² − 5x + 6 the vertex is at x = 2.5, y = −0.25.

Can a quadratic equation have no solution?+

It always has two solutions counted with multiplicity in the complex numbers, but it has no real solution when the discriminant is negative. On a graph that means the parabola sits entirely above or below the x-axis.

When should I factor instead of using the formula?+

Factoring is quicker when the roots are small whole numbers or simple fractions (the discriminant is a perfect square). The quadratic formula always works, including for irrational and complex roots.

Related tools