How to Solve Quadratic Equations (Step by Step)
A quadratic equation is any equation of the form ax² + bx + c = 0, and every one of them can be solved with the quadratic formula: x = (−b ± √(b² − 4ac)) / 2a. This guide works through the formula step by step — x² − 5x + 6 = 0 has roots 2 and 3 — then explains the discriminant, complex roots, the vertex of a parabola, and when factoring is faster than the formula.
Free calculator
Try the free Quadratic Formula Calculator →
Solve any quadratic equation with full step-by-step working — roots, discriminant and vertex included.
Solve my quadratic freeWhat Is a Quadratic Equation?
A quadratic equation is an equation where the highest power of the unknown is 2. Its standard form is ax² + bx + c = 0, where a, b and c are numbers and a is not zero — if a were zero, the x² term would vanish and you would be left with a linear equation. The word "quadratic" comes from the Latin quadratus, meaning square, because the defining feature is the squared term.
Solving a quadratic means finding the values of x that make the equation true. Those values are called the roots, solutions, or zeros — three names for the same thing. A quadratic has at most two roots, because its graph is a parabola, a U-shaped (or upside-down U-shaped) curve, and a parabola can cross the x-axis at most twice. The roots are exactly the x-coordinates where the curve crosses the axis. That picture is worth keeping in mind throughout this guide: every algebraic step has a visual meaning, and the Graphing Calculator can show you the parabola for any equation here.
Quadratics show up far beyond the classroom. The height of a thrown ball over time follows a quadratic, because gravity accelerates it downward at a steady rate. The area of a rectangle with a fixed perimeter is a quadratic in the side length. Profit as a function of price is often modelled as a quadratic. Whenever something rises and then falls — or falls and then rises — a quadratic is usually hiding underneath. If you want to check your own answers as you read, the Quadratic Formula Calculator shows the full working for any values of a, b and c.
The Quadratic Formula, Step by Step
The quadratic formula solves every quadratic equation, no exceptions: x = (−b ± √(b² − 4ac)) / 2a. The ± sign is the reason there are two roots — you compute the expression once with a plus and once with a minus. Here is the formula applied step by step to x² − 5x + 6 = 0.
Step 1: identify a, b and c. Compare x² − 5x + 6 = 0 with ax² + bx + c = 0. The coefficient of x² is 1, so a = 1. The coefficient of x is −5, so b = −5. The constant term is 6, so c = 6. Watch the signs: b is −5, not 5 — sign errors here are the most common mistake in the whole topic.
Step 2: compute the discriminant. The expression under the square root, b² − 4ac, is called the discriminant. Here it is (−5)² − 4 × 1 × 6 = 25 − 24 = 1. Its square root is 1, which makes this a friendly example.
Step 3: substitute into the formula. x = (−(−5) ± √1) / (2 × 1) = (5 ± 1) / 2. The double negative matters: −b means −(−5), which is +5.
Step 4: split into two roots. With the plus sign: x = (5 + 1) / 2 = 6 / 2 = 3. With the minus sign: x = (5 − 1) / 2 = 4 / 2 = 2. So the roots are x = 3 and x = 2.
Step 5: check by substitution. Put x = 3 back in: 3² − 5 × 3 + 6 = 9 − 15 + 6 = 0. Put x = 2 back in: 2² − 5 × 2 + 6 = 4 − 10 + 6 = 0. Both check out. Substitution takes ten seconds and catches almost every arithmetic slip — make it a habit, and use the Scientific Calculator for the square roots when the numbers are not as tidy as these.
| Step | Working for x² − 5x + 6 = 0 | Result |
|---|---|---|
| 1. Identify a, b, c | a = 1, b = −5, c = 6 | — |
| 2. Discriminant | (−5)² − 4 × 1 × 6 = 25 − 24 | 1 |
| 3. Substitute | x = (5 ± √1) / 2 | — |
| 4. Two roots | (5 + 1) / 2 and (5 − 1) / 2 | x = 3, x = 2 |
| 5. Check | 9 − 15 + 6 = 0 and 4 − 10 + 6 = 0 | Both pass |
The Discriminant: Know the Answer Before You Solve
The discriminant, b² − 4ac, is the part of the formula under the square root, and its sign tells you what kind of roots to expect before you finish the calculation. It is the fastest diagnostic in algebra: one number, three possible stories.
Positive discriminant: two distinct real roots. The parabola crosses the x-axis twice. Our first example, x² − 5x + 6 = 0, has a discriminant of 1 and two real roots, 3 and 2. The larger the discriminant, the further apart the roots sit.
Zero discriminant: one repeated real root. The parabola just touches the x-axis at its vertex and turns back. Take x² − 6x + 9 = 0: the discriminant is (−6)² − 4 × 1 × 9 = 36 − 36 = 0, so the formula gives x = (6 ± 0) / 2 = 3. Both signs give the same answer, which is why it is called a repeated (or double) root. Notice the equation factors as (x − 3)² = 0 — a perfect square, which is always the case when the discriminant is zero.
Negative discriminant: two complex roots, no real roots. The parabola never touches the x-axis at all. Take x² + 4x + 5 = 0: the discriminant is 4² − 4 × 1 × 5 = 16 − 20 = −4, and the square root of a negative number is not a real number. The roots are x = (−4 ± √−4) / 2 = −2 + i and −2 − i, where i is the imaginary unit. The next section explains what that means.
| Discriminant b² − 4ac | Roots | Graph | Example |
|---|---|---|---|
| Positive (1) | Two distinct real roots | Crosses the x-axis twice | x² − 5x + 6 = 0 → x = 3, 2 |
| Zero (0) | One repeated real root | Touches the x-axis at the vertex | x² − 6x + 9 = 0 → x = 3 |
| Negative (−4) | Two complex roots | Never touches the x-axis | x² + 4x + 5 = 0 → x = −2 ± i |
The discriminant is also a useful sanity check. If you expect two real roots and get a negative discriminant, you have probably made a sign error in b² − 4ac — the most common slip is forgetting that b² is always positive even when b is negative, or that −4ac flips sign when a and c have opposite signs.
What Is a Complex Root?
When the discriminant is negative, the formula asks for the square root of a negative number. No real number squared gives a negative result, so mathematicians extended the number system with the imaginary unit i, defined by i² = −1. A complex number has a real part and an imaginary part, written a + bi. The roots of x² + 4x + 5 = 0 are −2 + i and −2 − i: a real part of −2 and an imaginary part of ±1.
Complex roots always come in conjugate pairs — the same real part, with opposite signs on the imaginary part. That is not a coincidence: the ± in the quadratic formula guarantees it whenever the coefficients are real numbers. You can check the pair by substitution, remembering that i² = −1. For x = −2 + i: x² = 4 − 4i + i² = 3 − 4i; then x² + 4x + 5 = (3 − 4i) + (−8 + 4i) + 5 = 0. The imaginary parts cancel exactly, which is how a "complex" answer satisfies a real equation.
It is natural to ask whether complex roots are "real" in any practical sense. For a physical problem like a ball's flight, a complex root means the event never happens — the ball never reaches that height, or the equation has no physical solution. But complex numbers are far from a curiosity: they are essential in electrical engineering, signal processing and quantum mechanics, where oscillating systems are described with them. For most school and everyday purposes, the right reading of a negative discriminant is simple: the equation has no real solutions, and its graph never crosses the x-axis. The quadratic formula still gives you the complete answer; the complex roots are the full story, not a failure.
The Vertex of a Parabola
The vertex is the turning point of the parabola: its lowest point if a is positive (the curve opens upward) and its highest point if a is negative (it opens downward). It is often the most useful point on the graph, because it tells you the maximum or minimum value the quadratic can reach.
The x-coordinate of the vertex is given by h = −b / 2a — the same −b/2a that sits at the centre of the quadratic formula, which makes sense: the vertex is exactly halfway between the two roots. The y-coordinate is found by putting h back into the equation. For y = x² − 4x + 3, the vertex is at h = 4 / 2 = 2, and k = 2² − 4 × 2 + 3 = 4 − 8 + 3 = −1. So the vertex is (2, −1), and since a = 1 is positive, −1 is the minimum value of the function. In vertex form, the equation is written y = (x − 2)² − 1, which shows the vertex directly: the squared term is zero when x = 2, leaving y = −1.
The vertex is also the axis of symmetry: the vertical line x = 2 divides the parabola into mirror-image halves. That symmetry is why the two roots of a quadratic are always equidistant from the vertex's x-coordinate. For x² − 5x + 6 = 0, the roots 2 and 3 are both 0.5 away from the vertex x-coordinate of 2.5. If you ever find two roots that are not symmetric around −b/2a, one of them is wrong — another free check. The Slope Calculator can help you work with the straight lines that meet the parabola, such as the axis of symmetry itself.
When to Factor Instead of Using the Formula
The quadratic formula always works, but factoring is faster when the numbers cooperate. Factoring means rewriting ax² + bx + c as a product of two brackets, (x + p)(x + q), and then reading the roots straight off: x = −p or x = −q. It works when you can find two numbers that add to b and multiply to c (for a = 1).
Take x² + 7x + 12 = 0. You need two numbers that add to 7 and multiply to 12. The factor pairs of 12 are 1 and 12, 2 and 6, and 3 and 4 — and 3 + 4 = 7, so the factors are (x + 3)(x + 4) = 0, giving roots x = −3 and x = −4. That took seconds, with no square roots. The discriminant confirms it: 49 − 48 = 1, a perfect square, which is the tell-tale sign that an equation factors neatly over the integers.
So which method should you choose? Factor first when a = 1 and c has few factor pairs — a quick scan of the factor pairs usually settles it in under a minute. Use the formula when the numbers are large, when a is not 1, when the discriminant is not a perfect square, or when you need an exact answer in surd form. Complete the square — the method the formula itself is derived from — when you need the vertex form, because it produces the vertex directly. And for equations that are already in the form x² = k, just take the square root of both sides and remember the ±. No single method is "best"; the skill is picking the quickest one for the equation in front of you. If you are working with straight lines alongside your quadratics, the Linear Equation Calculator handles the linear half of the problem.
A Real-World Example: The Thrown Ball
Here is a quadratic doing real work. A ball is thrown upward from a platform 5 feet high, with an initial upward speed of 32 feet per second. Its height after t seconds is h(t) = −16t² + 32t + 5, where the −16t² term comes from gravity pulling it down (half of 32 ft/s², the acceleration due to gravity). Two natural questions follow: how high does it go, and when does it hit the ground?
The maximum height is the vertex. The time of the vertex is t = −b / 2a = −32 / (2 × −16) = 1 second. The height then is h(1) = −16 + 32 + 5 = 21 feet. Because a is negative, the parabola opens downward and the vertex is a maximum — the ball peaks at 21 feet after one second, then falls.
The landing time is a root: set h(t) = 0 and solve −16t² + 32t + 5 = 0. The discriminant is 32² − 4 × (−16) × 5 = 1024 + 320 = 1344, and √1344 ≈ 36.66. The formula gives t = (−32 ± 36.66) / (−32). The plus branch gives (−32 + 36.66) / (−32) = −0.15 seconds — before the throw, so it has no physical meaning here. The minus branch gives (−32 − 36.66) / (−32) = 2.15 seconds. The ball hits the ground about 2.15 seconds after the throw. Notice that the equation has two mathematical answers but only one physical one: in applied problems, always ask which root the situation allows.
| Question | Method | Answer |
|---|---|---|
| When is the ball highest? | Vertex time, t = −b / 2a | 1.00 s |
| How high does it go? | h(1) = −16 + 32 + 5 | 21 ft |
| When does it land? | Root of −16t² + 32t + 5 = 0 | 2.15 s |
| Other root | t = (−32 + 36.66) / (−32) | −0.15 s (before the throw) |
The same structure — a quadratic, a vertex, a root — describes any projectile, from a basketball free throw to a rocket's ascent. The numbers change; the method does not. And the geometry behind it is worth a look too: parabolas are curves, and the ideas of shape, distance and angle that surround them are covered in our geometry guide.
Common Mistakes When Solving Quadratics
Sign errors on b. In x² − 5x + 6 = 0, b is −5, so −b is +5 and b² is 25. Writing b = 5 flips the sign of every root. Always copy the sign with the coefficient.
Forgetting the ±. The formula has two roots because of the ±. Dropping it halves your answer and loses a root — usually the one the question actually asks for.
Dividing only part of the numerator by 2a. The whole expression (−b ± √discriminant) is divided by 2a. Writing −b ± √discriminant / 2a changes the answer completely. Keep the brackets.
Setting each factor to zero incorrectly. From (x + 3)(x + 4) = 0, the roots are x = −3 and x = −4 — the signs flip. If x + 3 = 0 then x = −3, not +3.
Stopping at a negative discriminant. A negative discriminant is an answer, not a dead end: it means two complex roots and a graph that never crosses the x-axis. Report the complex roots, or state clearly that there are no real solutions.
Not checking. Substitution takes seconds and catches sign errors, arithmetic slips and dropped factors. Every worked example in this guide was checked that way, and every answer you produce should be too.
Sources: all figures in this guide were recomputed in Python from the equations stated in the text (roots, discriminants, vertex coordinates and the projectile example). The ball example uses g = 32 ft/s². Last reviewed: 15 November 2026.
Frequently Asked Questions
What is a quadratic equation?
A quadratic equation is an equation where the highest power of the unknown is 2, written in standard form as ax² + bx + c = 0 with a not equal to zero. Its graph is a parabola, and its solutions — the roots — are the x-values where the parabola crosses the x-axis. It has at most two roots.
How does the quadratic formula work?
The formula x = (−b ± √(b² − 4ac)) / 2a gives both roots directly from the coefficients a, b and c. For x² − 5x + 6 = 0, a = 1, b = −5 and c = 6, so x = (5 ± 1) / 2, giving roots 3 and 2. Always check by substituting each root back into the equation.
What does the discriminant tell you?
The discriminant, b² − 4ac, tells you the type of roots before you finish solving. If it is positive, there are two distinct real roots; if it is zero, there is one repeated real root; if it is negative, there are two complex roots and no real ones. In this guide the three cases are 1, 0 and −4.
What is a complex root?
A complex root involves the imaginary unit i, defined by i² = −1. The equation x² + 4x + 5 = 0 has the complex roots −2 + i and −2 − i, a conjugate pair. Complex roots mean the parabola never crosses the x-axis, so the equation has no real solutions.
What is the vertex of a parabola?
The vertex is the turning point of the parabola: its lowest point when a is positive, its highest when a is negative. Its x-coordinate is −b / 2a. For y = x² − 4x + 3 the vertex is (2, −1), and the vertex form is y = (x − 2)² − 1.
When should I factor instead of using the quadratic formula?
Factor when a = 1 and the constant term has few factor pairs, so you can quickly find two numbers that add to b and multiply to c. For x² + 7x + 12 = 0, 3 and 4 add to 7 and multiply to 12, so it factors as (x + 3)(x + 4) = 0. Use the formula when the numbers are large or the discriminant is not a perfect square.
Last updated: