Quadratic equation solver

Enter a, b and c to get the real or complex roots of the equation. Useful for students and teachers checking homework.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter coefficient a, coefficient b and coefficient c.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

x = (-b ± √Δ) / 2a where Δ = b² - 4ac. Δ > 0 gives two real roots, Δ = 0 one repeated root, Δ < 0 two complex conjugate roots. The vertex is at h = -b/2a, k = c - b²/4a.

Example

Inputs: Coefficient a = 1, Coefficient b = -3, Coefficient c = 2. Result: Roots: x1 = 2, x2 = 1; Discriminant Δ: 1; Root type: Two distinct real roots.

Limits and caveats

  • Irrational roots are shown as decimals rounded to 10 significant digits, not in surd form.
  • a must be non-zero.

Questions about this tool

What is the discriminant?

It is b² - 4ac. A positive value means two real roots, zero means one repeated root, and a negative value means two complex roots.

How do I enter an equation with no x term?

Set b = 0. For 2x² - 8 = 0 enter a = 2, b = 0, c = -8; the roots are 2 and -2.

What does i mean in the result?

i is the imaginary unit, i² = -1. It appears when the discriminant is negative, meaning the parabola never crosses the x axis.