𝑥²
Scientific

Quadratic Equation Calculator

Solve any quadratic equation in the form ax² + bx + c = 0 and see whether the roots are real or complex.

What this calculator does

Enter the coefficients a, b and c from a quadratic equation written as ax² + bx + c = 0, and this calculator solves for x using the quadratic formula, showing both roots and whether they're real or complex.

The formula

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

The expression under the square root, b² − 4ac, is called the discriminant. Its sign determines what kind of roots the equation has:

  • Discriminant > 0: two distinct real roots
  • Discriminant = 0: exactly one real root (a repeated root)
  • Discriminant < 0: two complex roots (no real solution)

Worked example

For x² − 3x + 2 = 0 (a=1, b=−3, c=2): discriminant = (−3)² − 4×1×2 = 9 − 8 = 1, which is positive, so there are two real roots. x = (3 ± 1) / 2, giving x = 2 and x = 1. You can check this by substitution: 2² − 3×2 + 2 = 4 − 6 + 2 = 0, correct.

When roots are complex

For x² + 2x + 5 = 0, the discriminant is 4 − 20 = −16, which is negative. Since you can't take the square root of a negative number within real numbers, the roots are complex: x = −1 ± 2i, where i is the imaginary unit (√−1). These solutions are still mathematically valid — they just don't correspond to points where the parabola crosses the x-axis on a standard graph.

Common mistakes

  • Forgetting the ± sign — a quadratic has up to two solutions, not one, and missing the second one is a common exam mistake.
  • Getting the sign of b wrong when reading off coefficients — for x² − 3x + 2, b is −3, not 3.
  • Assuming a negative discriminant means "no answer" rather than "no real answer" — the equation still has complex solutions.

Frequently asked questions

If a = 0, the equation isn't quadratic — it becomes linear (bx + c = 0), which this calculator doesn't solve. Enter a non-zero value for a.

It means the equation has no real roots — the parabola never crosses the x-axis. It still has two solutions in the complex number system, shown as a ± bi.

There's exactly one real root (technically a repeated root, where the parabola just touches the x-axis at a single point).

Yes — a, b and c can be any real numbers, including decimals and negative numbers.