Quadratic Formula Calculator

Solve any quadratic equation ax² + bx + c = 0. Returns real or complex roots, the discriminant, vertex coordinates, and full step-by-step work.

Calculator Numbers & Math Updated Apr 28, 2026
How to Use
  1. Enter coefficient a (the x² coefficient). It must be non-zero — if a = 0 the equation is linear, not quadratic.
  2. Enter coefficient b (the x coefficient).
  3. Enter coefficient c (the constant term).
  4. Read the discriminant — it tells you what kind of roots to expect (two real, one real, or two complex).
  5. Both roots are displayed, in exact form when they're rational and as decimals otherwise.
  6. The vertex (h, k) of the parabola is also shown — useful for graphing or finding extrema.
ax² + bx + c
Presets
Roots

Formulas

Quadratic formula
x = (−b ± √(b² − 4ac)) / 2a
Always works for any a ≠ 0.
Discriminant
Δ = b² − 4ac
Determines the nature of the roots.
Δ > 0
Two distinct real roots
Parabola crosses the x-axis twice.
Δ = 0
One real (double) root
Parabola is tangent to the x-axis.
Δ < 0
Complex conjugate roots
Parabola doesn't cross the x-axis.
Vertex
(h, k) = (−b/2a, c − b²/4a)
Min if a>0, max if a<0.
Sum of roots
r₁ + r₂ = −b/a
Vieta's formula.
Product of roots
r₁ · r₂ = c/a
Useful sanity check.
Factored form
a(x − r₁)(x − r₂)
When the roots are known.

A Brief History of the Quadratic Formula

Babylonian mathematicians around 2000 BCE solved specific quadratic problems using procedures equivalent to completing the square — clay tablets show step-by-step worked examples. Egyptian and Greek mathematicians also handled quadratics, but with geometric constructions rather than algebraic formulas. The first systematic algebraic treatment came from al-Khwarizmi (c. 820 CE), whose al-Kitab al-mukhtasar fi hisab al-jabr wa'l-muqabala gave the field its name (algebra ← al-jabr) and presented complete-the-square solutions in prose form. Crucially, al-Khwarizmi only handled positive coefficients and positive roots — negative numbers were not yet accepted.

The compact symbolic formula we use today is a 16th- and 17th-century development, popularized by mathematicians like François Viète and René Descartes. Negative roots were finally accepted in the 1500s; complex roots took longer — Cardano grappled with them in 1545 while solving cubics, and they were not really legitimized until Euler's Introductio in Analysin Infinitorum in 1748. By the 19th century the quadratic formula was a school staple, and it has been ever since.

The formula is one of the few pieces of mathematics that survives essentially intact across two millennia and four continents. Every algebraic system that handles real numbers can solve quadratics; the formula is also the simplest non-trivial example of finding roots of a polynomial, and the springboard for cubic (Cardano), quartic (Ferrari), and the general theory of polynomial solvability (Galois). The quintic and higher don't have a closed-form solution in radicals at all — but the quadratic always does.

About This Calculator

This calculator applies the standard quadratic formula to any input coefficients. The discriminant is computed first; based on its sign the result is reported as two distinct reals, one real double root, or a complex conjugate pair. Vertex coordinates are computed independently from the formula −b/(2a) for x and substitution for y. Sum and product of roots are also surfaced as cross-checks via Vieta's formulas.

For irrational roots, the decimal approximation is shown alongside the exact symbolic form when straightforward (e.g., (1 ± √5)/2 for the golden ratio). Everything runs entirely in your browser; no values are transmitted or stored. For numerical stability with very large or very small coefficients, the calculator uses the algebraically-equivalent forms that minimize floating-point cancellation error (e.g., x = 2c / (−b ∓ √Δ) when b is close to ±√Δ).

Frequently Asked Questions

What does the discriminant tell me?

The discriminant Δ = b² − 4ac determines the nature of the roots. Δ &gt; 0: two distinct real roots. Δ = 0: one real root (a 'double root,' the parabola just touches the x-axis). Δ &lt; 0: two complex conjugate roots (the parabola never crosses the x-axis). The discriminant is the part under the square root in the quadratic formula.

When do quadratics have complex roots?

Whenever the discriminant is negative. The two roots are complex conjugates of each other: <em>x = (−b ± i√|Δ|) / 2a</em>. They come in pairs because the quadratic formula's only source of complex output is the imaginary unit <em>i</em> from the square root, which always appears as ±. Complex roots show up in physics (damped oscillators), control theory (system poles), and signal processing constantly.

Can I always factor instead of using the formula?

If the roots are rational, yes — and factoring is often faster. For x² − 5x + 6 = 0 the roots are 2 and 3, so it factors as (x−2)(x−3). The quadratic formula is necessary when the roots are irrational (e.g., x² + x − 1 = 0 has roots involving √5) or complex. The discriminant being a perfect square is the test for nice rational roots.

How does this relate to the parabola?

The roots are where the parabola y = ax² + bx + c crosses the x-axis. The vertex is at x = −b/(2a), and substituting back gives y. If a &gt; 0 the parabola opens upward and the vertex is the minimum; if a &lt; 0 it opens downward and the vertex is the maximum. The discriminant tells you how many times (if any) the parabola crosses zero.

What's 'completing the square' and why does it matter?

It's the algebraic technique that derives the quadratic formula. Start with ax² + bx + c = 0, divide by a, move c/a to the other side, add (b/2a)² to both sides to make the left side a perfect square, then take the square root. The general quadratic formula is the worked-out version of completing the square for arbitrary a, b, c.

What if a = 0?

The equation is no longer quadratic — it's linear: bx + c = 0, with the single solution x = −c/b. The calculator will flag this case rather than dividing by zero. You can also use the linear-equation solver for this scenario.

Common Use Cases

Algebra homework

Solve any quadratic from a textbook, with the discriminant and step-by-step work visible to verify your method.

Physics and projectile motion

Find the time when a projectile hits a given height, or where two trajectories intersect — both reduce to quadratics.

Engineering optimization

Locate the maximum or minimum of any quadratic cost or yield function by reading the vertex coordinates.

Computer graphics

Compute ray-vs-sphere intersections, parabolic trajectories, and Bezier curve roots.

Statistics and quality control

Find the boundaries of a confidence region or specification limit when defined by a quadratic constraint.

Finance and break-even

Solve for the break-even quantity when revenue and cost both have quadratic terms.

Last updated: