A quadratic formula calculator solves ax² + bx + c = 0 for x using x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 5x + 6 = 0 the roots are 3 and 2.
On this page

How to use the quadratic formula calculator
- Write the equation as ax² + bx + c = 0.
- Enter a, b and c (a ≠ 0).
- Read the two roots.
How the quadratic formula calculator works
The quadratic formula calculator solves ax² + bx + c = 0. You enter the three coefficients, and a must not be 0, or the equation is not quadratic. The tool computes the discriminant D = b² − 4ac, then applies the quadratic formula:
- x = (−b ± √D) ÷ 2a
Both roots are shown to six decimal places. When D is negative, the tool reports complex roots in the form p ± qi.
What the discriminant tells you
The discriminant decides the type of roots before you finish the work. If D is positive, there are two different real roots, and the parabola crosses the x-axis twice. If D is 0, there is one repeated real root, and the parabola just touches the axis. If D is negative, there are no real roots, and the roots are a pair of complex conjugates.
Quadratic formula calculator worked example
Solve x² − 5x + 6 = 0. Here a = 1, b = −5 and c = 6, so D = 25 − 24 = 1. Then x = (5 ± 1) ÷ 2, giving 3 and 2. The quadratic formula calculator returns “3, 2”. Check by factoring: (x − 3)(x − 2) = 0. For x² + 2x + 5 = 0, D = 4 − 20 = −16, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i.
| a | b | c | D | Roots |
|---|---|---|---|---|
| 1 | −5 | 6 | 1 | 3, 2 |
| 1 | 2 | 1 | 0 | −1 (double) |
| 1 | 0 | −2 | 8 | ±1.414214 |
| 1 | 2 | 5 | −16 | −1 ± 2i |
| 2 | 3 | 5 | −31 | −0.75 ± 1.391941i |
Put the equation in standard form first
Move every term to one side so the other side is 0. For 2x² = 7x − 3, subtract 7x and add 3 to get 2x² − 7x + 3 = 0, so a = 2, b = −7, c = 3. Watch the signs: a missing x term means b = 0, and a missing constant means c = 0. Fractions are allowed; you can also multiply through to clear them.
Roots, vertex and graph
The roots are where y = ax² + bx + c crosses the x-axis. The vertex sits halfway between them at x = −b ÷ 2a. For x² − 5x + 6 that is x = 2.5, and y there is −0.25, the lowest point. If a is positive the parabola opens upward; if negative, downward. The sum of the roots is −b ÷ a and their product is c ÷ a, a quick check on any answer.
Other methods
Factoring is faster when the numbers are friendly, and completing the square explains where the formula comes from. The quadratic formula always works, which is why the quadratic formula calculator uses it. For very large or very small coefficients, rounding can affect the last digits, so keep answers to a sensible number of places.
A note on negative a
When a is negative the parabola opens downward, but the roots are the same as for the equation multiplied by −1. For −x² + 2x − 5 = 0, D = 4 − 20 = −16 and the roots are 1 ± 2i, the same as for x² − 2x + 5 = 0. The tool always shows complex roots as p + qi and p − qi with q positive, whatever the sign of a.
Tips
- Write the equation in standard form before entering numbers.
- Check the sign of b carefully.
- Use the sum and product of roots to verify.
- Use the quadratic formula calculator to check steps, then show your working.
Related converters and calculators
Related calculators:
- Factor calculator: factors
- Root calculator: square roots
- Slope calculator: lines
- Scientific calculator: general math
Sources
OpenStax College Algebra 2e, 2.5: Quadratic equations.
Questions about this calculator
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) / 2a.
What does a negative discriminant mean?
Two complex roots and no real roots.
Can a be 0?
No; then the equation is linear.
What are the roots of x² − 5x + 6?
3 and 2.
Does it show complex roots?
Yes, as p ± qi.
Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.
Report a calculation issue