Skip to content
ToolZone

Quadratic Equation Solver

Find the real or complex roots of any quadratic equation from its coefficients, useful for algebra coursework and quick verification.

Runs in your browser. Nothing you enter or upload leaves your device.

ax² + bx + c = 0

Discriminant = 1 (two real roots)
x₁ = 2
x₂ = 1

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the Quadratic Equation Solver

This quadratic equation solver finds the roots of any equation in the form ax² + bx + c = 0. Enter the three coefficients and it reports the discriminant along with two real roots, one repeated root, or a pair of complex roots. It is meant for algebra and precalculus students checking homework, and for anyone who needs the roots of a parabola quickly.

How it works

The solver first computes the discriminant, D = b² - 4ac. If D is positive, it applies the quadratic formula x = (-b ± √D) / 2a to get two different real roots, rounded to 8 decimal places. If D is zero, both roots coincide at x = -b / 2a. If D is negative, there are no real roots, so the solver returns the complex pair -b/2a ± (√-D / 2a)i, rounded to 3 decimal places.

When a is 0, the x² term disappears and the equation becomes linear: bx + c = 0, so x = -c / b. If b is also 0, what's left is just c = 0. That is true for every x when c is 0 (infinitely many solutions) and never true otherwise (no solution). The answer updates as soon as you change any coefficient.

How to use

  1. 1

    Rearrange your equation so one side is 0, in the form ax² + bx + c = 0.

  2. 2

    Enter the coefficients in the a, b, and c fields, including minus signs.

  3. 3

    Read the discriminant and the roots x₁ and x₂ in the result box.

  4. 4

    Change any value to solve a new equation instantly.

Worked examples

Two real roots

The default equation x² - 3x + 2 = 0.

Input
a = 1, b = -3, c = 2
Result
Discriminant = 1, x₁ = 2, x₂ = 1

It factors as (x - 2)(x - 1) = 0.

Repeated root

A perfect square, x² - 6x + 9 = 0.

Input
a = 1, b = -6, c = 9
Result
Discriminant = 0, x = 3

Complex roots

A parabola that never crosses the x-axis, x² + 2x + 5 = 0.

Input
a = 1, b = 2, c = 5
Result
Discriminant = -16, x₁ = -1 + 2i, x₂ = -1 - 2i

Irrational roots

Solving x² = 2 as x² - 2 = 0.

Input
a = 1, b = 0, c = -2
Result
Discriminant = 8, x₁ = 1.41421356, x₂ = -1.41421356
Limitations
Roots are given as decimals, not in exact radical form like (3 + √5)/2. Complex roots are rounded to 3 decimal places, and real roots to 8. No step-by-step working or graph is shown, and only quadratic (degree 2) equations are supported.
Assumptions
Coefficients a, b, and c are real numbers.
Privacy
Equations are solved in your browser; the values you enter are not sent or stored.

Frequently asked questions

What does it mean if the roots are complex numbers?+

It means the equation has no real solutions, which happens when the discriminant, the value under the square root in the quadratic formula, is negative. Graphically, the parabola never touches the x-axis.

What is the discriminant used for?+

It determines the nature of the roots: two distinct real roots when it is positive, one repeated real root when it is zero, and a pair of complex roots when it is negative.

What happens if a is 0?+

The equation is no longer quadratic. The solver treats it as the linear equation bx + c = 0 and gives x = -c/b, or reports no solution or infinitely many solutions if b is also 0.

What is the quadratic formula?+

x = (-b ± √(b² - 4ac)) / 2a. It gives the roots of any quadratic equation ax² + bx + c = 0 with a not equal to 0.

Can I enter decimal or negative coefficients?+

Yes. Any real number works for a, b, and c, including decimals like 0.25 and negative values.

Related tools