Quadratic Equation Solver: Step-by-Step Guide with Formula Derivation

By Risetop Team · April 10, 2025 · 12 min read

Quadratic equations appear everywhere in mathematics, physics, engineering, economics, and computer science. Whether you're calculating the trajectory of a projectile, optimizing profit, or finding the dimensions of a rectangle with a given area, you'll encounter them. This guide covers everything: the standard form, three solving methods (factoring, completing the square, and the quadratic formula), the meaning of the discriminant, and a full derivation of why the quadratic formula works. Use our free quadratic equation solver to check your work or get instant answers.

What Is a Quadratic Equation?

A quadratic equation is any equation that can be written in the standard form:

ax² + bx + c = 0   (where a ≠ 0)

The term ax² is what makes it "quadratic" — the highest power of x is 2 (the Latin word quadratus means "square"). The coefficient a is called the leading coefficient, b is the linear coefficient, and c is the constant term.

A quadratic equation always has exactly two solutions (called roots), though they may be equal to each other, real, or complex. The graph of a quadratic function is a parabola — a U-shaped curve. When a > 0, the parabola opens upward; when a < 0, it opens downward.

Method 1: Factoring

Factoring is the fastest method when it works. The idea is to rewrite the quadratic as a product of two binomials set equal to zero.

x² + 5x + 6 = 0
(x + 2)(x + 3) = 0
x = −2 or x = −3

How to factor: Find two numbers that multiply to give c and add to give b. In the example above, 2 × 3 = 6 and 2 + 3 = 5. The signs match the signs in the equation.

Factoring works best when the equation has integer roots. For non-integer roots or irrational roots, you'll need another method. Our quadratic solver always works, regardless of root type.

Method 2: Completing the Square

Completing the square transforms the quadratic into a perfect square trinomial, making it easy to solve. It's also the technique used to derive the quadratic formula.

Example: Solve x² + 6x + 2 = 0

Step 1: Move the constant: x² + 6x = −2
Step 2: Take half of b (6/2 = 3), square it (9), add to both sides:
    x² + 6x + 9 = −2 + 9
Step 3: Factor as a perfect square:
    (x + 3)² = 7
Step 4: Take the square root of both sides:
    x + 3 = ±√7
Step 5: Solve for x:
    x = −3 ± √7 ≈ −3 ± 2.646
    x ≈ −0.354 or x ≈ −5.646

Completing the square is especially useful when a = 1 and you need to find the vertex of a parabola (the vertex form is obtained directly from this method).

Method 3: The Quadratic Formula

The quadratic formula is the universal method — it works for any quadratic equation, regardless of whether it factors cleanly or not. It's the most important formula in algebra.

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

Simply identify a, b, and c from your equation, plug them in, and compute. The ± symbol means there are two solutions: one using + and one using −.

Example: Solve 2x² − 7x + 3 = 0
a = 2, b = −7, c = 3
x = (7 ± √(49 − 24)) / 4
x = (7 ± √25) / 4
x = (7 ± 5) / 4
x₁ = 12/4 = 3   |   x₂ = 2/4 = ½

Deriving the Quadratic Formula

Understanding where the formula comes from deepens your mathematical intuition. Here's the step-by-step derivation using completing the square:

Start with the standard form:
ax² + bx + c = 0
Divide both sides by a:
x² + (b/a)x + (c/a) = 0
Move the constant to the right:
x² + (b/a)x = −c/a
Complete the square — add (b/2a)² to both sides:
x² + (b/a)x + (b/2a)² = (b/2a)² − c/a
(x + b/2a)² = b²/4a² − c/a
Combine the right side over a common denominator:
(x + b/2a)² = (b² − 4ac) / 4a²
Take the square root of both sides:
x + b/2a = ±√(b² − 4ac) / 2a
Solve for x:
x = (−b ± √(b² − 4ac)) / 2a

This derivation shows that the quadratic formula is not magic — it's a systematic application of completing the square to the general quadratic equation.

The Discriminant: Understanding the Roots

The expression under the square root in the quadratic formula, b² − 4ac, is called the discriminant (denoted Δ or D). It tells you everything about the nature of the roots without actually solving the equation:

Discriminant (D = b²−4ac)Root TypeGraph Behavior
D > 0 (positive)Two distinct real rootsParabola crosses the x-axis twice
D = 0 (zero)One repeated real root (double root)Parabola touches the x-axis at one point
D < 0 (negative)Two complex conjugate rootsParabola doesn't cross the x-axis

Additionally, when D is a perfect square (like 25, 36, or 49), the roots are rational numbers. When D is positive but not a perfect square, the roots are irrational (involving square roots). When D is negative, the roots involve the imaginary unit i = √(−1).

Examples of Each Case

D > 0: x² − 5x + 6 = 0 → D = 25 − 24 = 1 > 0 → x = 2, x = 3 (two real roots)

