Skip to content
TheCalcUniverse

Quadratic Equation Solver — Find Roots, Vertex & Discriminant

Solve any quadratic ax²+bx+c=0 with the quadratic formula. Get real or complex roots, discriminant, vertex, axis of symmetry, factored form, and Vieta.

✓ Tested formula & cited sources Formula verified 2026-05-17 Runs in your browser — inputs never sent anywhere

See it worked out

Example — Coefficient a (x²) 1, Coefficient b (x) -5, Constant c 6:

Equation

1x² - 5x + 6 = 0

Discriminant (Δ = b² − 4ac)

1

Vertex (h, k)

(2.5, -0.25)

Axis of Symmetry

x = 2.5

Y-intercept

(0, 6)

Parabola Opens

Upward (∪) — minimum at vertex

Root Nature

Two distinct real roots (Δ > 0)

Root x₁

3

Root x₂

2

Sum of Roots (Vieta)

5

Product of Roots (Vieta)

6

Factored Form

(x − 3)(x − 2)

The formula

x = (−b ± √(b² − 4ac)) / (2a) | Discriminant Δ = b² − 4ac | Vertex: (−b/2a, f(−b/2a))

a
Leading Coefficient
b
Linear Coefficient
c
Constant Term
Δ (Discriminant)
b² − 4ac
Vieta's Formulas
Sum & Product

Worked example — Coefficient a (x²) 1, Coefficient b (x) -5, Constant c 6

Equation = 1x² - 5x + 6 = 0

Full explanation ↓

How Quadratic Solver Works

x = (−b ± √(b² − 4ac)) / (2a) | Discriminant Δ = b² − 4ac | Vertex: (−b/2a, f(−b/2a))

The quadratic formula is the universal method for solving any quadratic equation ax² + bx + c = 0. It works for all coefficients — integers, fractions, decimals, and even complex numbers. The discriminant Δ = b² − 4ac is computed first because it determines the nature of the roots: positive Δ gives two distinct real roots, zero Δ gives one repeated (double) root, and negative Δ gives two complex conjugate roots (no x-intercepts). The calculator also computes the vertex (the minimum or maximum of the parabola), the axis of symmetry, the y-intercept, and the factored form when the roots are rational.

a
Leading CoefficientThe coefficient of x². Must not be zero — if a = 0, the equation is linear, not quadratic. Controls the parabola's opening direction: upward (∪) if a > 0, downward (∩) if a < 0. Also controls how "wide" or "narrow" the parabola appears.
b
Linear CoefficientThe coefficient of x. Influences the horizontal position of the vertex and the axis of symmetry. With a, determines the vertex x-coordinate: h = −b/(2a).
c
Constant TermThe constant term. This is the y-intercept — the parabola always crosses the y-axis at the point (0, c). Also contributes to the discriminant and the vertex y-coordinate.
Δ (Discriminant)
b² − 4acThe discriminant is the key to root classification. Δ > 0: two distinct real roots (parabola crosses x-axis twice). Δ = 0: one repeated real root (parabola touches x-axis at vertex). Δ < 0: two complex conjugate roots (parabola never touches x-axis).
Vieta's Formulas
Sum & ProductFor roots r₁ and r₂: r₁ + r₂ = −b/a and r₁ × r₂ = c/a. These relationships provide a quick check on computed roots and are useful for constructing quadratics with desired roots.
The quadratic formula finds the x-intercepts (roots) where the parabola crosses the x-axis. The discriminant Δ = b² − 4ac determines how many real roots exist.

How to Use

  1. Enter the coefficients a, b, and c from your quadratic equation in standard form: ax² + bx + c = 0. The coefficient a must not be zero.
  2. The discriminant Δ = b² − 4ac is computed and color-coded: green for positive (real roots), gray for zero (repeated root), red for negative (complex roots).
  3. View the roots — real roots are displayed as decimal values, complex roots are shown in (p ± qi) form with the imaginary unit i.
  4. The vertex (h, k) is displayed as the minimum (a > 0) or maximum (a < 0) of the parabola. The axis of symmetry is the vertical line through the vertex.
  5. Vieta's formulas show the sum and product of the roots, which serve as a quick verification: the sum should equal −b/a and the product should equal c/a.
  6. For real roots, the factored form a(x − r₁)(x − r₂) is displayed, which is useful for writing the equation in a form that immediately reveals the x-intercepts.

