How to use the quadratic formula calculator
- Put the equation in standard form. Move every term to one side so the other side is 0, then combine like terms. x(x + 6) + 4 = 0 becomes x² + 6x + 4 = 0.
- Enter a, b and c with their signs. a is the number in front of x², b the number in front of x, and c the constant. A missing term has a coefficient of 0; x² alone has a = 1.
- Read the solutions. The large figure shows the exact roots. The note gives decimal values and the type of solution. The cards show the discriminant, vertex, axis of symmetry and y-intercept, and the graph marks the roots and the vertex.
The calculator opens on OpenStax’s Example 10.28, 2x² + 9x − 5 = 0, which has the solutions x = −5 and x = 1/2.
The quadratic formula
For any equation ax² + bx + c = 0 with a ≠ 0, the solutions are:
The ± gives two answers, one with the square root added and one with it subtracted. Working Example 10.28 by hand, with a = 2, b = 9 and c = −5:
- b² − 4ac = 81 − 4(2)(−5) = 81 + 40 = 121.
- √121 = 11.
- x = (−9 ± 11) ÷ 4, so x = 2 ÷ 4 = 1/2 or x = −20 ÷ 4 = −5.
Check by substituting: 2(1/2)² + 9(1/2) − 5 = 1/2 + 9/2 − 5 = 0.
When the number under the root is not a perfect square, the exact answer keeps a radical. In Example 10.30, 4y² − 5y − 3 = 0 gives (5 ± √73)/8, about 1.693 and −0.443. In Example 10.31, 2x² + 10x + 11 = 0 gives (−10 ± √12)/4, which simplifies to (−5 ± √3)/2 after writing √12 as 2√3 and dividing out the common factor 2.
The discriminant: how many solutions?
The expression under the square root, b² − 4ac, is the discriminant. Its sign tells you what kind of solutions to expect before you finish solving:
| Equation | Discriminant | Solutions |
|---|---|---|
| 2x² + 9x − 5 = 0 | 121 (positive) | Two real: −5 and 1/2 |
| 4x² − 20x + 25 = 0 | 0 | One repeated real: 5/2 |
| 3p² + 2p + 9 = 0 | −104 (negative) | No real; two complex |
These three equations come from the textbook’s own discriminant table. When the discriminant is a positive perfect square, as 121 is, the roots are rational and the equation could also have been solved by factoring: 2x² + 9x − 5 = (2x − 1)(x + 5).
For a negative discriminant the textbook stops at “no real solution.” The calculator also gives the complex pair using i = √−1. For 3p² + 2p + 9 = 0 that is (−1 ± i√26)/3, about −0.333 ± 1.700i.
The vertex and the graph
The graph of y = ax² + bx + c is a parabola. It opens upward when a is positive and downward when a is negative. Its turning point, the vertex, sits on the axis of symmetry halfway between the roots:
In Algebra and Trigonometry 2e, Example 3 (section 5.1), f(x) = 2x² − 6x + 7 has h = 6 ÷ 4 = 3/2 and k = f(3/2) = 5/2, so the vertex form is 2(x − 3/2)² + 5/2. The vertex is the minimum, and since 5/2 is above zero, this parabola does not cross the x-axis; its discriminant, 36 − 56 = −20, says the same thing.
The roots are where the parabola crosses the x-axis, and the y-intercept is the point (0, c).
Where quadratics come up
- Area problems: a rectangle whose length is 4 feet more than its width and whose area is 96 square feet gives w(w + 4) = 96, or w² + 4w − 96 = 0, so w = 8 feet.
- Projectiles: the height of a thrown ball over time follows a downward-opening parabola, and the vertex is the highest point.
- Maximums and minimums: any quantity modeled by a quadratic reaches its largest or smallest value at the vertex.
Other ways to solve a quadratic
The quadratic formula works for every quadratic equation, but simpler methods are faster when they apply. The textbook suggests looking at the equation first and picking the method that fits it:
- Factoring: x² − 6x + 5 = (x − 1)(x − 5) = 0, so x = 1 or x = 5, the same answers the formula gives in Example 10.29.
- Square root property: when there is no x term, isolate x² and take both roots. x² = 49 gives x = ±7, and 3x² = 48 gives x² = 16, so x = ±4. Forgetting the negative root is a frequent error.
- Completing the square: rewrite the equation as a(x − h)² + k = 0, which is the vertex form the calculator shows. The quadratic formula itself comes from completing the square on ax² + bx + c = 0, so the two methods give the same roots. Completing the square is most convenient when a = 1 and b is even, as in x² + 6x + 4 = 0, which becomes (x + 3)² = 5 and x = −3 ± √5.
Checking your answers and avoiding slips
Two quick facts let you check roots without substituting. For roots r₁ and r₂ of ax² + bx + c = 0:
For 2x² + 9x − 5 = 0, the roots −5 and 1/2 add to −9/2 = −b ÷ a and multiply to −5/2 = c ÷ a. If either check fails, look for a slip.
The most common slips are dropping the sign of b, so that −b is computed as −9 when b = −9 (it should be +9); dividing only the square-root term by 2a instead of the whole numerator; and forgetting to move everything to one side first. x² + 3x = 10 must become x² + 3x − 10 = 0, with c = −10, before the formula applies; its roots are 2 and −5.
Sources & assumptions
How this calculator gets its numbers. Full method: our methodology.
- The equation must be in standard form ax² + bx + c = 0; a = 0 is solved as a linear equation.
- With whole-number a, b and c, the exact roots are reduced to simplest radical form; complex roots use i = √−1.
- Vertex h = −b ÷ 2a and k = c − b² ÷ 4a.
Sources
- OpenStax (Rice University), Elementary Algebra 2e, 10.3 Solve Quadratic Equations Using the Quadratic Formula. Examples 10.28–10.35, including 2x² + 9x − 5 = 0 (x = 1/2, −5), 4y² − 5y − 3 = 0, 3p² + 2p + 9 = 0 (no real solution) and the discriminant table.
- OpenStax (Rice University), Algebra and Trigonometry 2e, 5.1 Quadratic Functions. Vertex h = −b/2a, k = f(h) and vertex form a(x − h)² + k; Example 3, f(x) = 2x² − 6x + 7 has vertex (3/2, 5/2).
Last reviewed . Decimal roots are computed with a numerically stable form of the formula and shown to 8 significant digits.
Frequently asked questions
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) ÷ 2a. It solves every equation of the form ax² + bx + c = 0 with a ≠ 0.
What does the discriminant tell you?
Positive: two real solutions. Zero: one repeated real solution. Negative: no real solutions, but two complex ones.
What if a = 0?
Then there is no x² term and the equation is linear. The calculator solves bx + c = 0 instead, giving x = −c ÷ b.
How do I find the vertex of a parabola?
The x-coordinate is h = −b ÷ 2a. Substitute it into the equation to get k. For 2x² − 6x + 7, the vertex is (3/2, 5/2).
Should I use factoring or the quadratic formula?
Factoring is faster when the roots are whole numbers or simple fractions. The formula works for every quadratic, including ones that don’t factor, like 4y² − 5y − 3 = 0.
What are complex roots?
When the discriminant is negative, the roots involve the square root of a negative number and are written with i = √−1. The parabola does not cross the x-axis.