D = 0: x² − 6x + 9 = 0 → D = 36 − 36 = 0 → x = 3 (one repeated root)

D < 0: x² + 2x + 5 = 0 → D = 4 − 20 = −16 < 0 → x = −1 ± 2i (complex roots)

Vieta's Formulas: Relationships Between Roots and Coefficients

If the roots of ax² + bx + c = 0 are r₁ and r₂, then:

Sum of roots: r₁ + r₂ = −b/a
Product of roots: r₁ × r₂ = c/a

These relationships, known as Vieta's formulas, are incredibly useful. They let you check your answers quickly: if your computed roots don't add to −b/a and multiply to c/a, you made a calculation error. They're also the basis for constructing quadratic equations when you know the roots.

The Vertex and Axis of Symmetry

Every parabola has a vertex (its highest or lowest point) and an axis of symmetry (a vertical line through the vertex):

x-coordinate of vertex: x = −b / (2a)
Axis of symmetry: x = −b / (2a)
y-coordinate: substitute x into the original equation

For 2x² − 8x + 5 = 0: the vertex x-coordinate is −(−8)/(2×2) = 2. The y-coordinate is 2(4) − 8(2) + 5 = −3. So the vertex is at (2, −3).

Real-World Applications

Projectile Motion

The height of a projectile follows a quadratic equation: h(t) = −½gt² + v₀t + h₀. To find when the projectile hits the ground, set h = 0 and solve. The positive root gives the time of impact.

Business Optimization

Profit = Revenue − Cost. If revenue and cost are quadratic functions of production quantity, the profit equation is quadratic. The vertex of the profit parabola gives the quantity that maximizes profit.

Area Problems

A rectangle has a perimeter of 40 cm and an area of 96 cm². What are its dimensions? This leads to the quadratic equation w² − 20w + 96 = 0, giving dimensions of 8 cm × 12 cm.

Electrical Engineering

Ohm's law in AC circuits involves quadratic equations when calculating impedance with both resistance and reactance components.

Solve Any Quadratic Equation Instantly

Get roots, discriminant, vertex, and step-by-step solutions for any quadratic.

Open Quadratic Solver →

Tips for Solving Quadratic Equations

  1. Always check a ≠ 0. If a = 0, the equation is linear, not quadratic. Solve bx + c = 0 directly.
  2. Try factoring first. If the roots are integers, factoring is faster than the formula. Look for patterns: difference of squares (a² − b²), perfect square trinomials (a² ± 2ab + b²).
  3. Verify with Vieta's formulas. After finding roots, check that their sum is −b/a and product is c/a.
  4. Simplify before using the formula. If all coefficients share a common factor, divide it out first. For 6x² − 4x − 2 = 0, divide by 2 to get 3x² − 2x − 1 = 0.
  5. Check the discriminant first. Computing D = b² − 4ac before the full formula tells you what to expect and can save time on exam questions that ask only about root type.

Frequently Asked Questions

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b²−4ac)) / 2a, where a, b, and c are the coefficients from the standard form ax² + bx + c = 0. It provides both solutions to any quadratic equation, whether the roots are real, repeated, or complex. This formula works universally — no quadratic equation can defeat it.

What does the discriminant tell us?

The discriminant (D = b² − 4ac) reveals the nature of the roots without solving. If D > 0, there are two distinct real roots. If D = 0, there is one repeated real root. If D < 0, there are two complex conjugate roots (involving imaginary numbers). If D is a perfect square, the real roots are rational; otherwise, they're irrational.

How do you derive the quadratic formula?

Start with ax² + bx + c = 0. Divide by a to get x² + (b/a)x = −c/a. Complete the square by adding (b/2a)² to both sides, giving (x + b/2a)² = (b²−4ac)/4a². Take the square root: x + b/2a = ±√(b²−4ac)/2a. Subtract b/2a from both sides to get x = (−b ± √(b²−4ac))/2a.

Can a quadratic equation have only one solution?

Yes — when the discriminant equals zero, both roots are the same value, giving a "double root" or "repeated root." The parabola touches the x-axis at exactly one point (the vertex is on the x-axis). For example, x² − 6x + 9 = 0 has the single solution x = 3, which is a double root.

What is the difference between real and complex roots?

Real roots are numbers on the standard number line (positive, negative, or zero). Complex roots involve the imaginary unit i = √(−1) and take the form a + bi. A quadratic equation has complex roots when the discriminant is negative — the parabola doesn't intersect the x-axis. Complex roots always come in conjugate pairs: if a + bi is a root, so is a − bi.

Quadratic equations are a cornerstone of algebra and appear throughout science and engineering. Master the three solving methods, understand the discriminant, and you'll be equipped to handle virtually any problem involving quadratics. For quick, accurate solutions, bookmark our quadratic equation solver.