How to use the quadratic formula calculator
First get everything on one side so the equation equals zero. Then read off a, b and c, keeping their signs. For 2x^2 + 7 = 3x, subtract 3x to get 2x^2 - 3x + 7 = 0, so a = 2, b = -3 and c = 7. If a term is missing, its coefficient is 0.
You can type whole numbers, decimals, fractions like 1/2, or scientific notation. The decimal precision menu only changes the rounded answers. Exact roots, the discriminant and the vertex stay exact whatever you pick.
- Rewrite the equation as ax^2 + bx + c = 0.
- Enter a, b and c with their signs. Remember a can't be 0.
- Pick how many decimal places you want.
- Press Solve quadratic.
- Read the exact roots first, then the decimals, discriminant and vertex.
The quadratic formula
The formula gives both solutions at once. The +/- sign means you work it out twice: once adding the square root and once subtracting it. The expression under the square root, b^2 - 4ac, is called the discriminant, and it tells you what kind of answers to expect before you finish.
The formula comes from completing the square on ax^2 + bx + c = 0, which is why it works for every quadratic, even ones that don't factor.
x = (-b +/- sqrt(b^2 - 4ac)) / (2a)Discriminant: D = b^2 - 4ac
Worked example: 2x^2 + 3x - 5 = 0
Here a = 2, b = 3 and c = -5. The discriminant is 3^2 - 4(2)(-5) = 9 + 40 = 49. That's a perfect square, so the roots will be nice fractions.
Plug in: x = (-3 +/- 7) / 4. Adding gives 4 / 4 = 1. Subtracting gives -10 / 4 = -5/2. Check the first one: 2(1)^2 + 3(1) - 5 = 0. Since the roots are rational, the equation also factors as (x - 1)(2x + 5) = 0.
| Step | Work | Result |
|---|---|---|
| Discriminant | 3^2 - 4(2)(-5) | 49 |
| Square root | sqrt(49) | 7 |
| Plus branch | (-3 + 7) / 4 | 1 |
| Minus branch | (-3 - 7) / 4 | -5/2 |
| Sum of roots | -b/a = -3/2 | 1 + (-5/2) = -3/2 |
| Product of roots | c/a = -5/2 | 1 x (-5/2) = -5/2 |
Discriminant calculator: what b^2 - 4ac tells you
The sign of the discriminant decides the type of answer. Positive means two different real roots. Zero means one repeated root. Negative means no real roots, just a pair of complex roots like -1 + 2i and -1 - 2i.
With whole-number coefficients, a positive discriminant that's a perfect square (1, 4, 9, 16, 25...) gives rational roots, so the equation factors neatly. Anything else positive gives roots with a square root left in them. The calculator shows the discriminant and names the case for you.
| Example | D | Roots | Graph |
|---|---|---|---|
| x^2 - 3x + 2 = 0 | 1 (perfect square) | 1 and 2 | Crosses the x-axis twice |
| x^2 - 2 = 0 | 8 (not a square) | +/-sqrt(2), about +/-1.414214 | Crosses the x-axis twice |
| x^2 - 2x + 1 = 0 | 0 | 1, repeated | Touches the x-axis at the vertex |
| x^2 + 2x + 5 = 0 | -16 | -1 +/- 2i | Never meets the x-axis |
Vertex form calculator and the parabola
Every quadratic is also a parabola, y = ax^2 + bx + c. Its axis of symmetry is x = -b/(2a), and the vertex sits on that line at height -D/(4a). If a is positive the parabola opens up and the vertex is the lowest point. If a is negative it opens down and the vertex is the highest point.
The calculator rewrites your equation in vertex form, y = a(x - h)^2 + k. For 2x^2 + 3x - 5, the vertex is (-3/4, -49/8), so the vertex form is y = 2(x + 3/4)^2 - 49/8. You also get the range, y-intercept, focus and directrix.
h = -b/(2a)k = -D/(4a)Vertex form: y = a(x - h)^2 + k
Checking the roots
Substitute each root back into ax^2 + bx + c. You should get exactly 0. Two shortcuts help too: the roots always add up to -b/a and multiply to c/a. For x^2 - 3x + 2 = 0, the roots 1 and 2 add to 3 and multiply to 2, which matches.
The calculator runs these checks for you, along with a small table of points on both sides of the vertex. Equal steps left and right of the axis give equal y-values, which confirms the vertex is right.
r1 + r2 = -b/ar1 x r2 = c/a
Fractions, decimals and exact answers
If your coefficients are fractions, the calculator clears them first. (1/2)x^2 - (3/2)x + 1 = 0 becomes x^2 - 3x + 2 = 0, which has the same roots, 1 and 2. Multiplying every term by the same nonzero number never changes the solutions.
Irrational roots are shown both ways. For x^2 - 2 = 0 you'll see +/-sqrt(2) and the rounded 1.414214. Use the exact form in later algebra and the decimal for graphing or measuring.
Sources
These open textbooks cover the formula, the discriminant, vertex form and the checks used on this page.