A quadratic equation has the form ax² + bx + c = 0, where a is not zero. Every quadratic can be solved with one formula, and this calculator applies it for you: it reports both roots in exact simplest-radical form and as decimals, classifies them with the discriminant, finds the vertex and draws the parabola so you can see where the roots come from.
How to use the quadratic formula calculator
- Rearrange your equation so one side is zero, for example 2x² = 5x + 3 becomes 2x² − 5x − 3 = 0.
- Enter the coefficient of x² as a, the coefficient of x as b and the constant as c. Use negative signs where the terms are subtracted, and 0 for a missing term.
- Read the roots on the tape. Exact answers appear first, with decimal approximations underneath. The steps show the discriminant, the substitution and the simplification, and the graph marks the roots and the vertex.
The quadratic formula
The expression under the radical is the discriminant:
| Discriminant | Roots | Graph |
|---|---|---|
| D > 0, perfect square | two different rational roots | crosses the x-axis twice |
| D > 0, not a perfect square | two different irrational roots (a ± √) | crosses the x-axis twice |
| D = 0 | one repeated real root | touches the x-axis at the vertex |
| D < 0 | two complex conjugate roots p ± qi | never meets the x-axis |
The formula comes from completing the square on the general equation. If you want to see that process on your own numbers, use the completing the square calculator.
Worked example
Solve 2x² − 5x − 3 = 0, so a = 2, b = −5 and c = −3.
Discriminant: D = (−5)² − 4(2)(−3) = 25 + 24 = 49. Because 49 = 7², the roots are rational.
Formula: x = (5 ± 7) ÷ 4, which gives x = 12 ÷ 4 = 3 and x = −2 ÷ 4 = −1/2.
Check: 2(3)² − 5(3) − 3 = 18 − 15 − 3 = 0. ✓
Vertex: h = 5 ÷ 4 = 1.25 and k = −3 − 25 ÷ 8 = −6.125, so the lowest point of the parabola is (1.25, −6.125).
Because the roots are rational, the quadratic also factors: 2x² − 5x − 3 = (x − 3)(2x + 1). The calculator shows this factored form whenever the discriminant is a perfect square.
Two more cases worth trying:
- Irrational roots: x² + 4x + 1 = 0 has D = 12 = 4 × 3, so x = (−4 ± 2√3) ÷ 2 = −2 ± √3 ≈ −0.2679 and −3.7321.
- Complex roots: x² + 2x + 5 = 0 has D = −16, so x = (−2 ± 4i) ÷ 2 = −1 ± 2i.
Reading the rest of the results
Vertex and axis of symmetry
The vertex is the turning point of the parabola, at x = −b/2a. The vertical line through it is the axis of symmetry, and the two real roots always sit the same distance on either side of it. If a > 0 the parabola opens upward and the vertex is a minimum; if a < 0 it opens downward and the vertex is a maximum. The vertex form a(x − h)² + k packs this into one expression.
Sum and product of the roots
For any quadratic, the roots add up to −b/a and multiply to c/a (Vieta’s formulas). These are handy checks: in the example, 3 + (−1/2) = 5/2 = −(−5)/2 and 3 × (−1/2) = −3/2 = −3/2. ✓
Common mistakes
- Losing the sign of b. With b = −5, the formula starts with −b = +5. Writing b with its sign in parentheses avoids this.
- Dividing only part of the numerator by 2a. The whole expression −b ± √D is divided by 2a.
- Forgetting to set the equation to zero first. The coefficients must come from ax² + bx + c = 0, not from an equation with terms on both sides.
- Rounding too early. Keep the exact radical until the last step; the calculator does this, then rounds the decimals to ten places.
For third-degree equations, the cubic equation calculator finds all three roots, and the simplify radicals calculator explains how expressions like √48 become 4√3.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) / 2a. The ± gives the two roots: one with a plus sign and one with a minus sign.
What does the discriminant tell me?
The discriminant D = b² − 4ac decides the type of roots before you finish solving. If D is positive there are two real roots, if D is zero there is one repeated root, and if D is negative there are two complex conjugate roots and the parabola never touches the x-axis.
What happens if a = 0?
Then there is no x² term and the equation is linear, bx + c = 0. The calculator tells you so and solves x = −c/b instead. If b is also 0, the equation has either no solution or every number is a solution.
Can the calculator give complex roots?
Yes. When the discriminant is negative, the roots are written as a ± bi, both exactly (for example −1/2 ± (√3/2)i) and as decimals.
Can I enter decimal coefficients?
Yes. Decimals are converted to exact fractions behind the scenes, so the exact answer is still in simplest radical form. For example 0.5x² + 1.5x − 2.25 = 0 gives (−3 ± 3√3)/2.