How To Solve A Quadratic Equation Calculator
Every quadratic equation has a closed-form solution. The discriminant tells you what kind of answer to expect before you compute anything, which is the part people skip.
Root using + sqrt(D)
3
- Root using - sqrt(D)
- 2
- Discriminant (b² - 4ac)
- 1
- Vertex — x coordinate
- 2.5
- Vertex — y coordinate
- -0.25
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
The formula this calculator uses
x = (-b +/- sqrt(b^2 - 4ac)) / (2a)
- a
- Coefficient of x^2 — must not be zero
- b
- Coefficient of x
- c
- Constant term
- D = b^2 - 4ac
- Discriminant — decides how many real roots exist
How to check the result by hand
- 1
Put the equation in standard form
Move every term to one side so the other is zero, then collect like powers. Coefficients identified from an uncollected expression are wrong far more often than the arithmetic that follows.
- 2
Identify a, b and c with their signs
For x^2 - 5x + 6 = 0 those are 1, -5 and 6. Writing b as 5 instead of -5 flips every answer, and nothing later reveals it.
- 3
Compute the discriminant first
D = (-5)^2 - 4 x 1 x 6 = 25 - 24 = 1. Squaring a negative b always gives a positive contribution, which is a common source of sign surprise.
- 4
Take the square root and apply both signs
sqrt(1) = 1, so the roots are (5 + 1)/2 = 3 and (5 - 1)/2 = 2. Note that -b is +5 here, not -5.
- 5
Verify with Vieta and with substitution
The roots sum to 5 and multiply to 6, matching -b/a and c/a. Substituting x = 3 gives 9 - 15 + 6 = 0, confirming the answer directly.
For worked examples, common mistakes and the limits of this formula, read the full How To Solve A Quadratic Equation page.