Math Solver Free

Quadratic Equation Solver

Roots, discriminant, and vertex of ax² + bx + c = 0 — with every step shown.

Two distinct real roots
x₁ = 2
x₂ = 1
Discriminant
D = 1
Vertex
(1.5, -0.25)

Step 1: Discriminant: D = b² − 4ac = (-3)² − 4(1)(2) = 1

Step 2: Since D > 0, there are two distinct real roots.

Step 3: x = [−(-3) ± √(1)] ÷ (2 × 1)

Step 4: x₁ = 4 ÷ 2 = 2

Step 5: x₂ = 2 ÷ 2 = 1

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

  1. 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.
  2. 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.
  3. 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.
  4. 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

  1. Identify the coefficients: a = 1, b = −5, c = 6. The sign of b is negative because the middle term is −5x.
  2. 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.
  3. 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.
  4. Take both branches: x₁ = (5 + 1) ÷ 2 = 3 and x₂ = (5 − 1) ÷ 2 = 2.
  5. 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

  1. 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.
  2. 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.
  3. Substitute: x = (−4 ± 8) ÷ (2 × 2) = (−4 ± 8) ÷ 4.
  4. Take both branches: x₁ = (−4 + 8) ÷ 4 = 4 ÷ 4 = 1, and x₂ = (−4 − 8) ÷ 4 = −12 ÷ 4 = −3.
  5. 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:

  1. 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.
  2. 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.
  3. Factor the perfect square: the left side is now (x + 3)², so the equation reads (x + 3)² = 4.
  4. Take square roots, keeping the ±: x + 3 = ±2. Forgetting the ± here loses a root exactly as it does in the formula.
  5. 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.

Frequently Asked Questions

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) ÷ 2a. It gives the solutions of any quadratic equation ax² + bx + c = 0, and this solver applies it step by step.

What does a negative discriminant mean?

A negative discriminant (b² − 4ac < 0) means the equation has no real roots — instead it has two complex conjugate roots, which this solver displays.

How do I find the vertex of a parabola?

The vertex of y = ax² + bx + c is at x = −b ÷ 2a. Substitute that x back into the equation to get the y-coordinate. The solver shows it automatically.

Can a quadratic equation have only one solution?

Yes. When the discriminant is exactly zero, the two roots coincide in a single repeated root. For x² − 6x + 9 = 0, the discriminant is 36 − 36 = 0 and the only solution is x = 3 — which is also the vertex, because the parabola touches the x-axis at that point instead of crossing it.

What happens if a = 0 in a quadratic equation?

The x² term disappears and the equation stops being quadratic: bx + c = 0 is a linear equation with the single solution x = −c ÷ b. This solver asks for a non-zero value of a and points you to the linear equation solver when a = 0, since the quadratic formula would divide by zero.

Is this quadratic solver free?

Yes — the quadratic equation solver and every other tool on Math Solver Free are completely free, with no sign-up, no account, and no limit on how many equations you solve. Everything runs locally in your browser, so the equations you enter never leave your device.

How do I solve a quadratic equation by completing the square?

Move the constant to the right side, add the square of half the x-coefficient to both sides, factor the left side into a perfect square, then take square roots with ±. For x² + 6x + 5 = 0: x² + 6x = −5, add 9 to get (x + 3)² = 4, so x + 3 = ±2 and x = −1 or x = −5.

What are complex solutions of a quadratic equation?

When the discriminant is negative, the roots involve the imaginary unit i = √−1 and come as a conjugate pair. For x² + 2x + 5 = 0, the discriminant is 4 − 20 = −16, so √D = 4i and x = (−2 ± 4i) ÷ 2 = −1 ± 2i. The parabola never crosses the x-axis, but the equation still has these two complex solutions, and this solver displays them.

Related Tools & Guides

About the MathSolverFree Team

The MathSolverFree Team builds and maintains the calculators and step-by-step solvers on this site. Every tool is checked against worked textbook examples before it is published, and the method behind each solver is written out in full — in the worked examples on the page and in our guides — so you can see exactly how an answer is reached, not just the answer itself.

How we build and test our tools·More about the team