CalcPro

Quadratic Formula Calculator

Solve ax² + bx + c = 0, including complex roots.

How it works

The quadratic formula is a universal method to find the roots (solutions) of any quadratic equation. Instead of factoring or completing the square, you substitute the coefficients a, b, and c directly into the formula and evaluate.

The calculator performs three key steps:

  1. Calculates the discriminant (b² − 4ac) to determine the nature of the roots
  2. Applies the quadratic formula to find both solutions
  3. Displays results as real numbers or complex numbers, depending on the discriminant

The formula

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

Worked example

Solve: 2x² + 7x + 3 = 0

First, identify the coefficients:

  • a = 2
  • b = 7
  • c = 3

Step 1: Calculate the discriminant

Discriminant = b² − 4ac = 7² − 4(2)(3) = 49 − 24 = 25

Since 25 > 0, we expect two distinct real roots.

Step 2: Apply the quadratic formula

x = (−7 ± √25) / (2 × 2) = (−7 ± 5) / 4

Step 3: Solve for both roots

Using the + sign: x₁ = (−7 + 5) / 4 = −2 / 4 = −0.5

Using the − sign: x₂ = (−7 − 5) / 4 = −12 / 4 = −3

Verification:

  • For x = −0.5: 2(−0.5)² + 7(−0.5) + 3 = 0.5 − 3.5 + 3 = 0 ✓
  • For x = −3: 2(−3)² + 7(−3) + 3 = 18 − 21 + 3 = 0 ✓

Example with complex roots

Solve: x² + 2x + 5 = 0

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

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

Since the discriminant is negative, roots are complex:

x = (−2 ± √(−16)) / 2 = (−2 ± 4i) / 2 = −1 + 2i and −1 − 2i

These are complex conjugates. Both are valid solutions, even though they're not real numbers.

Common mistakes

Sign errors with b: The formula uses −b, not b. If b is already negative, −b becomes positive. Double-check the sign before substituting.

Forgetting the ±: Many people calculate only one root. Always compute both the + and − versions unless the discriminant is zero (which gives a repeated root).

Arithmetic under the square root: The discriminant calculation involves squaring b and multiplying 4ac carefully. A small error here cascades into wrong roots.

Mishandling complex numbers: If you get a negative discriminant, don't assume "no solution." Complex roots are valid mathematical solutions. Express them as a + bi format.

Dividing by 2a, not 2: The entire numerator (−b ± √discriminant) divides by 2a, not just the square root. Use parentheses to keep track: (−b ± √...) / (2a).

Frequently asked questions

What is the quadratic formula?

The quadratic formula is x = (−b ± √(b² − 4ac)) / 2a. It solves any equation of the form ax² + bx + c = 0 by finding the values of x that make the equation true. These values are called roots or solutions.

What does the discriminant tell me?

The discriminant is b² − 4ac. If it's positive, you get two different real roots. If it's zero, you get one repeated real root. If it's negative, you get two complex conjugate roots (involving imaginary numbers).

Can this calculator handle complex roots?

Yes. When the discriminant is negative, the calculator returns complex roots in the form a + bi, where i is the imaginary unit (√−1). Both the real and imaginary parts are shown.

What if a = 0?

If a = 0, the equation is not quadratic—it becomes linear (bx + c = 0). The quadratic formula doesn't apply. The calculator will flag this or show that the equation cannot be solved using the quadratic method.

Why do I get ± in the formula?

The ± symbol means you calculate the formula twice: once with + and once with −. This gives you two solutions (or one if the discriminant is zero). Most quadratic equations have two roots.

How do I know which root to use?

Both roots are mathematically valid solutions to the equation. In real-world problems, context matters—for example, if x represents a length, you'd discard negative roots. Always check both solutions in the original equation.