The quadratic formula is one of the most useful tools in algebra. Give it any quadratic equation of the form ax² + bx + c = 0, and it returns the solutions for x in one step. It works every time. It always gives you both roots. But what makes it especially beautiful is that it does not come out of nowhere — it is completing the square written out once and applied to the general case.
The formula itself
For ax² + bx + c = 0 (with a ≠ 0):
x = (−b ± √(b² − 4ac)) / (2a)
The ± means there are usually two solutions. They can be two real numbers, one repeated real number, or two complex numbers depending on the discriminant (the expression under the square root, b² − 4ac).
- Discriminant > 0: two distinct real roots
- Discriminant = 0: one repeated real root
- Discriminant < 0: two complex roots (real parts plus imaginary parts)
A worked example
Solve 2x² + 7x + 3 = 0.
a = 2, b = 7, c = 3.
Discriminant: b² − 4ac = 49 − 24 = 25.
√25 = 5.
x = (−7 ± 5) / 4 = −2/4 or −12/4 = −1/2 or −3.
Check: 2(−1/2)² + 7(−1/2) + 3 = 2(1/4) − 7/2 + 3 = 0.5 − 3.5 + 3 = 0. ✓
And: 2(−3)² + 7(−3) + 3 = 18 − 21 + 3 = 0. ✓
Deriving the formula
Here is how the quadratic formula is built from a generic equation. If you understand this, you never have to memorize it — you can reconstruct it on demand.
Start: ax² + bx + c = 0.
Step 1. Divide through by a:
x² + (b/a)x + c/a = 0
Step 2. Move c/a to the other side:
x² + (b/a)x = −c/a
Step 3. Complete the square. To do that, take half of the x coefficient and square it, then add to both sides.
Half of (b/a) is b/(2a). Squared is b²/(4a²).
x² + (b/a)x + b²/(4a²) = −c/a + b²/(4a²)
Step 4. The left side is now a perfect square:
(x + b/(2a))² = −c/a + b²/(4a²)
Step 5. Make the right side a single fraction. Multiply −c/a by 4a/4a to get common denominator 4a²:
(x + b/(2a))² = (b² − 4ac) / (4a²)
Step 6. Take the square root of both sides. This introduces the ± because a square root has two solutions:
x + b/(2a) = ±√(b² − 4ac) / (2a)
Step 7. Solve for x:
x = −b/(2a) ± √(b² − 4ac) / (2a) = (−b ± √(b² − 4ac)) / (2a)
That is the quadratic formula. Every step is either algebra you already know or completing the square, applied once to the general case.
The discriminant as a diagnostic
Before running the full formula, compute b² − 4ac first. It tells you the nature of the solutions:
- Positive: you will get two different real numbers. Graphically, the parabola crosses the x-axis at two points.
- Zero: you will get one repeated real number. Parabola touches the x-axis at one point (vertex on axis).
- Negative: you will get complex numbers (real part plus imaginary part). Parabola does not cross the x-axis at all.
Sometimes only the discriminant is asked for — “does this equation have real solutions?” Just check the discriminant.
When the quadratic formula is overkill
If the quadratic factors cleanly, factoring is faster:
x² + 5x + 6 = 0 → (x + 2)(x + 3) = 0 → x = −2 or x = −3.
Try factoring first when a = 1 and the numbers are small integers. If factoring is not obvious in 30 seconds, switch to the formula.
When the quadratic formula is essential
- Irrational solutions (e.g., x = (−1 + √5) / 2, the golden ratio).
- Complex roots.
- Nontrivial coefficients that will not factor cleanly.
- Programmatic solving — the formula is deterministic and always works.
Common applications
Projectile motion
A ball thrown upward at velocity v from height h follows y = h + vt − (1/2)gt², where g is gravity. To find when the ball hits the ground (y = 0), solve a quadratic in t. The two roots are the times the ball would have been at ground level — one in the past (often negative), one in the future.
Area problems
“A rectangular garden has an area of 144 m² and a perimeter of 50 m. Find the dimensions.” Let length = x. Then width = (50 − 2x) / 2 = 25 − x. Area: x(25 − x) = 144 → x² − 25x + 144 = 0. Solve with the quadratic formula.
Physics and engineering
Kinematic equations, circuit analysis, and countless other applied math problems reduce to solving quadratics. The formula is the general-purpose solver.
Finance
Pricing of options and compound growth problems can involve quadratic equations. When compound interest is written out over multiple periods with additional contributions, the resulting equations often factor into quadratic form at specific time points.
The vertex form shortcut
A related useful form: if you have ax² + bx + c = 0, the vertex of the parabola is at x = −b/(2a). This is the x-coordinate directly between the two roots (since the parabola is symmetric). You can often answer questions about “max/min of this quadratic” faster using the vertex formula than by running the whole quadratic formula.
Example: profit P = −x² + 10x − 16. Maximum profit occurs at x = −10 / (2 × −1) = 5. Substitute back: P = −25 + 50 − 16 = 9. Maximum profit is 9 units when x = 5. Done, no quadratic formula needed.
Checking your work
After solving, always substitute back into the original equation. If x = 4 is a claimed root of x² − 7x + 12 = 0, plug in: 16 − 28 + 12 = 0. Yes. Check the other root (x = 3): 9 − 21 + 12 = 0. Yes. Both roots confirmed in under 10 seconds.
This catches arithmetic errors more reliably than re-running the quadratic formula.
Compute it
Our quadratic equation calculator takes a, b, c and returns both roots plus the discriminant. Useful for homework, sanity-checking algebra, and situations where the arithmetic is ugly. Understand the derivation once; use the calculator afterward. The math is the mental model; the tool is the speed.