What Is the Quadratic Formula?
By the Calculator.hair team · Updated · 8 min read
Short answer
The quadratic formula is x = (−b ± √(b² − 4ac)) ÷ 2a, and it solves any equation of the form ax² + bx + c = 0 where a is not zero. For x² − 5x + 6 = 0, a = 1, b = −5 and c = 6, so x = (5 ± √1) ÷ 2, which gives x = 3 or x = 2.
Key takeaways
- Put the equation in the form ax² + bx + c = 0 before you read off a, b and c.
- The discriminant, b² − 4ac, tells you how many real roots to expect before you finish solving.
- A negative discriminant gives two complex roots, and the parabola never touches the x-axis.
- Factoring is faster when the discriminant is a perfect square, and the formula works every time.
What is the formula for a quadratic equation?
The formula is x = (−b ± √(b² − 4ac)) ÷ 2a, where a, b and c are the coefficients of the equation ax² + bx + c = 0. A quadratic equation is any polynomial equation whose highest power of x is 2. The ± sign means the formula produces two values: one using the plus and one using the minus. These values are called the roots or solutions of the equation.
The value of a cannot be 0, because then there is no x² term and the equation is linear. Our quadratic formula calculator treats a = 0 that way: for 2x + 3 = 0 it returns x = −1.5 from the rule x = −c ÷ b. It also accepts fractions as coefficients, so you can enter 1/2 for a.
How do you use the quadratic formula step by step?
Rewrite the equation so one side is 0, identify a, b and c with their signs, compute the discriminant, then substitute everything into the formula. The table works through 2x² + 7x + 3 = 0, and the results match our calculator.
| Step | Working | Result |
|---|---|---|
| 1. Identify coefficients | 2x² + 7x + 3 = 0 | a = 2, b = 7, c = 3 |
| 2. Compute the discriminant | 7² − 4 × 2 × 3 = 49 − 24 | 25 |
| 3. Take the square root | √25 | 5 |
| 4. Substitute | x = (−7 ± 5) ÷ (2 × 2) | x = (−7 ± 5) ÷ 4 |
| 5. Use the plus sign | −2 ÷ 4 | x = −0.5 |
| 6. Use the minus sign | −12 ÷ 4 | x = −3 |
How do you solve a quadratic that isn't in standard form?
Move every term to one side and combine like terms first, because a, b and c are only meaningful in standard form, ax² + bx + c = 0. Reading coefficients from an unsimplified equation is a common source of wrong answers.
Worked example: solve 3x² − 2x = x + 6. Subtract x and 6 from both sides to get 3x² − 3x − 6 = 0, so a = 3, b = −3 and c = −6. The discriminant is 9 − (−72) = 81, and its square root is 9. Then x = (3 ± 9) ÷ 6, which gives x = 2 or x = −1. The equation solver accepts the original form directly, does the rearranging for you and shows each step. Checking x = 2 in the original gives 8 on both sides. For equations of other types, see how to solve equations.
What does the discriminant tell you?
The discriminant, the expression b² − 4ac under the square root, tells you how many roots the equation has and whether they are real or complex. A positive value gives two different real roots, zero gives one repeated real root, and a negative value gives two complex roots.
The reason is the square root in the formula. If the discriminant is positive, ± produces two different values. If it is 0, adding and subtracting 0 changes nothing, so both values are the same. If it is negative, no real number squares to it, so the roots leave the real number line.
The discriminant also describes the graph. A quadratic plots as a U-shaped curve called a parabola, and the real roots are the points where it crosses the x-axis.
| Discriminant | Roots | Parabola and x-axis | Example | Value | Roots of the example |
|---|---|---|---|---|---|
| Positive | Two distinct real roots | Crosses twice | x² − 5x + 6 = 0 | 1 | x = 3, x = 2 |
| Zero | One repeated real root | Touches once | x² − 6x + 9 = 0 | 0 | x = 3 (double root) |
| Negative | Two complex roots | Never touches | x² + 2x + 5 = 0 | −16 | x = −1 ± 2i |
What are complex roots?
Complex roots are solutions that include the imaginary unit i, defined by i² = −1, and they appear when the discriminant is negative. They have the form p ± qi, where p and q are real numbers.
Worked example: solve x² + 2x + 5 = 0. Here a = 1, b = 2 and c = 5, so the discriminant is 4 − 20 = −16. Since √(−16) = 4i, the formula gives x = (−2 ± 4i) ÷ 2, which simplifies to x = −1 ± 2i.
You can confirm this by substitution. For x = −1 + 2i, x² = 1 − 4i + 4i² = −3 − 4i, and 2x = −2 + 4i. Adding these and then 5 gives −3 − 4i − 2 + 4i + 5 = 0.
When a, b and c are real numbers, complex roots always come as a conjugate pair: the same two numbers with opposite signs on the imaginary part. In a real-world problem such as an object's height over time, complex roots usually mean the event never happens. Here, the parabola's lowest point is (−1, 4), above the x-axis, so y never reaches 0.
Should you factor or use the quadratic formula?
Factor when the numbers split cleanly, and use the formula otherwise. With whole-number coefficients, the discriminant settles it: if it is a perfect square, the equation factors with whole numbers, and if it is not, factoring by hand will not produce a tidy result.
To factor x² − 5x + 6, look for two numbers that multiply to c = 6 and add to b = −5. The factor calculator lists the factors of 6 as 1, 2, 3 and 6, and the pair −2 and −3 works, so the equation becomes (x − 2)(x − 3) = 0 and x = 2 or x = 3.
Now try 2x² − 4x − 3 = 0. The discriminant is 16 + 24 = 40, which is not a perfect square, so the formula is the better route. It gives x = (4 ± √40) ÷ 4, or about x = 2.58 and x = −0.58, rounded to two decimal places. In exact form, √40 = 2√10, so x = (2 ± √10) ÷ 2. The root calculator can simplify radicals like this one.
| Equation | Discriminant | Perfect square? | Best method | Roots |
|---|---|---|---|---|
| x² − 5x + 6 = 0 | 1 | Yes | Factor: (x − 2)(x − 3) | 2 and 3 |
| 2x² + 7x + 3 = 0 | 25 | Yes | Factor: (2x + 1)(x + 3) | −0.5 and −3 |
| x² − 6x + 9 = 0 | 0 | Yes | Factor: (x − 3)² | 3 (double) |
| 2x² − 4x − 3 = 0 | 40 | No | Quadratic formula | About 2.58 and −0.58 |
| x² + 2x + 5 = 0 | −16 | No | Quadratic formula | −1 ± 2i |
How is the quadratic formula used in a real problem?
It finds the moment a quantity that follows a parabola reaches a target value, and height over time is the classic case. Assume a ball is thrown upward at 64 feet per second from a height of 80 feet, ignoring air resistance. Its height after t seconds is h = −16t² + 64t + 80, where −16 comes from gravity of about 32 feet per second squared.
To find when it lands, set h = 0, so a = −16, b = 64 and c = 80. The discriminant is 9,216 and its square root is 96, so the roots are t = 5 and t = −1. A negative time has no meaning here, so the ball lands after 5 seconds. Always check roots against the situation, since the formula doesn't know what the variable stands for.
The calculator also reports the vertex, the parabola's turning point, at (−b ÷ 2a, y). Here it is (2, 144), so the ball peaks at 144 feet after 2 seconds.
What mistakes should you avoid with the quadratic formula?
Nearly all errors are sign errors or a missed step in the division.
- Squaring a negative b incorrectly: when b = −5, b² is 25, not −25.
- Dropping the sign on −b: when b = −5, −b is +5.
- Dividing only part of the top by 2a. The whole of −b ± √(b² − 4ac) goes over 2a.
- Using 2 instead of 2a in the denominator when a is not 1.
- Reading a, b and c before moving every term to one side.
- Missing a sign in c: in 2x² − 4x − 3 = 0, c is −3, so −4ac is +24.
Calculators in this guide
Frequently asked questions
Does the quadratic formula always work?
Yes, for every quadratic equation with a not equal to 0. It returns real or complex roots depending on the discriminant, which is why it is a dependable fallback when factoring fails.
What is a quadratic equation solver?
It is a tool that takes the coefficients or the full equation and returns the roots. Our quadratic formula calculator takes a, b and c, while the equation solver takes the whole equation as you would write it.
What does a double root mean?
A double root means the discriminant is 0 and both values from the formula are the same. The parabola touches the x-axis at one point without crossing it, as x² − 6x + 9 = 0 does at x = 3.
How can you quickly check quadratic roots?
The roots must add to −b ÷ a and multiply to c ÷ a. For x² − 5x + 6 = 0, the roots 3 and 2 add to 5 and multiply to 6, so they check out.
Where does the quadratic formula come from?
It comes from completing the square on ax² + bx + c = 0. Dividing by a, moving the constant across, adding (b ÷ 2a)² to both sides and taking the square root leaves x alone, which produces the formula.