Math Solver Free

Algebra

How to Solve Quadratic Equations Step by Step (3 Methods)

Math Solver Free Team

A pupil solving math examples at a whiteboard in a classroom

A quadratic equation is any equation that can be written in the form ax² + bx + c = 0, where a is not zero. The x² term is what makes it quadratic, and it is also why a quadratic can have up to two solutions: a parabola crosses the x-axis at most twice. Every method in this guide solves the same equation; they differ only in which equations they suit best. Learn all three, and you will never be stuck on a quadratic again.

Before you start, put the equation in standard form: all terms on one side, zero on the other, with the x² term first. If a common factor divides every term, divide it out first — it makes every method easier. Then choose your method.

Method 1: Factoring

Factoring is the fastest method when it works. The idea is simple: write the quadratic as a product of two brackets, then use the fact that if a product is zero, one of the factors must be zero.

Worked example: Solve x² + 5x + 6 = 0.

  1. Find two numbers that multiply to 6 (the constant) and add to 5 (the x coefficient). The numbers are 2 and 3, since 2 × 3 = 6 and 2 + 3 = 5.
  2. Write the factored form: (x + 2)(x + 3) = 0.
  3. Set each factor to zero: x + 2 = 0 or x + 3 = 0.
  4. Solve: x = −2 or x = −3.

Always check by substituting back: (−2)² + 5(−2) + 6 = 4 − 10 + 6 = 0 ✓, and (−3)² + 5(−3) + 6 = 9 − 15 + 6 = 0 ✓. If the constant is negative, the two numbers have opposite signs; if the x coefficient is negative, the larger number (in size) takes the negative sign. For practice, the factoring calculator shows each step, and the quadratic equation solver checks your answers.

Method 2: Completing the square

Completing the square works for every quadratic, and it is the method that explains where the quadratic formula comes from. The idea is to rewrite x² + bx as part of a perfect square, (x + b/2)², by adding (b/2)².

Worked example: Solve x² + 6x − 7 = 0.

  1. Move the constant to the other side: x² + 6x = 7.
  2. Take half of 6 (which is 3), square it (9), and add it to both sides: x² + 6x + 9 = 7 + 9 = 16.
  3. Write the left side as a square: (x + 3)² = 16.
  4. Take the square root of both sides, remembering both signs: x + 3 = 4 or x + 3 = −4.
  5. Solve: x = 1 or x = −7.

Check: 1² + 6(1) − 7 = 0 ✓, and (−7)² + 6(−7) − 7 = 49 − 42 − 7 = 0 ✓. If the coefficient of x² is not 1, divide the whole equation by it first. The complete the square calculator walks through the same steps for your own problems.

Method 3: The quadratic formula

The quadratic formula solves every quadratic equation, no matter how ugly the numbers are. For ax² + bx + c = 0:

x = (−b ± √(b² − 4ac)) / 2a

Worked example: Solve 2x² + 4x − 6 = 0.

  1. Identify a = 2, b = 4, c = −6.
  2. Compute the discriminant: b² − 4ac = 16 − 4(2)(−6) = 16 + 48 = 64.
  3. Substitute into the formula: x = (−4 ± √64) / (2 × 2) = (−4 ± 8) / 4.
  4. Split into two answers: x = (−4 + 8) / 4 = 1, or x = (−4 − 8) / 4 = −3.

Check: 2(1)² + 4(1) − 6 = 0 ✓, and 2(−3)² + 4(−3) − 6 = 18 − 12 − 6 = 0 ✓. Write the formula down before every use until you know it cold, and be careful with the signs of b and c — they cause most formula errors.

The discriminant: what it tells you before you solve

The discriminant is the part under the square root, D = b² − 4ac. It tells you how many real solutions exist before you finish solving:

  • D > 0: two different real solutions. The parabola crosses the x-axis twice.
  • D = 0: exactly one real solution (a repeated root). The parabola just touches the x-axis.
  • D < 0: no real solutions. The parabola never touches the x-axis; the solutions are complex numbers.

Example: x² + 2x + 5 = 0 has D = 4 − 20 = −16, so it has no real solutions — do not waste time hunting for factors that do not exist. Checking the discriminant first saves you from factoring a quadratic that cannot be factored over the real numbers.

Which method should you pick?

Use factoring when the numbers are small integers and you can spot the factor pair quickly — it is the fastest route and the one most tests reward. Use completing the square when the question asks for the vertex form of a parabola, or when the equation has an odd x coefficient that makes factoring awkward. Use the quadratic formula when factoring is not obvious, when the coefficients are fractions or decimals, or when you are unsure: it always works, and it doubles as a check on your factoring.

A good exam habit: solve by factoring, then verify with the formula. If both agree, the answer is almost certainly right. If they disagree, the formula version is usually the one to trust while you hunt for the factoring slip.

Common mistakes (and how to avoid them)

  • Sign errors: the most common mistake in all three methods. When b or c is negative, write the minus sign explicitly at every step, and check your answer by substituting it back.
  • Forgetting the ±: taking a square root gives two values. Writing only the positive root loses half the answer — and half the marks.
  • Dividing by zero or by x: never divide both sides by x, because x might be zero and you would lose a solution. Factor x out instead: x² − 3x = 0 becomes x(x − 3) = 0, giving x = 0 or x = 3.
  • Skipping standard form: the formula only works when the equation equals zero. Move everything to one side first, or a, b, and c will be wrong.
  • Forgetting to check: substitution takes ten seconds and catches almost every slip. Make it non-negotiable.

Related skills build on this one: the inequality solver handles quadratic inequalities, the simplify calculator tidies messy expressions before you factor, and the logarithm calculator covers the log equations that often follow quadratics in a course.

Practice problems (answers below)

  1. Solve x² − 7x + 12 = 0 by factoring.
  2. Solve x² + 4x − 5 = 0 by completing the square.
  3. Solve 3x² − 2x − 8 = 0 using the quadratic formula.
  4. How many real solutions does x² + 6x + 10 = 0 have? Use the discriminant.
  5. Solve x² − 9 = 0. (Hint: this is a difference of squares.)
A young student writing math equations in a notebook at a school desk

Answers

  1. x = 3 or x = 4, since (x − 3)(x − 4) = 0.
  2. x = 1 or x = −5. Completing the square: (x + 2)² = 9, so x + 2 = 3 or x + 2 = −3.
  3. x = 2 or x = −4/3. Discriminant: 4 + 96 = 100, so x = (2 ± 10) / 6.
  4. None: D = 36 − 40 = −4, which is less than zero, so there are no real solutions.
  5. x = 3 or x = −3, since (x − 3)(x + 3) = 0.

If you missed more than one, go back to the matching method above and work three more problems like it before moving on. Quadratics repay repetition: the method that feels slow today is the one you will do in your sleep by exam week.

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