Skip to content

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

Roots
x = −0.2087 or x = −4.7913

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

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{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

What the discriminant b² − 4ac says about the roots
DiscriminantRootsThe parabolaExample
Positive and a perfect squareTwo rational rootsCrosses the x-axis twicex² − 5x + 6: D = 1, x = 2 or 3
Positive, not a perfect squareTwo irrational rootsCrosses the x-axis twicex² + 5x + 1: D = 21
ZeroOne repeated real rootTouches the x-axis at its vertexx² − 4x + 4: D = 0, x = 2
NegativeTwo complex roots, p ± qiNever meets the x-axisx² + 2x + 5: D = −16, x = −1 ± 2i
Source: OpenStax College Algebra 2e, §2.5 'Quadratic Equations' (the discriminant and the kinds of solutions)

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.