Quick Reference

Quadratic Formulax = (−b ± √(b² − 4ac)) / (2a)
Discriminant Δb² − 4ac (determines root nature)
Δ > 0Two distinct real roots
Δ = 0One repeated real root (double root)
Δ < 0Two complex conjugate roots
Vertex (h, k)h = −b/(2a), k = f(h) = c − b²/(4a)
Axis of Symmetryx = −b/(2a)
Vieta: Sumr₁ + r₂ = −b/a
Vieta: Productr₁ × r₂ = c/a
Factored Forma(x − r₁)(x − r₂), for real roots

Common Uses

  • Projectile motion and ballistics: calculating the trajectory of thrown objects, the maximum height of a projectile, and where it will land — the height as a function of time is quadratic
  • Physics and engineering: analyzing the motion of objects under constant acceleration (d = ½at² + v₀t + d₀), optimizing structures with parabolic arches, and designing reflective surfaces for telescopes and satellite dishes
  • Computer graphics and game development: computing ray-sphere intersections for 3D rendering using quadratics, and simulating parabolic arcs for grenade throws or jump trajectories
  • Economics and business: maximizing profit and minimizing cost using quadratic revenue/cost functions — the maximum profit occurs at the vertex of the profit parabola
  • Agriculture and land management: optimizing field dimensions for maximum area given a fixed perimeter (a classic quadratic optimization problem)
  • Electrical engineering: analyzing RLC circuits where the characteristic equation for current/voltage is quadratic in the Laplace domain

Understanding the Result

The quadratic formula is one of the most celebrated results in algebra, with roots dating back to ancient Babylonian mathematicians around 2000 BCE. The formula was fully formalized by the Persian mathematician al-Khwarizmi in the 9th century CE in his treatise "Al-Kitab al-Mukhtasar fi Hisab al-Jabr wal-Muqabala" — from which we derive the word "algebra." The discriminant (b² − 4ac) is the key insight: it tells you the nature of the solutions before you compute them. A positive discriminant means the parabola crosses the x-axis at two distinct points. A zero discriminant means it touches the x-axis at exactly one point (the vertex) — the quadratic is a perfect square trinomial. A negative discriminant means the parabola floats entirely above (or below) the x-axis, and the solutions involve the imaginary unit i (where i² = −1). The vertex (h, k) is the parabola's minimum (if a > 0) or maximum (if a < 0), located at h = −b/(2a), k = f(h). The axis of symmetry is the vertical line x = h through the vertex. Quadratic equations appear everywhere: projectile motion follows a parabolic trajectory (h(t) = −½gt² + v₀t + h₀), area optimization problems involve quadratics, structural engineering uses parabolic arches (the Gateway Arch in St. Louis is a weighted catenary, closely approximated by a parabola), antenna dishes and solar concentrators use parabolic reflectors to focus signals, and profit/revenue functions in economics are often quadratic.

Worked Examples

A baseball player hits a ball straight up with an initial velocity of 30 m/s from a height of 1 meter. The height function is h(t) = −4.9t² + 30t + 1. At what times does the ball reach a height of 20 meters? Solve −4.9t² + 30t + 1 = 20, or −4.9t² + 30t − 19 = 0.

a = -4.9 · b = 30 · c = -19

Two real roots: t₁ ≈ 0.69070773 (on the way up), t₂ ≈ 5.60780268 (on the way down). Discriminant Δ = 527.6. Vertex at (3.06122449, 46.90816327). Axis of symmetry: x = 3.06122449. Parabola opens downward.

