Desktop N CalculatorAll-in-one calculator app

Quadratic Equation Calculator (ax² + bx + c = 0)

Enter a, b and c to get both roots and the discriminant instantly, including complex roots.

Quick answer

x² − 5x + 6 = 0: x = 3 and 2.

How it is calculated

  1. Discriminant D = b² − 4ac = 25 − 24 = 1.
  2. Roots x = (−b ± √D) ÷ 2a = (5 ± 1) ÷ 2.
  3. D > 0 two distinct roots, D = 0 equal roots, D < 0 complex roots.

Worked example

For x² − 5x + 6 = 0, a = 1, b = −5, c = 6. Discriminant 1, roots 3 and 2.

Example values
a1
b-5
c6
Result
Root x₁3
Root x₂2
Discriminant1
Formula

ax² + bx + c = 0

D = b^2-4×a×c
Root x₁ = a==0 ? (b==0 ? "—" : -c/b) : D>=0 ? (-b+sqrt(D))/(2×a) : fix(-b/(2×a))+" + "+fix(abs(sqrt(-D)/(2×a)))+"i"
Root x₂ = a==0 ? (b==0 ? "—" : -c/b) : D>=0 ? (-b-sqrt(D))/(2×a) : fix(-b/(2×a))+" − "+fix(abs(sqrt(-D)/(2×a)))+"i"
Discriminant = D

Good to know

Questions people ask

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ 2a.

What does the discriminant tell me?

How many roots and what kind: two real, one repeated or complex.

How do complex roots look?

As p ± qi, where i = √−1.

More calculators

This page in: हिंदी · मराठी · English

Updated 13 Nov 2026 · Desktop N Calculator v1.2.0