Algebra

Quadratic Formula Calculator — Solve for x

Enter the coefficients a, b, and c of any quadratic equation to instantly find both roots, the discriminant, vertex, and axis of symmetry.

📝 Enter Coefficients (ax²+bx+c=0)

📊 Result

Enter a, b and c to solve the equation
⚠️

Disclaimer: This tool performs standard mathematical calculations for educational and reference purposes. Always double-check results independently for graded coursework, exams, or safety-critical applications.

The Quadratic Formula

Any equation of the form ax² + bx + c = 0 (where a ≠ 0) can be solved with the quadratic formula: x = (−b ± √(b²−4ac)) / 2a. The value under the square root, b²−4ac, is called the discriminant, and its sign tells you what kind of roots the equation has before you even finish solving.

Reading the Discriminant

Worked Example

Solve x² − 5x + 6 = 0 (a=1, b=−5, c=6).

  1. Step 1: Discriminant = (−5)² − 4(1)(6) = 25 − 24 = 1
  2. Step 2: Since discriminant > 0, there are two real roots
  3. Step 3: x = (5 ± √1) / 2 = (5 ± 1) / 2, giving x = 3 and x = 2

A Second Worked Example: Negative Discriminant

Now solve 2x² + 4x + 5 = 0, where a = 2, b = 4 and c = 5.

  1. Discriminant: 4² − 4(2)(5) = 16 − 40 = −24
  2. Vertex: x = −4 / (2 × 2) = −1, and y = 2(−1)² + 4(−1) + 5 = 3
  3. Meaning: the discriminant is negative, so the roots are complex. The parabola opens upward (a is positive) and its lowest point is (−1, 3), which sits above the x-axis, so it can never reach y = 0.

Notice how the vertex alone confirms the answer. A parabola that opens upward with a lowest point above zero cannot have real roots.

Common Mistakes

Where You Would Use This

A quick way to check any answer: substitute each root back into the original equation. For x² − 5x + 6 = 0, putting in x = 2 gives 4 − 10 + 6 = 0, and x = 3 gives 9 − 15 + 6 = 0. Another useful test is that the two roots add up to −b/a (here 5) and multiply to c/a (here 6). If either test fails, re-check the signs you entered for a, b and c, since a sign slip is the most frequent source of wrong answers.

Frequently Asked Questions

The equation is no longer quadratic (it becomes linear, bx+c=0), so this calculator requires a non-zero value for a. If you need to solve a linear equation, isolate x directly: x = −c/b.
Complex roots appear when the discriminant is negative, meaning the parabola never crosses the x-axis. They're written in the form p ± qi, where i is the imaginary unit (√−1). These are valid mathematical solutions, just not real-number x-intercepts.
The roots are where the parabola crosses the x-axis (y=0). The vertex is the parabola's highest or lowest point, always located at x = −b/2a — it exists regardless of whether the parabola crosses the x-axis at all.

Learn more