Quadratic Formula Calculator
Solve ax^2+bx+c=0 instantly. Enter a, b, c to get both roots and the discriminant. Handles repeated roots; returns zeros when roots are complex.
How to use this tool
- Enter coefficient a, coefficient b and coefficient c in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your root 1 (x1) and the full breakdown beneath it.
Formula
x = (-b +/- sqrt(b^2 - 4ac)) / (2a); D = b^2 - 4ac
How it works
Compute the discriminant D = b² − 4ac. If D < 0, no real roots. Otherwise x = (−b ± √D) / 2a.
Worked example
x^2 - 5x + 6 = 0
- a=1, b=-5, c=6
- D = 25-24 = 1
- x = (5+/-1)/2
- x1=3, x2=2
Common mistakes to avoid
- Forgetting to negate b before computing -b, so the numerator becomes b instead of -b.
- Dividing only the square-root term by 2a instead of the entire numerator (-b plus-or-minus sqrt(D)).
- Setting a=0 and then dividing by zero; the tool requires a non-zero leading coefficient.
Key terms
Frequently asked questions
- What does it mean when the discriminant is negative?
- A negative discriminant (b^2 - 4ac < 0) means the quadratic has no real roots; the solutions are complex numbers. This calculator returns no real roots in that case.
- Can I use this if a equals zero?
- No. When a=0 the equation is linear (bx+c=0), not quadratic. Use a standard linear equation solver instead.
- What are repeated roots?
- When the discriminant equals exactly zero, both roots are identical: x = -b/(2a). The parabola just touches the x-axis at one point.