Quadratic Formula Calculator — Solve for x
Enter the coefficients a, b, and c of any quadratic equation to instantly find both roots, the discriminant, vertex, and axis of symmetry.
📝 Enter Coefficients (ax²+bx+c=0)
📊 Result
Disclaimer: This tool performs standard mathematical calculations for educational and reference purposes. Always double-check results independently for graded coursework, exams, or safety-critical applications.
The Quadratic Formula
Any equation of the form ax² + bx + c = 0 (where a ≠ 0) can be solved with the quadratic formula: x = (−b ± √(b²−4ac)) / 2a. The value under the square root, b²−4ac, is called the discriminant, and its sign tells you what kind of roots the equation has before you even finish solving.
Reading the Discriminant
- Discriminant > 0: two distinct real roots — the parabola crosses the x-axis at two points
- Discriminant = 0: one repeated real root — the parabola touches the x-axis at exactly one point (its vertex)
- Discriminant < 0: two complex (imaginary) roots — the parabola never touches the x-axis
Worked Example
Solve x² − 5x + 6 = 0 (a=1, b=−5, c=6).
- Step 1: Discriminant = (−5)² − 4(1)(6) = 25 − 24 = 1
- Step 2: Since discriminant > 0, there are two real roots
- Step 3: x = (5 ± √1) / 2 = (5 ± 1) / 2, giving x = 3 and x = 2
A Second Worked Example: Negative Discriminant
Now solve 2x² + 4x + 5 = 0, where a = 2, b = 4 and c = 5.
- Discriminant: 4² − 4(2)(5) = 16 − 40 = −24
- Vertex: x = −4 / (2 × 2) = −1, and y = 2(−1)² + 4(−1) + 5 = 3
- Meaning: the discriminant is negative, so the roots are complex. The parabola opens upward (a is positive) and its lowest point is (−1, 3), which sits above the x-axis, so it can never reach y = 0.
Notice how the vertex alone confirms the answer. A parabola that opens upward with a lowest point above zero cannot have real roots.
Common Mistakes
- Dropping the sign of b. In x² − 5x + 6 = 0, b is −5, so −b is +5. Entering 5 instead of −5 gives the roots −2 and −3 rather than 2 and 3.
- Forgetting to move everything to one side. The calculator expects the form ax² + bx + c = 0. An equation such as x² = 4x − 3 must first be rewritten as x² − 4x + 3 = 0.
- Leaving a missing term blank instead of zero. For x² − 9 = 0, b is 0, not “nothing”. An empty b or c field is read as 0, but it is clearer to type it.
- Squaring a negative b incorrectly. The b² part is always positive, because (−5)² is 25 and not −25.
- Reading complex roots as an error. A negative discriminant is a valid result, and it tells you the curve never crosses the x-axis.
Where You Would Use This
- Checking homework or exam practice answers for algebra and pre-calculus.
- Finding when a thrown object, modelled by a quadratic height equation, returns to the ground.
- Working out the break-even points when profit is modelled as a quadratic in price or quantity.
- Locating the vertex to find the maximum area or minimum cost in an optimisation problem.
A quick way to check any answer: substitute each root back into the original equation. For x² − 5x + 6 = 0, putting in x = 2 gives 4 − 10 + 6 = 0, and x = 3 gives 9 − 15 + 6 = 0. Another useful test is that the two roots add up to −b/a (here 5) and multiply to c/a (here 6). If either test fails, re-check the signs you entered for a, b and c, since a sign slip is the most frequent source of wrong answers.