Quadratic Equation Calculator

Reviewed by CalcMulti Editorial Team·Last updated: February 2026

Enter the coefficients a, b, and c of a quadratic equation (ax² + bx + c = 0) to calculate its roots.

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, b, and c are real-number coefficients and a is not equal to zero. The term "quadratic" comes from the Latin word quadratus, meaning "square," because the variable is raised to the second power.

Quadratic equations appear throughout mathematics, physics, engineering, economics, and everyday problem-solving. They model projectile motion, area optimization, profit maximization, and many other scenarios where a relationship involves a squared variable.

The Quadratic Formula

The quadratic formula provides a direct way to find the solutions (roots) of any quadratic equation. It is derived by completing the square on the general form and works for all cases -- real roots, repeated roots, and complex roots.

x = (-b ± sqrt(b² - 4ac)) / (2a)

The expression under the square root, b² - 4ac, is called the discriminant and it determines the nature of the roots.

The Discriminant and Number of Solutions

The discriminant is the key to understanding how many solutions a quadratic equation has and what type they are:

  • If b² - 4ac > 0: The equation has two distinct real roots. The parabola crosses the x-axis at two points.
  • If b² - 4ac = 0: The equation has one repeated real root (also called a double root). The parabola touches the x-axis at exactly one point (the vertex).
  • If b² - 4ac < 0: The equation has two complex conjugate roots. The parabola does not cross the x-axis at all.

Checking the discriminant before solving can save time and tell you what kind of answer to expect.

Factoring vs. the Quadratic Formula

When possible, factoring is often the fastest method for solving a quadratic equation. Factoring works well when the roots are integers or simple fractions. However, many quadratic equations do not factor neatly, and in those cases the quadratic formula is the reliable fallback that always works.

Quadratic equations can also be expressed in vertex form: a(x - h)² + k = 0, where (h, k) is the vertex of the parabola. This form is especially useful for graphing and identifying the maximum or minimum value of the quadratic function.

Worked Example: Solving x² - 5x + 6 = 0

Let us solve x² - 5x + 6 = 0 using both factoring and the quadratic formula.

Method 1 -- Factoring:

Find two numbers that multiply to 6 and add to -5: those are -2 and -3.

x² - 5x + 6 = (x - 2)(x - 3) = 0

Therefore x = 2 or x = 3

Method 2 -- Quadratic Formula:

a = 1, b = -5, c = 6

Discriminant = (-5)² - 4(1)(6) = 25 - 24 = 1

x = (5 ± sqrt(1)) / 2 = (5 ± 1) / 2

x = 6/2 = 3   or   x = 4/2 = 2

Both methods yield the same roots: x = 2 and x = 3. The discriminant equals 1 (positive), confirming two distinct real roots.

Method 3: Completing the Square

Completing the square transforms any quadratic into vertex form and is the method used to derive the quadratic formula itself. It always works, even when factoring doesn't.

Solve x² + 6x + 5 = 0

Step 1: Move constant — x² + 6x = −5

Step 2: Add (b/2)² = (3)² = 9 to both sides

Step 3: x² + 6x + 9 = 4 → (x + 3)² = 4

Step 4: x + 3 = ±2 → x = −1 or x = −5

This also reveals the vertex: h = −3, k = −4, so the vertex is (−3, −4) and the parabola opens upward (a = 1 > 0).

Vertex Form and the Parabola

Every quadratic function has a vertex — the highest or lowest point of its parabola. Knowing the vertex is essential for optimization problems.

h = −b / (2a)   |   k = c − b² / (4a)
EquationVertex (h, k)OpensMin/Max
x² − 4x + 3(2, −1)Up (a=1)Min at y=−1
−x² + 2x + 3(1, 4)Down (a=−1)Max at y=4
2x² + 4x − 6(−1, −8)Up (a=2)Min at y=−8

Real-World Applications

Projectile Motion

Height of a thrown ball: h(t) = −16t² + 48t + 5 (in feet). Setting h = 0 and solving gives the time the ball hits the ground. The vertex gives the maximum height reached.

Profit Maximization

If a company's profit is P(x) = −2x² + 120x − 800 (where x is units sold), the vertex gives the unit count that maximizes profit: x = 120/4 = 30 units, max profit = $1,000.

