Quadratic Formula Calculator
Solves quadratic equations ax² + bx + c = 0 using the quadratic formula. Shows discriminant, root type, both roots (real or complex), axis of symmetry, vertex, and step-by-step working. Accepts fractional or decimal coefficients.
What Is a Quadratic Equation?
A quadratic equation is any polynomial equation of degree 2. Written in standard form:
ax² + bx + c = 0
where a, b, and c are real-number constants and a ≠ 0. When a = 0, the equation degenerates to a linear equation (bx + c = 0), which has a fundamentally different structure. The three coefficients are:
- a — the quadratic (leading) coefficient: determines whether the parabola opens upward (a > 0) or downward (a < 0)
- b — the linear coefficient: controls horizontal shift of the parabola's axis of symmetry
- c — the constant term: the y-intercept of the parabola (where it crosses the vertical axis)
Quadratic equations appear throughout mathematics, physics, engineering, and economics — from calculating projectile flight paths to maximising profit functions in business.
The Quadratic Formula
The quadratic formula provides a direct, always-applicable solution for x:
x = (−b ± √(b² − 4ac)) / (2a)
The ± symbol means there are potentially two roots. When the discriminant (b² − 4ac) is positive, these are two distinct values. When it's zero, both roots are identical. When it's negative, the roots are complex numbers.
Understanding the Discriminant
The discriminant D = b² − 4ac is the expression under the square root sign. It completely determines the nature of the solutions before you solve the equation:
| D value | Root type | Geometric meaning |
|---|---|---|
| D > 0 | Two distinct real roots | Parabola crosses x-axis twice |
| D = 0 | One repeated real root | Parabola touches x-axis at one point (vertex) |
| D < 0 | Two complex roots | Parabola doesn't cross x-axis |
This is why checking the discriminant first is standard practice — it tells you whether to expect real or imaginary answers and how many distinct roots to find.
Derivation from Completing the Square
The quadratic formula is derived by completing the square on the general form:
1. Start with: ax² + bx + c = 0
2. Divide by a: x² + (b/a)x + c/a = 0
3. Move c to the right: x² + (b/a)x = −c/a
4. Complete the square (add (b/2a)² to both sides): x² + (b/a)x + (b/2a)² = (b/2a)² − c/a
5. Factor left side: (x + b/2a)² = (b² − 4ac) / 4a²
6. Take square roots: x + b/2a = ±√(b² − 4ac) / 2a
7. Solve for x: x = (−b ± √(b² − 4ac)) / 2a
Understanding this derivation makes completing the square — a useful technique in its own right — feel natural rather than arbitrary.
The Parabola, Axis of Symmetry, and Vertex
The graph of y = ax² + bx + c is a parabola — a U-shaped curve. Three key geometric features:
Axis of symmetry: The vertical line x = −b/(2a) divides the parabola into two mirror-image halves. The two roots are always equidistant from this line.
Vertex: The turning point of the parabola, located at coordinates (−b/2a, c − b²/4a). When the parabola touches but doesn't cross the x-axis (D = 0), the vertex is exactly on the x-axis.
Direction of opening: When a > 0, the parabola opens upward (vertex is the minimum point). When a < 0, it opens downward (vertex is the maximum point).
Worked Examples
Example 1: Two distinct real roots
Equation: x² − 5x + 6 = 0 (a=1, b=−5, c=6)
- D = (−5)² − 4(1)(6) = 25 − 24 = 1
- x₁ = (5 + √1) / 2 = 6/2 = 3
- x₂ = (5 − √1) / 2 = 4/2 = 2
- Verification: 3² − 5(3) + 6 = 9 − 15 + 6 = 0 ✓
Example 2: One repeated root
Equation: x² − 4x + 4 = 0 (a=1, b=−4, c=4)
- D = (−4)² − 4(1)(4) = 16 − 16 = 0
- x = −(−4) / (2×1) = 4/2 = 2 (both roots equal 2)
- This is a perfect square: (x − 2)² = 0
Example 3: Complex roots
Equation: x² + x + 1 = 0 (a=1, b=1, c=1)
- D = 1² − 4(1)(1) = 1 − 4 = −3
- x = (−1 ± √−3) / 2 = −0.5 ± (√3/2)i
- x₁ = −0.5 + 0.866i, x₂ = −0.5 − 0.866i
Real-World Applications
Projectile motion: The height h of an object at time t is h = −½gt² + v₀t + h₀ — a quadratic in t. Setting h = 0 and solving gives the time of landing. For example, a ball thrown upward at 20 m/s from h₀ = 2 m follows h = −4.9t² + 20t + 2 = 0; the quadratic formula gives the precise landing time.
Optimisation: Finding the maximum area of a rectangle with a fixed perimeter, or the revenue-maximising price given a linear demand curve, both produce quadratic equations. The vertex gives the optimal value directly.
Engineering: Stress analysis, circuit impedance, and fluid velocity profiles all involve quadratic relationships. For related power calculations, see our Exponent Calculator.
Finance: Break-even analysis and present value calculations with quadratic relationships arise in investment problems.
Frequently Asked Questions
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) / (2a). It solves any equation of the form ax² + bx + c = 0 where a ≠ 0. It always works, even when factoring is not possible.
When does the quadratic equation have no real solution?
When the discriminant D = b² − 4ac is negative. The square root of a negative number is not a real number — the solutions are complex numbers involving i = √(−1).
What is completing the square?
Completing the square rewrites ax² + bx + c in the form a(x − h)² + k, where the vertex (h, k) is immediately visible. The quadratic formula itself is derived by completing the square on the general form.
How do I check if my roots are correct?
Substitute each root into ax² + bx + c. The expression should equal zero. Alternatively, the sum of the roots equals −b/a and the product equals c/a (Vieta's formulas).
What is the difference between roots and x-intercepts?
The roots of ax² + bx + c = 0 are the x-values where y = 0 — i.e., exactly the x-intercepts of the parabola y = ax² + bx + c. When D < 0, there are no real roots and no x-intercepts.
Related Resources
Related Calculators
- Exponent Calculator — Solve powers in ax^2 + bx + c.
- Fraction Calculator — Handle fractional coefficients.
External Authority Resources
- Wolfram MathWorld: Quadratic Formula — Proofs and algebraic solutions.
- Khan Academy: Solving Quadratics — Practical guide to solving ax^2 + bx + c.
Sources & Further Reading
Frequently Asked Questions
x = (−b ± √(b² − 4ac)) / (2a). It solves any equation of the form ax² + bx + c = 0 where a ≠ 0.
The discriminant D = b² − 4ac determines the nature of the roots. D > 0: two distinct real roots. D = 0: one repeated real root. D < 0: two complex roots (no real solutions).
A negative discriminant means the parabola does not cross the x-axis. The equation has two complex (imaginary) roots in the form a ± bi, where i = √(−1). There are no real number solutions.
The axis of symmetry is the vertical line x = −b/(2a). It passes through the vertex and divides the parabola symmetrically. The two roots are equidistant from this line.
Yes — enter decimal equivalents such as 0.25 for ¼, or −0.5 for −½. The calculator accepts any real number coefficients.
Substitute each root back into ax² + bx + c. Both should equal zero if the roots are correct. This is also called "checking the solution."