Quadratic Formula Calculator: Roots, Discriminant, Vertex (With Steps)
Solve ax² + bx + c = 0 with the quadratic formula, showing the discriminant, the roots, the vertex and the factored form.
Inputs
- Formula
- x = (−b ± √(b² − 4ac)) ÷ 2a = (−5 ± √21) ÷ 2 = (−5 ± 4.5826) ÷ 2
- Discriminant
- b² − 4ac = 5² − 4 × 1 × 1 = 25 − 4 = 21
- Vertex
- (−2.5, −5.25) — x = −b ÷ 2a = −2.5
- Opens
- Upward (a > 0), so the vertex is a minimum
- y-intercept
- (0, 1)
- Sum and product of roots
- −5 (= −b ÷ a) and 1 (= c ÷ a)
Use this calculator on your own site
Free embed
- Two lines of HTML, unlimited views
- Shows a small CalculateEveryday bar, with a credit link under the calculator
What each Quadratic Formula input means
- a (x²)
- The coefficient of x². It cannot be 0 — that would make a straight line. Its sign decides whether the parabola opens upward (a > 0) or downward (a < 0).
- b (x)
- The coefficient of x, with its sign: in x² − 5x + 6, b is −5. With no x term, b is 0.
- c (constant)
- The constant term, also with its sign; it is where the curve crosses the y-axis. Move everything to one side first: x² = 5x − 6 becomes x² − 5x + 6 = 0.
Quadratic Formula formula
x = (−b ± √(b² − 4ac)) ÷ 2a · discriminant = b² − 4ac · vertex at x = −b ÷ 2a
Any quadratic equation ax² + bx + c = 0 (with a not zero) is solved by the quadratic formula. The part under the square root, b² − 4ac, is the discriminant, and OpenStax College Algebra uses it to sort the cases: positive and a perfect square, two rational roots; positive otherwise, two irrational roots; zero, one double root; negative, two complex roots. The page substitutes your a, b and c into the formula step by step, gives the roots, the vertex of the parabola (x = −b ÷ 2a), whether it opens up or down, its y-intercept, and the factored form when the roots are whole numbers.
Quadratic Formula worked example
OpenStax's Example 9, x² + 5x + 1 = 0: the discriminant is 5² − 4 × 1 × 1 = 21, which is positive but not a perfect square, so there are two irrational roots: x = (−5 ± √21) ÷ 2, about −0.2087 and −4.7913. The parabola opens upward with its lowest point at (−2.5, −5.25).
More Quadratic Formula examples
2x² − 4x − 6 = 0: the discriminant is (−4)² − 4 × 2 × (−6) = 16 + 48 = 64, a perfect square, so the roots are rational. (4 ± 8) ÷ 4 gives x = 3 or x = −1, and the factored form keeps the leading 2: 2(x − 3)(x + 1).
x² + 2x + 5 = 0 has discriminant 4 − 20 = −16, so the headline reads Complex (no real roots): the parabola's lowest point, (−1, 4), sits above the x-axis. The complex roots are (−2 ± 4i) ÷ 2 = −1 ± 2i.
A ball thrown straight up at 20 m/s from a height of 1.5 m is at h = −4.9t² + 20t + 1.5 metres after t seconds (−4.9 is half of g = 9.8 m/s²). It lands when h = 0: x = −0.0737 or x = 4.1553. Only the positive root is a time after the throw, so it lands after about 4.16 seconds; the vertex says it peaks at 21.91 m after 2.04 s.
Where the Quadratic Formula calculator can give the wrong answer
- If a = 0 the equation is linear, not quadratic, and the page returns an error.
- A negative discriminant means no real roots; the complex roots are shown as p ± qi.
- A zero discriminant gives one repeated root: x² − 4x + 4 = 0 has x = 2 twice.
- Roots are shown to four decimal places; the exact radical form is (−b ± √D) ÷ 2a from the formula line.
Spotted a mistake? Tell us
Quadratic Formula reference table
| Discriminant | Roots | The parabola | Example |
|---|---|---|---|
| Positive and a perfect square | Two rational roots | Crosses the x-axis twice | x² − 5x + 6: D = 1, x = 2 or 3 |
| Positive, not a perfect square | Two irrational roots | Crosses the x-axis twice | x² + 5x + 1: D = 21 |
| Zero | One repeated real root | Touches the x-axis at its vertex | x² − 4x + 4: D = 0, x = 2 |
| Negative | Two complex roots, p ± qi | Never meets the x-axis | x² + 2x + 5: D = −16, x = −1 ± 2i |
Quadratic Formula FAQ
- Write the equation as ax² + bx + c = 0, read off a, b and c, and substitute into x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 5x + 6 = 0: (5 ± √1) ÷ 2, so x = 3 or x = 2.
- How many real solutions there are. Positive: two. Zero: one (a double root). Negative: none — the two solutions are complex.
- x = −b ÷ 2a, then put that x back into the equation for y. For x² − 5x + 6, x = 2.5 and y = −0.25.
- Over whole numbers, when the discriminant is a perfect square and the roots come out as whole numbers (or neat fractions). x² − 5x + 6 = (x − 3)(x − 2).
- Divide through by a, move c across, add (b ÷ 2a)² to both sides and take square roots. x² − 6x + 5 = 0 → x² − 6x = −5 → x² − 6x + 9 = 4 → (x − 3)² = 4 → x = 3 ± 2, so 5 or 1. The quadratic formula is this process done once, in general.
- Rearrange it first so one side is 0. 3x² = 12 − 5x becomes 3x² + 5x − 12 = 0, so a = 3, b = 5 and c = −12, and the roots are 4/3 and −3.