How to Solve for X in a Quadratic Equation Step by Step

Solving for x in a quadratic equation means finding the value (or values) of x that make the equation true. Every quadratic equation can have up to two solutions, and there are three main methods to find them: factoring, completing the square, and the quadratic formula. Which method you choose depends on the equation in front of you, but the quadratic formula works on every quadratic equation without exception.

The Standard Form

Before you can solve anything, your equation needs to be in standard form:

ax² + bx + c = 0

Here, a, b, and c are just numbers (called coefficients), and x is the variable you’re solving for. The one rule is that a cannot be zero. If it were, the x² term would disappear and you’d have a regular linear equation, not a quadratic. So if your equation looks like 3x² + 5x = 12, your first step is to subtract 12 from both sides to get 3x² + 5x − 12 = 0. Now a = 3, b = 5, and c = −12, and you’re ready to solve.

Solving by Factoring

Factoring is the fastest method when it works. The idea is to rewrite the quadratic expression as two smaller expressions multiplied together, then use a simple rule called the zero product property: if two things multiplied together equal zero, at least one of them must be zero.

Here’s how it works step by step. Take the equation x² + 5x + 6 = 0. You need two numbers that multiply to 6 and add to 5. Those numbers are 2 and 3, so you rewrite the equation as (x + 2)(x + 3) = 0. Now apply the zero product property: either x + 2 = 0 or x + 3 = 0. Solving each gives you x = −2 and x = −3. Those are your two solutions.

For an equation like 3x² − 14x + 8 = 0, the factoring gets trickier because a isn’t 1. You’d factor it as (3x − 2)(x − 4) = 0, giving you x = 2/3 and x = 4. When the numbers don’t break apart neatly, factoring becomes impractical, and you’re better off using the quadratic formula.

The Quadratic Formula

The quadratic formula solves any equation in the form ax² + bx + c = 0:

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

This is often written more compactly with a ± symbol: x = (−b ± √(b² − 4ac)) / 2a. The ± just means you calculate it twice, once with addition and once with subtraction, to get both solutions.

Let’s solve 2x² + 3x − 5 = 0. Here a = 2, b = 3, and c = −5. Plug them in: x = (−3 ± √(9 − 4(2)(−5))) / (2 · 2). That simplifies to x = (−3 ± √(9 + 40)) / 4, which is x = (−3 ± √49) / 4. Since √49 = 7, your two solutions are x = (−3 + 7) / 4 = 1 and x = (−3 − 7) / 4 = −2.5.

Completing the Square

Completing the square is a method that transforms your equation into a perfect square on one side, making it easy to solve with a square root. It’s also the method used to derive the quadratic formula itself, so understanding it gives you insight into why the formula works.

Take x² + 10x + 24 = 0. First, move the constant to the right side: x² + 10x = −24. Next, take half the coefficient of x (half of 10 is 5), square it (25), and add it to both sides: x² + 10x + 25 = 1. The left side is now a perfect square: (x + 5)² = 1. Take the square root of both sides: x + 5 = ±1. So x = −5 + 1 = −4 or x = −5 − 1 = −6.

If the coefficient of x² isn’t 1, divide the entire equation by that coefficient first. For example, with 3x² + 12x + 9 = 0, divide everything by 3 to get x² + 4x + 3 = 0 before proceeding.

How the Discriminant Tells You What to Expect

The expression under the square root in the quadratic formula, b² − 4ac, is called the discriminant. Before you even finish solving, it tells you how many solutions to expect:

  • Positive discriminant: two distinct real solutions. The parabola crosses the x-axis at two points.
  • Discriminant equals zero: one repeated real solution. The parabola just touches the x-axis at its vertex.
  • Negative discriminant: no real solutions. The parabola never crosses the x-axis. The solutions involve imaginary numbers, which use the symbol i (where i = √(−1)). If you’re in an algebra class that hasn’t introduced imaginary numbers yet, a negative discriminant simply means “no real answer.”

Checking the discriminant first can save you time. If it’s negative and you only need real solutions, you can stop right there.

What Solutions Look Like on a Graph

Every quadratic equation corresponds to a U-shaped curve called a parabola. When you solve for x, you’re finding the points where that curve crosses the horizontal axis. These crossing points are called x-intercepts, roots, or zeros, and they’re all the same thing: the x-values where y equals zero.

The axis of symmetry of the parabola always falls exactly halfway between the two solutions, at x = −b / 2a. This means if you know one root, you can use the axis of symmetry to find the other. It also explains why the quadratic formula has that ± structure: the two roots are symmetric around the midpoint −b / 2a, with the square root term determining how far each root sits from that center.

A Practical Example: Projectile Motion

One of the most common real-world uses of quadratic equations is modeling projectile motion. When you throw a ball into the air, its height at any given time t can be described by a quadratic equation of the form height = at² + bt + c, where gravity, launch speed, and starting height determine the coefficients. Solving for t when height equals zero tells you when the ball hits the ground.

For instance, if a ball’s height is modeled by h = −16t² + 56t, setting h = 0 gives you −16t² + 56t = 0. Factoring out t: t(−16t + 56) = 0. So t = 0 (the moment you threw it) or t = 3.5 seconds (when it lands). The same math underlies satellite launches, engineering calculations, and even GPS-equipped police projectiles used to track vehicles.

Common Mistakes to Avoid

A few errors come up repeatedly when students use the quadratic formula. The most frequent is forgetting to negate b. If b = −7, then −b = 7, not −7. A related mistake is squaring b incorrectly: (−7)² is positive 49, not −49. Squaring always produces a positive result.

Another common error is dropping the ± symbol, which means you only find one solution instead of two. Every quadratic can have two solutions, and the ± is what produces both of them. Finally, always simplify your square roots when possible. If you end up with √50, rewrite it as 5√2. Leaving roots unsimplified isn’t technically wrong, but most instructors expect the cleanest form.

One last tip: always put your equation in standard form (everything on one side, set equal to zero) before identifying a, b, and c. Pulling coefficients from an equation that hasn’t been rearranged is one of the fastest ways to get the wrong answer.