Quadratic Formula Calculator

This quadratic formula calculator solves any equation of the form ax² + bx + c = 0: enter a, b and c to get the roots, exact form and every step of the working.

Example: a (coefficient of x²) 2 · b (coefficient of x) -8 · c (constant term) 6 → Roots: x₁ = 1; x₂ = 3. Source: Wolfram MathWorld – Quadratic formula and discriminant. Updated: .

My ToolboxYour inputs are saved in this browser only.

Result

Roots
x₁ = 1; x₂ = 3
Discriminant
D = 16 > 0 → two real roots
Vertex of the parabola
S(2 | −2)
Factored form
2 · (x − 1) · (x − 3)
Sum and product of roots
x₁ + x₂ = 4; x₁ · x₂ = 3
Working
  • 2x² − 8x + 6 = 0
  • D = b² − 4ac = (−8)² − 4 · 2 · 6 = 64 − 48 = 16
  • x = (−b ± √D) ÷ (2a) = (8 ± √16) ÷ 4
  • x₁ = (8 − 4) ÷ 4 ≈ 1; x₂ = (8 + 4) ÷ 4 ≈ 3
  • Divide by a → x² + px + q = 0 with p = −4, q = 3
  • x = −p/2 ± √((p/2)² − q) = 2 ± √(4 − 3) = 2 ± 1
  • Check (Vieta’s formulas): x₁ + x₂ = −b ÷ a and x₁ · x₂ = c ÷ a
a > 0: the parabola opens upwards and the vertex is its minimum.

How it is calculated

A quadratic equation ax² + bx + c = 0 is solved with the quadratic formula x = (−b ± √(b² − 4ac)) ÷ (2a). The discriminant D = b² − 4ac tells you how many real roots there are: D > 0 gives two, D = 0 one repeated root, D < 0 none (only complex roots). Example: 2x² − 8x + 6 = 0 has D = 16 and roots x = 1 and x = 3.

Getting the equation into standard form

Exact answers, vertex and factoring

With whole-number coefficients the calculator also gives the exact roots – as fractions (6x² − x − 2 = 0 → −1/2 and 2/3) or as a simplified radical (x² − 3x + 1 = 0 → (3 ± √5) ÷ 2). You also get the vertex (−b/(2a), c − b²/(4a)), the factored form a(x − x₁)(x − x₂) and a check with Vieta’s formulas. If D is negative, the complex roots are shown as well, e.g. 1 ± 2i.

Why the answers stay accurate

Plugging numbers straight into the textbook formula can lose precision when b² is much larger than 4ac. The calculator therefore uses the numerically stable form from Numerical Recipes: q = −(b + sign(b)·√D)/2, x₁ = q/a, x₂ = c/q. The step-by-step working still shows the familiar formula.

Plot the parabola and its x-intercepts with the graphing calculator, check square roots with the exponent calculator and fractions with the fraction calculator.

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ (2a) for the equation ax² + bx + c = 0. The ± gives the two roots.

What does the discriminant tell you?

D = b² − 4ac. If D > 0 there are two real roots, if D = 0 one repeated root, and if D < 0 no real roots – the parabola does not cross the x-axis.

How do you solve a quadratic with imaginary numbers?

When D < 0, write √D = i·√(−D). For x² − 2x + 5 = 0: D = −16, so x = (2 ± 4i) ÷ 2 = 1 ± 2i.

How do I solve x² − 9 = 0 without the formula?

Isolate x² and take the square root: x² = 9, so x = 3 or x = −3. For x² + 4x = 0, factor out x: x(x + 4) = 0, so x = 0 or x = −4.

How do I write a quadratic in factored form?

Find the roots x₁ and x₂, then write a(x − x₁)(x − x₂). For 2x² − 8x + 6 the roots are 1 and 3, so it factors as 2(x − 1)(x − 3).

Sources and legal basis

As of:

Related tools