Quadratic Formula Solver

Solve ax² + bx + c = 0 for real or complex roots.

Free quadratic formula solver — enter a, b and c to find the real or complex roots of ax² + bx + c = 0, plus the discriminant. Runs entirely in your browser, nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What does the discriminant tell me?

The discriminant is b² − 4ac. If it is positive there are two distinct real roots, if it is zero there is one repeated real root, and if it is negative there are two complex (imaginary) roots.

Quadratic formula solver

This tool solves any equation of the form ax² + bx + c = 0 for x. Enter the three coefficients a, b and c and it instantly returns the roots — whether they are two real numbers, a single repeated value, or a complex conjugate pair — along with the discriminant so you can see why. It is useful for algebra homework, physics problems (projectile and motion equations), and any time you need to factor or find where a parabola crosses zero.

How it works

The solver applies the quadratic formula:

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

First it computes the discriminant, D = b² − 4ac, which decides the kind of answer:

  • D > 0 — two distinct real roots: x₁ = (−b + √D)/2a and x₂ = (−b − √D)/2a.
  • D = 0 — one repeated real root: x = −b/2a.
  • D < 0 — two complex roots: x = (−b/2a) ± (√(−D)/2a)·i.

If a = 0 the equation is linear, not quadratic, so the formula does not apply and the tool prompts for a non-zero a. Results are rounded to six decimal places.

Example

For x² − 3x + 2 = 0 (a = 1, b = −3, c = 2):

  • Discriminant D = (−3)² − 4·1·2 = 9 − 8 = 1 (positive, so two real roots).
  • x₁ = (3 + √1) / 2 = 4 / 2 = 2
  • x₂ = (3 − √1) / 2 = 2 / 2 = 1
Discriminant b² − 4acRoot typeResult shape
PositiveTwo real rootsx₁, x₂
ZeroOne repeated rootx
NegativeTwo complex rootsp ± qi

Everything runs in your browser, so the coefficients you enter are never uploaded.