How to Solve Quadratic Equations
A quadratic equation has the form ax² + bx + c = 0, where a ≠ 0. This solver takes the three coefficients of any quadratic and returns its roots — real or complex — along with the discriminant, the vertex of the parabola, and the full step-by-step working. Unlike linear equations, quadratics can have zero, one, or two real solutions, and students meet them throughout algebra, while the same equations model thrown balls, braking distances, and maximum-profit problems in physics and business. Before anything else, the discriminant, D = b² − 4ac, tells you which case you have before you compute a single root.
How to Use the Quadratic Equation Solver
- Write your equation in standard form ax² + bx + c = 0, moving every term to the left side so the right side is zero, and read off the three coefficients.
- Enter the coefficients in the three boxes: “a (x² coefficient)”, “b (x coefficient)”, and “c (constant)”. The solver starts with a = 1, b = −3, c = 2 as a working example; note that b and c keep their signs, so x² − 5x + 6 means b = −5.
- Read the results panel: the headline states the type of roots and lists them, the two cards show the Discriminant and the Vertex, and the numbered steps underneath replay the formula substitution in full.
- If you enter a = 0, the solver explains that the equation is linear instead and links you to the right tool.
Reading the Discriminant
- D > 0: two distinct real roots — the parabola crosses the x-axis twice.
- D = 0: one repeated root — the vertex just touches the x-axis.
- D < 0: no real roots — the solutions are a pair of complex conjugates.
The Quadratic Formula
Plug a, b, and c into x = (−b ± √D) ÷ 2a. The ± is what produces the two roots. Many students lose marks on sign errors with −b, so write each substitution out — exactly what the step-by-step panel above does for you.
Every symbol in the formula has a fixed job. a, b, and c are the coefficients: a multiplies x², b multiplies x, and c is the constant term standing alone. x is the unknown you are solving for — the values of x that make the equation true are its roots. D is the discriminant, the part under the square root sign, and √ means “the positive square root of”. The ± symbol is shorthand for two separate calculations, one adding √D and one subtracting it, and 2a in the denominator divides the whole numerator, not just the root term.
Worked Example 1: Solving x² − 5x + 6 = 0
- Identify the coefficients: a = 1, b = −5, c = 6. The sign of b is negative because the middle term is −5x.
- Compute the discriminant: D = b² − 4ac = (−5)² − 4(1)(6) = 25 − 24 = 1. Since D > 0, expect two distinct real roots — and since √D will be a whole number, the roots should come out exact.
- Substitute into the formula: x = (−(−5) ± √1) ÷ (2 × 1) = (5 ± 1) ÷ 2. Note that −b turns −5 into +5; this is the step where most sign errors happen.
- Take both branches: x₁ = (5 + 1) ÷ 2 = 3 and x₂ = (5 − 1) ÷ 2 = 2.
- Verify by substitution: 3² − 5(3) + 6 = 9 − 15 + 6 = 0 ✓, and 2² − 5(2) + 6 = 4 − 10 + 6 = 0 ✓. The roots are x = 3 and x = 2, which also means the equation factors as (x − 3)(x − 2) = 0.
Worked Example 2: Solving 2x² + 4x − 6 = 0
- Identify the coefficients: a = 2, b = 4, c = −6. This time c is negative, and that sign changes the discriminant's second term from a subtraction into an addition.
- Compute the discriminant: D = b² − 4ac = 4² − 4(2)(−6) = 16 + 48 = 64. Because −4ac is positive here, D is larger than b². √64 = 8, a perfect square, so the roots will be rational.
- Substitute: x = (−4 ± 8) ÷ (2 × 2) = (−4 ± 8) ÷ 4.
- Take both branches: x₁ = (−4 + 8) ÷ 4 = 4 ÷ 4 = 1, and x₂ = (−4 − 8) ÷ 4 = −12 ÷ 4 = −3.
- Verify: 2(1)² + 4(1) − 6 = 2 + 4 − 6 = 0 ✓, and 2(−3)² + 4(−3) − 6 = 18 − 12 − 6 = 0 ✓. One root is positive and one negative, which is typical whenever c is negative — the parabola must cross the axis on both sides of the y-axis.
When Quadratic Equations Show Up
Reach for this solver whenever a problem involves a squared unknown. In physics, a ball launched upward follows a quadratic height equation, and setting it equal to a target height asks when the ball is there — two roots, one on the way up and one on the way down. In geometry, a rectangle with a fixed perimeter and a required area leads straight to a quadratic. In business, revenue and profit curves are parabolas, and the vertex gives the price that maximises profit. And in class, it checks factoring homework instantly: if the solver's roots are whole numbers, your equation factorises neatly.
Common Quadratic Mistakes
- Solving before reaching standard form. For x² = 5x − 6, reading off c = −6 directly is wrong: move everything left first to get x² − 5x + 6 = 0, so a = 1, b = −5, c = 6. Coefficients read from an unarranged equation have the wrong signs.
- Forgetting the ± and reporting one root. Whenever D > 0 there are two answers; stopping after the + branch throws away half the solution — in Example 1 above, x = 2 would be lost.
- Dividing only part of the numerator by 2a. The denominator applies to all of −b ± √D, not just the root term: (5 + 1) ÷ 2 = 3, whereas 5 + (1 ÷ 2) = 5.5 is a different, wrong number.
Worked Example 3: Solving by Completing the Square
The formula is not the only route. Completing the square rewrites the equation as a perfect square equal to a number, and it is the method the quadratic formula itself is derived from. It also hands you the vertex form of the parabola as a by-product. Take x² + 6x + 5 = 0:
- Move the constant across: x² + 6x = −5. The square can only be completed on the x-terms, so the 5 has to leave the left side first.
- Halve the x-coefficient and square it: half of 6 is 3, and 3² = 9. Add 9 to both sides: x² + 6x + 9 = −5 + 9 = 4. Adding to both sides keeps the equation balanced.
- Factor the perfect square: the left side is now (x + 3)², so the equation reads (x + 3)² = 4.
- Take square roots, keeping the ±: x + 3 = ±2. Forgetting the ± here loses a root exactly as it does in the formula.
- Solve both branches: x = −3 + 2 = −1, or x = −3 − 2 = −5. Check: (−1)² + 6(−1) + 5 = 1 − 6 + 5 = 0 ✓, and (−5)² + 6(−5) + 5 = 25 − 30 + 5 = 0 ✓.
Which method should you reach for? Factoring is fastest when the roots are whole numbers, as in Examples 1 and 2. Completing the square is worth it when you also need the vertex — the finished form (x + 3)² = 4 already shows the parabola's turning point at x = −3. The formula is the reliable fallback that works on every quadratic, which is why the solver above uses it. Practice the manual method with our complete the square calculator, check factorable equations with the factoring calculator, and read the formal definition and history of the quadratic equation at Wolfram MathWorld.
Vertex and Graphing
The vertex (−b ÷ 2a) is the parabola's turning point: a minimum when a > 0, a maximum when a < 0. Knowing the vertex plus the roots lets you sketch the entire graph in seconds.
Working with linear equations instead? Try our linear equation solver. To solve algebra problems step by step across equations, expressions and formulas, use the general algebra calculator.
Stuck on the next question as well? Try the math problem solver hub for step-by-step calculators across algebra, geometry and calculus.