Skip to content

Quadratic Equation Solver

Enter a, b and c from ax² + bx + c = 0 and get the roots exactly — as fractions, in simplest radical form, or as complex numbers — with their decimal values, the discriminant, the vertex, the factored form when there is one, and a graph. The solution is worked twice: by the quadratic formula and by completing the square.

2x² − 3x − 5 = 0

A whole number, decimal or fraction such as 3/4.

Results

−1, 5/2

Roots

-1, 2.5

As decimals

49

Discriminant b² − 4ac

Two rational roots

Type of roots

(3/4, −49/8)

Vertex

x = 3/4

Axis of symmetry

The parabola opens upward (a > 0).

Factored form: (x + 1)(2x − 5)

Check: x₁ + x₂ = −b/a = 3/2 and x₁ × x₂ = c/a = −5/2.

Graph

Graph of y = 2x² − 3x − 5, with its vertex and any x-intercepts marked-2-101234-505101520xy(-1, 0)(2.5, 0)(0.75, -6.125)

Solving with the quadratic formula

  1. Identify the coefficients: a = 2, b = −3, c = −5.
  2. Discriminant: Δ = b² − 4ac = (−3)² − 4 × 2 × (−5) = 9 − (−40) = 49.
  3. Δ is positive and a perfect square (7²), so there are two rational roots.
  4. Quadratic formula: x = (−b ± √Δ) / (2a) = (3 ± √49) / 4.
  5. So x = (3 + 7) / 4 = 5/2 and x = (3 − 7) / 4 = −1.

Solving by completing the square

  1. Divide every term by a = 2: x² − (3/2)x − 5/2 = 0.
  2. Move the constant term to the right: x² − (3/2)x = 5/2.
  3. Add (b/2a)² = (−3/4)² = 9/16 to both sides: x² − (3/2)x + 9/16 = 49/16.
  4. The left side is now a perfect square: (x − 3/4)² = 49/16.
  5. Take the square root of both sides: x − 3/4 = ±7/4.
  6. Solve for x: x = 3/4 ± 7/4, so x = 5/2 or x = −1.

How to Use the Quadratic Equation Solver

  1. 1. Rearrange to standard form. Move every term to one side so the equation reads ax² + bx + c = 0. For 2x² = 3x + 5, that is 2x² − 3x − 5 = 0.
  2. 2. Enter a, b and c. Use 0 for a missing term and a minus sign for a negative one. Decimals (0.5) and fractions (3/4) are kept exact.
  3. 3. Read the roots. The exact roots come first, then their decimal values. Below them are the discriminant, the vertex, the axis of symmetry and the factored form.
  4. 4. Check the graph and the steps. The parabola is drawn with its vertex and x-intercepts marked, and both methods are written out with your numbers.

The Quadratic Formula and the Discriminant

Quadratic formula

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

The expression under the root, Δ = b² − 4ac, is the discriminant. Before you finish the arithmetic it already tells you what kind of answer to expect, because the roots are (−b ± √Δ) / (2a):

DiscriminantRootsGraph
Positive perfect squareTwo different rational roots; the quadratic factors over the integersCrosses the x-axis twice
Positive, not a perfect squareTwo different irrational roots, in radical formCrosses the x-axis twice
ZeroOne repeated real root, x = −b / (2a)Touches the x-axis at its vertex
NegativeTwo complex conjugate roots, p ± qiNever meets the x-axis

The perfect-square test applies once the coefficients are whole numbers; the solver multiplies decimals and fractions out first.

Worked Example: 2x² − 3x − 5 = 0

  1. Here a = 2, b = −3 and c = −5.
  2. Δ = (−3)² − 4 × 2 × (−5) = 9 − (−40) = 49. That is a perfect square (7²), so the roots are rational.
  3. x = (3 ± √49) / 4 = (3 ± 7) / 4.
  4. x = (3 + 7) / 4 = 5/2 and x = (3 − 7) / 4 = −1.
  5. Check with Vieta's formulas: the roots should add to −b/a = 3/2 and multiply to c/a = −5/2. Indeed 5/2 + (−1) = 3/2 and 5/2 × (−1) = −5/2.

Because the roots are rational, the quadratic factors: 2x² − 3x − 5 = (x + 1)(2x − 5). The vertex sits halfway between the roots at x = −b/(2a) = 3/4, where y = c − b²/(4a) = −49/8, so the vertex is (3/4, −49/8), or (0.75, −6.125). The parabola opens upward because a is positive.

Completing the Square

Completing the square is the method the quadratic formula comes from, and it is the way to reach vertex form. Divide by a, move the constant across, then add the square of half the x-coefficient to both sides so the left side becomes a perfect square. For the same equation:

x² − (3/2)x − 5/2 = 0
x² − (3/2)x = 5/2
x² − (3/2)x + 9/16 = 5/2 + 9/16 = 49/16
(x − 3/4)² = 49/16
x − 3/4 = ±7/4
x = 3/4 ± 7/4, so x = 5/2 or x = −1

When the roots are irrational the same steps end in a radical: x² − 2x − 1 = 0 gives (x − 1)² = 2, so x = 1 ± √2 ≈ 2.4142 or −0.4142. When the right side turns out negative, its square root is imaginary: x² + 2x + 5 = 0 gives (x + 1)² = −4, so x = −1 ± 2i.

Common Mistakes

  • Losing the sign of b. The formula starts with −b, so when b = −3 the numerator starts with +3.
  • Dividing only part of the numerator by 2a. The whole expression −b ± √Δ sits over 2a.
  • Dropping the ±. It is what produces the second root; without it you find only one.
  • Leaving the equation unrearranged. a, b and c are only read correctly once one side is zero.
  • Rounding the square root early. Keep √17 exact until the end; the decimals are for the final answer only.

Frequently Asked Questions

What does the discriminant tell you?
Its sign gives the number of real roots: two if b² − 4ac is positive, one if it is zero, none if it is negative (the roots are then complex). With whole-number coefficients, a discriminant that is a perfect square also means the roots are rational and the quadratic can be factored.
Can a quadratic equation have only one solution?
Yes, when the discriminant is zero. The two roots coincide, the parabola just touches the x-axis at its vertex, and the quadratic is a perfect square: x² − 4x + 4 = (x − 2)², with the single root x = 2.
What are complex roots?
When b² − 4ac is negative there is no real square root, so the roots use i, the imaginary unit with i² = −1. They always come in conjugate pairs of the form p + qi and p − qi; for x² + 2x + 5 = 0 they are −1 + 2i and −1 − 2i.
How do I know if a quadratic can be factored?
Make the coefficients whole numbers and compute b² − 4ac. If it is a perfect square — 0, 1, 4, 9, 16, 25, … — the quadratic factors over the integers; otherwise its roots are irrational or complex and it does not. The solver shows the factored form whenever one exists.
What is the vertex form of a quadratic?
Vertex form is y = a(x − h)² + k, where (h, k) is the vertex. Completing the square produces it, with h = −b/(2a) and k = c − b²/(4a). For 2x² − 3x − 5 it is 2(x − 3/4)² − 49/8.
What if a is 0?
Then there is no x² term and the equation is linear, bx + c = 0, with the single solution x = −c/b. The solver recognizes this and solves the linear equation instead.

Related Tools

More in Math Calculators

See all Math Calculators