Skip to content
C

Quadratic Formula Calculator

Roots of ax²+bx+c.

ax² + bx + c = 0

Discriminant
1.0000
Root 1
3
Root 2
2

About the Quadratic Formula Calculator

MethodologyHome

A quadratic formula calculator solves equations of the form ax² + bx + c = 0, returning the real or complex roots. Quadratic equations show up in physics (projectile motion), engineering (structural analysis), finance (compound-interest break-evens), optimization, and more. The quadratic formula always works — but the form of the answer (two real roots, one repeated root, or two complex roots) depends on the discriminant, which encodes the problem's geometry.

The formula and what each piece means

x = (−b ± √(b² − 4ac)) / 2a. The expression under the square root, b² − 4ac, is called the discriminant (often denoted Δ or D). It determines the nature of the roots: positive → two distinct real roots; zero → one repeated real root (the parabola touches the x-axis but doesn't cross); negative → two complex roots that are conjugates of each other.

Geometrically, ax² + bx + c is a parabola. The roots are where it crosses the x-axis. If the parabola opens upward (a > 0) and its minimum is above zero, there are no real roots — the discriminant is negative, signaling that the function never equals zero in the reals.

Why factoring isn't always feasible

For nice integer coefficients (small numbers, integer roots), factoring by inspection is fastest: x² − 5x + 6 = (x − 2)(x − 3) gives roots 2 and 3. But most real-world quadratics don't factor cleanly — the roots are irrational or complex. The quadratic formula handles every case, including the messy ones.

Completing the square is another approach and the algebraic source of the quadratic formula. It's most useful when you need to express the parabola in vertex form (y = a(x − h)² + k) — for example, to identify the maximum or minimum value of a function, which is k at x = h.

When complex roots are real answers

A negative discriminant produces complex roots of the form (−b ± i√|D|) / 2a, where i is the imaginary unit. In pure mathematics these are full-fledged solutions; in physics they often signal an impossibility ("a projectile starting at zero velocity will never reach 100 meters") or a regime change.

In electrical engineering, complex roots of a characteristic equation describe oscillating systems (resistors and capacitors in AC circuits, springs with damping). In population dynamics, they indicate cyclic behavior. The mathematics of complex roots maps to physical phenomena that are more interesting than the real-roots case.

Numerical pitfalls

When b is much larger than ±√(b² − 4ac), the standard formula computes (−b + √...) / 2a as the difference of two nearly-equal large numbers — losing precision through cancellation. The numerically stable variant computes one root with the formula as written, then uses the relation r₁ × r₂ = c/a to find the other root by division.

For high-precision work, use the form: x₁ = (−b − sign(b)·√D) / 2a, x₂ = c / (a · x₁). This avoids the cancellation issue entirely.

Formula

x = (−b ± √(b² − 4ac)) / 2a
  • a, b, c = Coefficients of ax² + bx + c = 0 (a ≠ 0)
  • Δ (discriminant) = b² − 4ac; sign determines root type
  • ± (plus-or-minus) = Two roots; ± gives both

Worked examples

Two distinct real roots: x² − 5x + 6 = 0

a = 1, b = −5, c = 6. Discriminant: 25 − 24 = 1 (positive). Roots: (5 ± 1) / 2 = 3 and 2. Sanity check: (x − 2)(x − 3) = x² − 5x + 6. ✓

Repeated real root: x² − 4x + 4 = 0

a = 1, b = −4, c = 4. Discriminant: 16 − 16 = 0. Single repeated root: 4 / 2 = 2. The parabola touches the x-axis at x = 2 without crossing.

Complex roots: x² + 2x + 5 = 0

a = 1, b = 2, c = 5. Discriminant: 4 − 20 = −16 (negative). Roots: (−2 ± √−16) / 2 = (−2 ± 4i) / 2 = −1 ± 2i. The parabola's minimum is above zero — no real roots.

Frequently asked questions

What does the discriminant tell me?

The discriminant b² − 4ac determines the nature of the roots. Positive: two distinct real roots. Zero: one repeated real root (the parabola touches the x-axis tangentially). Negative: two complex-conjugate roots (the parabola never crosses zero in the reals).

Can the quadratic formula give imaginary numbers?

Yes, when the discriminant is negative. The roots take the form a + bi, where i is the imaginary unit (√−1). In real-world contexts, complex roots often signal that a system has no real solution within the model — an event that doesn't happen, a function that doesn't reach a certain value, etc.

What if a = 0?

Then it's not a quadratic equation — it's a linear equation, bx + c = 0, with a single root x = −c/b (assuming b ≠ 0). The quadratic formula divides by 2a and is undefined when a = 0.

Can I solve quadratic equations without the formula?

Yes, in several ways: factoring (when the roots are nice integers or simple rationals), completing the square (which derives the quadratic formula), graphing (visual but imprecise), and numerical methods (Newton's method, bisection — overkill for quadratics but useful for higher-degree polynomials). The quadratic formula is the universal closed-form solution.

How do I solve higher-degree polynomials?

Cubic and quartic polynomials have their own formulas (the cubic formula and Ferrari's quartic formula), but they're complex enough that they're rarely used by hand. For degree 5 and higher, the Abel-Ruffini theorem proves there's no general formula in terms of radicals — numerical methods are required.

Why does the quadratic formula always work?

Because it's derived directly from the general quadratic ax² + bx + c = 0 by completing the square — every step is reversible and applies to all coefficients. Unlike factoring, which depends on guessing the right factorization, the formula reduces every quadratic to plug-and-chug arithmetic on its coefficients.

Concepts

Sources & methodology

  • Wolfram MathWorld — Quadratic Equationsource