Quadratic Formula Solver

Solve ax² + bx + c = 0 — get real or complex roots, the discriminant, and the parabola's vertex.

How this works

Any equation of the form ax² + bx + c = 0 (where a ≠ 0) can be solved by the quadratic formula: x = (−b ± √(b² − 4ac)) / 2a. The expression under the square root, b² − 4ac, is called the discriminant (Δ) and tells you what kind of solutions to expect before you finish solving. If Δ > 0 you get two distinct real roots; if Δ = 0 you get one repeated real root (the parabola just kisses the x-axis); if Δ < 0 the roots are complex conjugates a ± bi (the parabola never touches the x-axis). The calculator handles all three cases, and also computes the parabola's vertex at x = −b/(2a), which is its maximum (if a < 0) or minimum (if a > 0). The vertex sits on the axis of symmetry, halfway between the two roots — useful for graphing or optimisation problems.

The formula

Quadratic formula: x = ( −b ± √(b² − 4ac) ) / (2a) Discriminant: Δ = b² − 4ac Vertex: ( −b/(2a) , c − b²/(4a) ) Axis of symmetry: x = −b/(2a)

a, b, c — the coefficients of x², x, and the constant term, respectively. The leading coefficient a must be non-zero (otherwise the equation is linear, not quadratic). The ± sign in the formula gives both roots in one expression — take + for x₁ and − for x₂. When Δ < 0 the square root is imaginary, written as i·√|Δ|, and the two roots become a complex-conjugate pair.

Example calculation

  • Solve x² − 3x + 2 = 0 → a = 1, b = −3, c = 2.
  • Δ = (−3)² − 4 · 1 · 2 = 9 − 8 = 1. Δ > 0 → two distinct real roots.
  • x = (3 ± 1) / 2 → x₁ = 2, x₂ = 1.
  • Vertex at x = −b/(2a) = 3/2 = 1.5; y = (1.5)² − 3(1.5) + 2 = −0.25.

Frequently asked questions

What if a = 0?

Then it's not a quadratic at all — it collapses to bx + c = 0, a linear equation with the single solution x = −c/b (assuming b ≠ 0). The quadratic formula breaks down because you'd be dividing by 2a = 0. The calculator detects this and shows an error. If you really do have a linear problem, just rearrange to get x by hand: subtract c, divide by b.

How do I read the complex roots when Δ < 0?

They're written in the form a + bi (or a − bi), where a is the real part, b is the imaginary part, and i = √(−1). The two roots are always conjugates of each other: same real part, opposite signs on the imaginary part. For example, if Δ = −16 and you get x₁ = 1 + 2i, then x₂ = 1 − 2i. Geometrically this means the parabola sits entirely above (or entirely below) the x-axis — it never crosses, so no real x satisfies the equation, but two complex numbers do.

Why does the calculator show the vertex too?

Because most quadratic problems aren't really about "find x where y = 0" — they're about the shape of the curve. The vertex is the parabola's highest or lowest point and shows up everywhere: maximum profit (a < 0), minimum cost (a > 0), peak height of a thrown ball, optimal price for a product. It always sits on the axis of symmetry x = −b/(2a), exactly halfway between the two roots when they're real. So the vertex tells you the extremum, the discriminant tells you whether the curve crosses the x-axis, and the roots tell you where.

What about the simpler-looking method of factoring?

Factoring works perfectly when the roots are nice rational numbers — x² − 5x + 6 obviously factors as (x − 2)(x − 3), giving roots 2 and 3 in seconds. But it stops working when the roots are irrational (think √2 or 1 + √3) or complex. The quadratic formula is the universal fallback: it gives the answer no matter how ugly. Standard maths advice: try factoring first if the numbers look small and clean, otherwise reach for the formula. The calculator skips the guesswork and just always uses the formula.

Related calculators