Quadratic Formula Calculator
Enter a, b and c to solve ax² + bx + c = 0 — exact roots, decimals, the vertex and a graph, with every step of the quadratic formula shown.
Quadratic Formula Calculator
How to use the quadratic formula calculator
First rearrange your equation so one side is zero: ax² + bx + c = 0. Then type the three coefficients — the number in front of x², the number in front of x, and the constant. Remember the signs: in 2x² − 4x − 3 = 0, b is −4 and c is −3. If a term is missing, its coefficient is 0 (x² − 9 = 0 has b = 0).
The answer updates as you type. You get the roots in exact form (simplified radicals, fractions or complex numbers) and as decimals, plus the discriminant, vertex, axis of symmetry, y-intercept, factored form and vertex form. The working below the graph is written the way you’d write it on paper, and the page address keeps your numbers so you can share the solution.
The quadratic formula
x = (−b ± √(b² − 4ac)) / (2a)
It comes from completing the square on ax² + bx + c = 0, so it solves every quadratic, whether or not it factors. The expression under the square root, b² − 4ac, is the discriminant. You can read the kind of answer from it before doing any more work:
| Discriminant | Roots | Graph |
|---|---|---|
| Positive perfect square (1, 4, 9, 25…) | Two rational roots — the quadratic factors | Crosses the x-axis twice |
| Positive, not a perfect square | Two irrational roots, like (2 ± √10)/2 | Crosses the x-axis twice |
| Zero | One repeated root, x = −b / (2a) | Touches the x-axis at the vertex |
| Negative | Two complex roots p ± qi | Never meets the x-axis |
The perfect-square test applies to whole-number coefficients; the calculator clears fractions and decimals first.
Worked example: 2x² − 4x − 3 = 0
This is the example the calculator shows when it loads.
- Coefficients: a = 2, b = −4, c = −3.
- Discriminant: (−4)² − 4(2)(−3) = 16 + 24 = 40. It’s positive but not a perfect square, so expect two irrational roots.
- Substitute: x = (4 ± √40) / 4.
- Simplify the radical: 40 = 4 × 10, so √40 = 2√10 and x = (4 ± 2√10) / 4.
- Reduce: 4, 2 and 4 share a factor of 2, so x = (2 ± √10) / 2.
- Decimals: x₁ ≈ 2.58113883 and x₂ ≈ −0.5811388301.
The vertex is at x = −b / (2a) = 4 / 4 = 1, and y = 2(1)² − 4(1) − 3 = −5, so the vertex is (1, −5) and the vertex form is 2(x − 1)² − 5. Because a is positive, the parabola opens upward and (1, −5) is its lowest point.
Check your answer
For any quadratic, the two roots add up to −b/a and multiply to c/a. Here (2 + √10)/2 + (2 − √10)/2 = 2 = 4/2, and the product is (4 − 10)/4 = −3/2 = c/a. If your roots fail this check, look for a sign mistake. You can also substitute a decimal root back into the equation — the result should be very close to 0.
Common mistakes
- Dropping the sign of b. −b means “the opposite of b”: if b = −4, then −b = +4.
- Squaring a negative b. (−4)² = 16, not −16. Always put a negative b in parentheses before squaring.
- Dividing only part of the numerator by 2a. The fraction bar covers −b and the square root.
- Not rearranging first. x² = 3x + 4 must become x² − 3x − 4 = 0 before you read off a, b and c.
- Stopping at √40. Most teachers expect simplified radicals: 2√10, then reduce the whole fraction.
Related tools: the slope calculator for straight lines, the fraction calculator for arithmetic with the exact roots, and the scientific calculator for checking decimals.
Frequently asked questions
What is the quadratic formula?
For any equation ax² + bx + c = 0 with a ≠ 0, the solutions are x = (−b ± √(b² − 4ac)) / (2a). The ± gives two answers: one with + and one with −. It works for every quadratic, including ones that don’t factor.
What does the discriminant tell you?
The discriminant is D = b² − 4ac, the part under the square root. If D is positive there are two real roots (rational if D is a perfect square), if D = 0 there is one repeated root, and if D is negative there are two complex roots and the parabola never touches the x-axis.
What happens when the discriminant is negative?
The square root of a negative number is imaginary: √(−16) = 4i, because i = √(−1). The roots come as a conjugate pair p ± qi. For x² + 2x + 5 = 0, D = −16 and x = (−2 ± 4i) / 2 = −1 ± 2i.
How do I simplify a square root like √40?
Find the largest perfect square that divides it: 40 = 4 × 10, so √40 = √4 × √10 = 2√10. Then divide every term of the numerator and the denominator by any common factor: (4 ± 2√10) / 4 = (2 ± √10) / 2.
Should I factor or use the quadratic formula?
Factoring is quicker when it works, and it works exactly when the discriminant is a perfect square (with whole-number coefficients). The quadratic formula always works, so it’s the safe choice when you can’t spot the factors. This calculator shows the factored form whenever the roots are rational.
What if a = 0?
Then there is no x² term and the equation is linear, not quadratic, and the formula would divide by zero. The calculator solves bx + c = 0 instead: x = −c / b.