Quadratic Equation Solver
Solve ax^2 + bx + c = 0. Shows discriminant, real or complex roots, vertex, and parabola graph.
Quadratic Equation Solver tool
Example
Input: x^2 - 5x + 6 = 0 (a = 1, b = -5, c = 6)
Result: x1 = 3, x2 = 2; discriminant 1; vertex (2.5, -0.25)
D = (-5)^2 - 4 x 1 x 6 = 1, so x = (5 +/- sqrt(1)) / 2, giving 3 and 2; the vertex is at x = 5 / 2 = 2.5.
How the Discriminant Shapes the Roots
| Equation | Discriminant | Roots | Vertex |
|---|---|---|---|
| x^2 - 5x + 6 = 0 | 1 | 3 and 2 | (2.5, -0.25) |
| 2x^2 + 3x - 2 = 0 | 25 | 0.5 and -2 | (-0.75, -3.125) |
| x^2 - 2 = 0 | 8 | 1.4142 and -1.4142 | (0, -2) |
| x^2 - 4x + 4 = 0 | 0 | 2 (repeated) | (2, 0) |
| x^2 + 2x + 5 = 0 | -16 | -1 +/- 2i | (-1, 4) |
| -x^2 + 2x + 3 = 0 | 16 | 3 and -1 | (1, 4) |
Results from this solver, rounded to 4 decimal places.
- Enter the coefficients a, b, and c for the equation ax^2 + bx + c = 0.
- View the discriminant value and what it tells you about the nature of the roots.
- See both roots displayed - real or complex, depending on the discriminant.
- Review the vertex coordinates and axis of symmetry for the parabola.
- Examine the parabola graph, which redraws as you edit the coefficients and marks the roots and vertex.
- Click the copy button to copy the roots or any other value.
Roots, Discriminant and Vertex of a Quadratic
A quadratic equation has the form ax^2 + bx + c = 0, and it has at most two solutions, called roots. Enter a, b and c, and this solver finds the roots with the quadratic formula. For x^2 - 5x + 6 = 0, the roots are 3 and 2. It also gives the discriminant, vertex, axis of symmetry and y-intercept, and draws the parabola.
The discriminant, b^2 - 4ac, tells you what kind of roots to expect. If it is positive, there are two real roots and the curve crosses the x-axis twice. If it is 0, there is one repeated root and the curve just touches the axis. If it is negative, the curve never meets the axis. The roots are then a complex pair, shown in the form p + qi and p - qi. The table on this page has one of each.
The graph of a quadratic is a parabola. When a is positive it opens upward and the vertex is the lowest point. When a is negative it opens downward and the vertex is the highest point. The vertex sits at x = -b / 2a, on the axis of symmetry. On the graph, roots are marked in one color and the vertex in another.
Quadratics describe anything that rises and falls in a curve. A ball thrown up at 20 m/s from 1.5 m follows h = -4.9t^2 + 20t + 1.5. The solver shows it lands after about 4.16 seconds, with its highest point at 21.91 m after 2.04 seconds.
The solver uses a form of the formula that avoids rounding errors when b is much larger than a and c. Results show up to four decimal places. If a is 0, the equation is not quadratic, and you get a message instead. To check a root, substitute it into the equation with the Math Expression Evaluator.
Formula / How It Works
Frequently Asked Questions
Related Tools
Triangle Calculator
Solve any triangle from 3 known values. Compute all sides, angles, area, perimeter, and draw diagrams.
Math and NumbersSquare Root and Nth Root Calculator
Calculate square roots, cube roots, and any nth root of a number with precision.
Math and Numbers