The discriminant Δ = 30² − 4(−4.9)(−19) = 900 − 372.4 = 527.6. Since Δ > 0, there are two real solutions. Using the quadratic formula: t₁ ≈ 0.69 seconds (on the way up) and t₂ ≈ 5.43 seconds (on the way down). The ball passes 20 meters twice. The maximum height is h(3.06) = −4.9(3.06)² + 30(3.06) + 1 ≈ 46.9 meters, occurring at the vertex t = −b/(2a) = −30/(2(−4.9)) ≈ 3.06 seconds.

A farmer has 100 meters of fencing and wants to build a rectangular enclosure against an existing wall (so only three sides need fencing). What dimensions maximize the area? If width = w and length = l, then 2w + l = 100, so l = 100 − 2w. Area A = w × l = w(100 − 2w) = −2w² + 100w. To find the maximum, set the derivative to zero or find the vertex of the quadratic.

a = -2 · b = 100 · c = 0

Two real roots: w₁ = 0, w₂ = 50. Discriminant Δ = 10000. Vertex at (25, 1250). Parabola opens downward. Maximum area = 1,250 m² at width = 25 m, length = 50 m.

The quadratic −2w² + 100w = 0 has discriminant Δ = 100² − 4(−2)(0) = 10000. The roots are w = 0 and w = 50 (where area is 0 — degenerate rectangles). The vertex is at w = −b/(2a) = −100/(−4) = 25 meters. When w = 25, l = 100 − 50 = 50 meters. Maximum area = 25 × 50 = 1,250 m². The vertex of the parabola gives the maximum, and the axis of symmetry shows the optimal width is exactly halfway between the two roots.

An architect designs a parabolic arch for a bridge. The arch follows y = −0.01x² + 2x where x is the horizontal distance from the left base in meters and y is the height. At what horizontal distances is the arch height equal to 75 meters? Solve −0.01x² + 2x = 75, or −0.01x² + 2x − 75 = 0.

a = -0.01 · b = 2 · c = -75

Two real roots: x₁ = 50, x₂ = 150. Discriminant Δ = 1. Vertex at (100, 100). Parabola opens downward. The arch reaches 75 m at 50 m from the left base and at 150 m (50 m from the right base at total span of 200 m).

Multiply through by 100 for easier coefficients: −x² + 200x − 7500 = 0, but the calculator handles decimals directly. Δ = 4 − 4(−0.01)(−75) = 4 − 3 = 1. Since Δ > 0, there are two real solutions: x₁ = 50 meters and x₂ = 150 meters. The arch reaches 75 meters height at 50m from the left and again at 150m (which is 50m from the right base at 200m total span). The symmetry is expected for a parabolic arch.

Frequently Asked Questions