Area Problems

A rectangular garden with 40m of fencing has area A = x(20 − x) = 20x − x². Maximizing gives x = 10, so a 10m × 10m square maximizes area at 100 m².

Common Mistakes to Avoid

Sign error on b

The formula has −b at the start. If b = −5, then −b = +5. Many students forget to negate b and get the wrong answer.

Forgetting both roots

The ± sign gives two solutions. Always compute both (−b + √D)/2a and (−b − √D)/2a unless the discriminant is exactly 0.

Wrong order of operations

The entire expression −b ± √(b²−4ac) is divided by 2a, not just one term. Write it as a fraction to avoid this error.

Vieta's Formulas: Sum and Product of Roots

For any quadratic ax² + bx + c = 0 with roots x₁ and x₂, Vieta's formulas give a direct relationship between the coefficients and the roots — no solving required:

Sum of Roots

x₁ + x₂ = −b / a

Product of Roots

x₁ × x₂ = c / a

These formulas let you verify solutions instantly and reconstruct a quadratic from its roots.

EquationRootsSum (−b/a)Product (c/a)
x² − 5x + 6 = 02, 32+3 = 5 ✓2×3 = 6 ✓
2x² − 7x + 3 = 03, ½3+½ = 7/2 ✓3×½ = 3/2 ✓
x² + 4x + 5 = 0−2±i−4 ✓5 ✓

Practical use: To write a quadratic with roots 3 and −5: sum = −2, product = −15, so the equation is x² + 2x − 15 = 0.

Discriminant Quick Reference

The discriminant Δ = b² − 4ac is the fastest way to classify a quadratic's solutions before solving.

Δ ValueRoot TypeGraph BehaviorExample
Δ > 0Two distinct real rootsParabola crosses x-axis twicex²−5x+6=0 → Δ=1
Δ = 0One repeated rootParabola touches x-axis at vertexx²−6x+9=0 → Δ=0
Δ < 0Two complex conjugate rootsParabola doesn't cross x-axisx²+2x+5=0 → Δ=−16

Worked Example: Complex Roots (Δ < 0)

Let's solve x² + 2x + 5 = 0, which has a negative discriminant.

Step 1: a = 1, b = 2, c = 5

Step 2: Discriminant = 2² − 4(1)(5) = 4 − 20 = −16

Step 3: x = (−2 ± √(−16)) / 2

Step 4: √(−16) = 4i (where i = √−1)

Step 5: x = (−2 ± 4i) / 2

Result: x = −1 + 2i   or   x = −1 − 2i

Note: Complex roots always come in conjugate pairs (a + bi and a − bi). You can verify using Vieta's formulas: sum = (−1+2i)+(−1−2i) = −2 = −b/a ✓ and product = (−1+2i)(−1−2i) = 1+4 = 5 = c/a ✓.

Key Parabola Properties at a Glance

Every quadratic function f(x) = ax² + bx + c corresponds to a parabola. Here are the five key features you can read directly from the coefficients:

Axis of symmetry

x = −b / (2a)

The vertical line that divides the parabola into mirror halves. Also the x-coordinate of the vertex.

Vertex (h, k)

h = −b/(2a), k = f(h)

The highest or lowest point. If a > 0: minimum; if a < 0: maximum.

Y-intercept

(0, c)

Where the parabola crosses the y-axis — always the constant term c.

X-intercepts

Solve ax² + bx + c = 0

The roots — exist only when Δ ≥ 0.

Direction

a > 0: opens up; a < 0: opens down

The sign of the leading coefficient determines whether there's a minimum or maximum.

Quadratics in Context: Polynomial Degree Comparison

A quadratic is a degree-2 polynomial. Understanding how it fits within the broader polynomial family helps contextualize when to use the quadratic formula versus other methods.

DegreeNameMax RootsExampleSolution Method
1Linear12x + 6 = 0Isolate x
2Quadratic2x²−5x+6=0Quadratic formula / factor
3Cubic3x³−6x²+11x−6=0Rational root theorem
4Quartic4x⁴−5x²+4=0Substitution (treat as quadratic)

Degree-4 equations of the form ax⁴ + bx² + c = 0 can be solved by substituting u = x², turning them into a quadratic in u — a powerful technique called quadratic substitution.

Related Calculators