Quadratic Formula Calculator

Solve ax² + bx + c = 0 to find roots, discriminant, vertex, and axis of symmetry.

Solution

Discriminant (D) -
Root(s) -
Vertex (h, k) -
Axis of Symmetry -
Direction -

Step-by-Step:

About the Quadratic Formula Calculator

This free quadratic formula calculator solves any equation in the standard form ax² + bx + c = 0. Enter the coefficients to get the discriminant, roots (real or complex), vertex, axis of symmetry, and opening direction, with step-by-step work.

What Is the Quadratic Formula?

The quadratic formula solves ax² + bx + c = 0 for x:

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

  • a: coefficient of x²; it cannot be zero, or the equation becomes linear.
  • b: coefficient of x (linear term).
  • c: the constant term.
  • x: the unknown; each solution is a root.
  • ±: produces two solutions, one with + and one with −.
  • b² − 4ac: the discriminant; it determines the type of roots (see below).

How to Use

Write the equation in standard form, then read off a, b, and c. For example, x² = 5x − 6 becomes x² − 5x + 6 = 0, so a = 1, b = −5, c = 6. Enter them and click Calculate; results appear to four decimal places. For square or nth roots, try our root calculator.

The Discriminant: Three Possible Cases

The discriminant, D = b² − 4ac, determines the number and type of roots.

Case 1: D > 0 — Two Distinct Real Roots

Solve x² − 5x + 6 = 0 with a = 1, b = −5, c = 6. Here D = (−5)² − 4(1)(6) = 25 − 24 = 1, and x = (5 ± √1) / 2 = (5 ± 1) / 2, giving x = 3 or x = 2. Both check by substitution: 2² − 5(2) + 6 = 0 ✓ and 3² − 5(3) + 6 = 0 ✓.

Case 2: D = 0 — One Repeated Real Root

Solve x² − 6x + 9 = 0 with a = 1, b = −6, c = 9. Here D = (−6)² − 4(1)(9) = 36 − 36 = 0, so the square-root term vanishes and x = −b / 2a = 6 / 2 = 3. Check: 3² − 6(3) + 9 = 0 ✓. The ± collapses to one answer: x = 3 is a repeated (double) root; the parabola touches the x-axis at its vertex (3, 0).

Case 3: D < 0 — Two Complex Roots

Solve x² + 2x + 5 = 0 with a = 1, b = 2, c = 5. Here D = 2² − 4(1)(5) = −16, and x = (−2 ± √−16) / 2 = (−2 ± 4i) / 2 = −1 ± 2i. Check (−1 + 2i): (−1 + 2i)² + 2(−1 + 2i) + 5 = (1 − 4i − 4) + (−2 + 4i) + 5 = 0 ✓. The roots are complex conjugates; the parabola never touches the x-axis.

Discriminant Quick-Reference Table

DiscriminantRootsExampleGraph
D > 0, perfect squareTwo distinct rational rootsx² − 5x + 6 = 0 → x = 2, 3Crosses x-axis twice
D > 0, not a perfect squareTwo distinct irrational rootsx² − 2 = 0 → x = ±√2 ≈ ±1.4142Crosses x-axis twice
D = 0One repeated real rootx² − 6x + 9 = 0 → x = 3Touches x-axis at vertex
D < 0Two complex conjugate rootsx² + 2x + 5 = 0 → x = −1 ± 2iNever touches x-axis

Finding the Vertex of a Parabola

The vertex sits on the axis of symmetry at h = −b / 2a, with y-coordinate k = f(h). For x² − 5x + 6, h = −(−5) / 2 = 2.5 and k = (2.5)² − 5(2.5) + 6 = −0.25, so the vertex is (2.5, −0.25). The axis x = 2.5 passes halfway between the roots 2 and 3. A positive a opens the parabola up (vertex is a minimum); a negative a opens it down (vertex is a maximum).

When Factoring Is Faster

Factoring beats the formula when coefficients are small integers and roots are rational. When a = 1, find two numbers that multiply to c and add to b: for x² − 5x + 6, the numbers −2 and −3 give (x − 2)(x − 3) = 0, so x = 2 or x = 3. Use the formula when the discriminant is not a perfect square, coefficients are large or decimal, or you cannot spot the factors quickly.

Real-World Uses of the Quadratic Formula

Projectile Height

Projectile height follows h(t) = −16t² + vt + s (in feet). A ball thrown upward at 32 ft/s from a 48-foot platform gives h(t) = −16t² + 32t + 48. Setting h = 0: D = 32² − 4(−16)(48) = 4,096 = 64², so t = (−32 ± 64) / (−32), giving t = 3 or t = −1. Only the positive root counts: the ball lands after 3 seconds, and the vertex shows it peaked at 1 second and 64 feet.

Area Problems

A rectangle is 5 feet longer than it is wide, with an area of 84 square feet, so w(w + 5) = 84, or w² + 5w − 84 = 0. Since D = 25 + 336 = 361 = 19², w = (−5 + 19) / 2 = 7. The width is 7 feet, the length 12 feet, and 7 × 12 = 84 ✓. Problems about dimensions, consecutive integers, or price times demand often hide a quadratic equation.

Frequently Asked Questions

What does the discriminant tell me?

The discriminant D = b² − 4ac reveals the number and type of roots: D > 0 means two distinct real roots, D = 0 one repeated real root, and D < 0 two complex conjugate roots. Example: x² − 5x + 6 = 0 has D = 1 and two real roots, x = 2 and x = 3.

Can a be zero?

No. If a = 0, the x² term disappears and the equation is linear, not quadratic. The calculator will prompt you if a is zero.

How is the vertex calculated?

The vertex x-coordinate is h = −b / 2a; the y-coordinate is k = f(h) = a·h² + b·h + c. For x² − 5x + 6, h = 2.5 and k = −0.25, so the vertex is (2.5, −0.25).

What are complex roots?

When the discriminant is negative, the formula involves √−1, written as the imaginary unit i, and the roots come as conjugates p ± qi (example: x² + 2x + 5 = 0 gives −1 ± 2i), and the parabola never crosses the x-axis.

When should I factor instead of using the quadratic formula?

Factor when you can spot two numbers that multiply to c and add to b (with small integer coefficients and a = 1) — it is faster. Otherwise use the formula; it works for every quadratic.

Does the calculator accept decimals and negative coefficients?

Yes — negatives and decimals are fine for a, b, and c, as long as a ≠ 0. Results display to four decimal places.

Is this calculator free?

Yes — completely free, no ads or registration; all calculations run locally in your browser.