What does a negative discriminant mean in the real world?
A negative discriminant means the parabola represented by y = ax² + bx + c never crosses the x-axis — the equation has no real solutions. In practical terms, this means whatever quantity you are solving for cannot equal zero under the given conditions. For example, if you are solving for when a projectile hits the ground (height = 0) and the discriminant is negative, the projectile never reaches the ground — it might have been launched from a platform high enough that it escapes into space, or the equation may not correctly model the situation. In economics, a negative discriminant in a break-even analysis means the business can never break even at the given price/cost structure.
What is the relationship between the vertex and completing the square?
The vertex form y = a(x − h)² + k is derived by completing the square on ax² + bx + c. Starting from y = ax² + bx + c: factor out a → y = a(x² + (b/a)x) + c. Add and subtract (b/(2a))² inside the parentheses → y = a(x² + (b/a)x + (b/(2a))²) + c − a(b/(2a))² = a(x + b/(2a))² + c − b²/(4a). So h = −b/(2a) and k = c − b²/(4a). The vertex (h, k) is the minimum (a > 0) or maximum (a < 0) point on the parabola. The quadratic formula itself is derived by completing the square on the general form ax² + bx + c = 0.
Can the quadratic formula solve ANY quadratic equation?
Yes, the quadratic formula solves every quadratic equation with real coefficients, without exception — regardless of whether the roots are rational, irrational, or complex. It works for integer coefficients (x² − 5x + 6 = 0), decimal coefficients (0.5x² − 1.3x + 0.8 = 0), and fractional coefficients. This makes it more powerful than factoring (which only works for "nice" integer roots), completing the square (which requires additional algebraic steps), or graphing (which cannot give exact values for irrational roots). The quadratic formula is the universal solver — memorize it.
What are complex roots and when do they matter?
Complex roots involve the imaginary unit i where i² = −1. They appear when the discriminant is negative, meaning the parabola does not cross the x-axis. While complex roots may seem abstract, they are essential in electrical engineering (analyzing RLC circuit behavior where the characteristic equation is quadratic), control theory (system stability depends on whether complex roots have negative real parts), quantum mechanics (wave functions involve complex numbers), and signal processing (Fourier analysis uses complex exponentials). In pure math, the Fundamental Theorem of Algebra guarantees that every quadratic has exactly two roots over the complex numbers.
How do Vieta's formulas help verify my answer?
Vieta's formulas state that for ax² + bx + c = 0 with roots r₁ and r₂: r₁ + r₂ = −b/a and r₁ × r₂ = c/a. These provide two quick sanity checks on any computed roots. For example, if I solve x² − 5x + 6 = 0, the sum of roots should be −(−5)/1 = 5, and the product should be 6/1 = 6. If I got roots 2 and 3: sum = 5, product = 6 — correct. If I got 1.5 and 3.5: sum = 5 but product = 5.25 — error detected. These formulas are also useful for constructing quadratics with desired properties: to create an equation with roots 4 and −2, use x² − (4 + (−2))x + (4×(−2)) = x² − 2x − 8 = 0.
What is the physical meaning of the axis of symmetry?
The axis of symmetry is the vertical line x = −b/(2a) that splits the parabola into two mirror-image halves. In physics, for a projectile launched from the ground, the axis of symmetry passes through the highest point of the trajectory, and the time to reach maximum height equals the time from maximum height to landing — symmetric about the vertex. In optimization, the axis tells you the input value that produces the optimal output. For a business with quadratic profit = −2p² + 200p − 3000 (where p is price), the axis of symmetry at p = 50 tells you the optimal price without needing to complete the square.

Pro Tips

  • The sign of the discriminant tells you everything. Before solving, check if Δ is positive, zero, or negative — it tells you whether the parabola crosses (Δ > 0), touches (Δ = 0), or misses (Δ < 0) the x-axis, which is often all you need to know for a qualitative answer.
  • Vieta's formulas provide a fast mental check: the sum of roots is −b/a and the product is c/a. If your computed roots don't satisfy these, there is a calculation error. This is especially useful for integer-coefficient quadratics.
  • For decimal coefficients with many digits, scaling the equation (multiplying all coefficients by a power of 10) can make manual verification easier without changing the roots. The calculator handles decimals internally.
  • The vertex form y = a(x − h)² + k reveals the maximum/minimum immediately. Convert from standard form: h = −b/(2a), k = f(h). This is essential for optimization problems where you need the extreme value.

Limitations to Know

  • For quadratics with extremely large coefficients or very small discriminants near the floating-point precision limit (≈10^−15), root values may lose a few digits of precision. Decimal.js improves discriminant precision but does not eliminate all floating-point edge cases.
  • Do not use for linear equations (a = 0) — this calculator requires a ≠ 0. For linear equations, use an equation solver or the slope calculator instead.
  • Do not use for cubic, quartic, or higher-degree polynomial equations — the quadratic formula only applies to degree-2 polynomials. Use the polynomial calculator for higher-degree equations.
  • For exact symbolic solutions (e.g., keeping √2 instead of 1.414), use a computer algebra system like SymPy or Mathematica. This calculator provides numeric approximations only.
  • The factored form a(x − r₁)(x − r₂) is displayed only for real roots. Complex conjugate roots are not factorable over the reals.
Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "Quadratic Equation Solver — Find Roots, Vertex & Discriminant." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/quadratic-equation-calculator/. Accessed July 24, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like

Guides that use this calculator