The Standard Engine.
MathematicsFinanceHealthPhysicsEngineeringBrowse all

Mathematics · Algebra & Calculus

Quadratic Formula Calculator

Solve any quadratic equation of the form ax² + bx + c = 0 instantly, returning both real and complex roots with full discriminant analysis.

Calculator

Advertisement

Formula

In the standard quadratic equation ax² + bx + c = 0, 'a' is the coefficient of the squared term (a ≠ 0), 'b' is the coefficient of the linear term, and 'c' is the constant term. The expression b² − 4ac is called the discriminant (Δ). When Δ > 0, there are two distinct real roots; when Δ = 0, there is exactly one real root (a repeated root); when Δ < 0, there are two complex conjugate roots.

Source: Al-Khwarizmi (820 CE), formalized in modern notation by René Descartes (1637). See: Stewart, J. — Algebra and Trigonometry, 4th ed., Cengage Learning.

How it works

Every quadratic equation can be written in standard form as ax² + bx + c = 0, where a ≠ 0. The quadratic formula is derived by completing the square on this general form. Starting from ax² + bx + c = 0, you divide through by a, move the constant to the right side, add the completing-square term (b/2a)² to both sides, and simplify the left side into a perfect square. Taking the square root of both sides and isolating x yields the famous result: x = (−b ± √(b² − 4ac)) / 2a. This derivation is universally taught because it proves the formula works for every possible quadratic — no guessing of factor pairs required.

The discriminant, Δ = b² − 4ac, is the key diagnostic quantity. A positive discriminant means the parabola crosses the x-axis at two distinct points, giving two separate real roots. A discriminant of exactly zero means the parabola is tangent to the x-axis at one point — the vertex sits precisely on the axis, producing a single repeated real root often written x = −b/2a. A negative discriminant means the parabola never intersects the x-axis, and the two roots become a complex conjugate pair of the form (−b/2a) ± i(√|Δ|/2a). Complex roots always appear in conjugate pairs whenever the original coefficients a, b, and c are all real numbers, which is a consequence of the Complex Conjugate Root Theorem.

Beyond the roots themselves, this calculator also reports the vertex of the parabola defined by y = ax² + bx + c. The vertex x-coordinate is −b/(2a), the axis of symmetry of the parabola, and the vertex y-coordinate is c − b²/(4a), which equals the minimum value of the function if a > 0 or the maximum value if a < 0. These quantities are critical in optimization problems — for instance, determining the peak height of a thrown ball, the maximum profit of a revenue function, or the minimum material needed to enclose an area — making the quadratic formula far more than a root-finding tool.

Worked example

Consider the equation 2x² − 4x − 6 = 0, so a = 2, b = −4, c = −6.

Step 1 — Compute the discriminant:
Δ = b² − 4ac = (−4)² − 4(2)(−6) = 16 + 48 = 64

Step 2 — Interpret the discriminant:
Since Δ = 64 > 0, there are two distinct real roots.

Step 3 — Apply the quadratic formula:
x = (−(−4) ± √64) / (2 × 2) = (4 ± 8) / 4

Step 4 — Evaluate each root:
x₁ = (4 + 8) / 4 = 12 / 4 = 3
x₂ = (4 − 8) / 4 = −4 / 4 = −1

Step 5 — Find the vertex:
Vertex x = −b/(2a) = 4/4 = 1
Vertex y = c − b²/(4a) = −6 − 16/8 = −6 − 2 = −8
So the vertex is at (1, −8), and since a = 2 > 0, this is the minimum point of the parabola.

Verification: Substituting x = 3: 2(9) − 4(3) − 6 = 18 − 12 − 6 = 0 ✓. Substituting x = −1: 2(1) − 4(−1) − 6 = 2 + 4 − 6 = 0 ✓

Limitations & notes

This calculator assumes that the coefficients a, b, and c are real numbers and that a ≠ 0 — if a = 0, the equation reduces to a linear equation (bx + c = 0) rather than a quadratic, and the formula is undefined due to division by zero. When the discriminant is negative, the calculator reports the real and imaginary parts separately rather than expressing them in full complex notation, so users working with complex numbers should interpret Root x₁ as the real part and the imaginary output as the magnitude of the imaginary component (add ±i before it). Extremely large or small coefficients may introduce floating-point rounding errors inherent to IEEE 754 double-precision arithmetic used by JavaScript — for symbolic or arbitrary-precision results, a computer algebra system such as Wolfram Alpha or SageMath is recommended. Additionally, the formula finds roots of the polynomial but does not simplify them into exact radical or rational form; if a clean fractional or surd answer is needed, manual simplification or a CAS should be used.

Frequently asked questions

What does it mean when the discriminant is negative?

A negative discriminant (Δ < 0) means the quadratic equation has no real solutions — the parabola y = ax² + bx + c never crosses or touches the x-axis. Instead, the two roots are complex conjugate numbers of the form p + qi and p − qi, where p = −b/(2a) is the real part and q = √|Δ|/(2a) is the imaginary part. These complex roots are still mathematically valid solutions to the equation and appear naturally in electrical engineering, signal processing, and control theory.

Can the quadratic formula solve equations with complex coefficients?

Yes, the quadratic formula x = (−b ± √(b² − 4ac)) / 2a is valid even when a, b, and c are complex numbers, but the square root of a complex discriminant must be computed using complex arithmetic, which this calculator does not perform. For complex-coefficient quadratics, use a dedicated complex number solver or a CAS. In standard academic and engineering contexts, coefficients are assumed to be real, and the calculator is designed for that use case.

Why is the coefficient 'a' not allowed to be zero?

When a = 0, the term ax² vanishes entirely, reducing ax² + bx + c = 0 to the linear equation bx + c = 0, which has the single solution x = −c/b (assuming b ≠ 0). The quadratic formula contains 2a in the denominator, so setting a = 0 causes division by zero, making the formula undefined. A zero value for 'a' simply means the equation is not quadratic, and a different, simpler formula applies.

How is the vertex of the parabola related to the quadratic formula?

The vertex x-coordinate, −b/(2a), is exactly the average of the two roots x₁ and x₂, which makes geometric sense because a parabola is symmetric about its vertex. If you add the two root expressions from the quadratic formula — (−b + √Δ)/(2a) and (−b − √Δ)/(2a) — the ±√Δ terms cancel, and the average is −b/(2a). The vertex y-coordinate, obtained by substituting x = −b/(2a) back into the original equation, gives the minimum or maximum value of the quadratic function depending on the sign of a.

What is the difference between roots, zeros, and solutions of a quadratic?

These three terms are used interchangeably in different contexts but refer to the same values. 'Roots' typically refers to the solutions of the polynomial equation ax² + bx + c = 0, a term common in pure mathematics. 'Zeros' refers to the x-values where the function f(x) = ax² + bx + c equals zero, emphasizing the graphical interpretation as x-intercepts. 'Solutions' is the most general term used in algebra when solving equations. All three concepts describe the same numerical values produced by the quadratic formula.

Last updated: 2025-01-15 · Formula verified against primary sources.