MATHS & STATISTICS / ALGEBRA

Quadratic equation solver

Solve ax² + bx + c = 0 with the quadratic formula. Shows real or complex roots, the discriminant and the vertex of the parabola.

Last reviewed:

← All tools

Your numbers

Move every term to one side first, so the other side is zero.
◈ Your values stay in your browser. No account needed.
YOUR RESULT

Enter your numbers to see a result.

WORKED EXAMPLE

Quadratic equation solver: a worked example

With a (coefficient of x²) 2, b (coefficient of x) -4, c (constant term) -6, the solutions is x = 3 or x = -1.

Inputs
a (coefficient of x²)2
b (coefficient of x)-4
c (constant term)-6
Results
Solutionsx = 3 or x = -1
Discriminant (b² − 4ac)64
Root 1 (real part)3
Root 2 (real part)-1
Imaginary part0
Vertex x (axis of symmetry)1
Vertex y (turning point)-8
THE METHOD

How it works

Write the equation in the form ax² + bx + c = 0 and enter the three coefficients. The discriminant decides the kind of answer: positive gives two different real roots, zero gives one repeated root, and negative gives a pair of complex roots of the form p ± qi. The roots are computed in a numerically stable way, so equations with very different coefficient sizes keep their accuracy.

Formulax = (−b ± √(b² − 4ac)) ÷ 2a. Discriminant D = b² − 4ac. Vertex at x = −b ÷ 2a, y = c − b² ÷ 4a.
ASSUMPTIONS

Assumptions and limits

  • The equation is a single-variable quadratic with real coefficients, and a is not zero.
  • Complex roots are reported as a real part and an imaginary part; root 1 and root 2 then share the same real part.
  • Displayed numbers are rounded to ten significant figures.
  • Results are estimates based on the inputs and assumptions on this page, not professional advice.
  • Try this: use “Save scenario A”, change one input and compare the two results side by side.
QUESTIONS

Frequently asked questions

How is the result of the “Quadratic equation solver” calculated?

x = (−b ± √(b² − 4ac)) ÷ 2a. Discriminant D = b² − 4ac. Vertex at x = −b ÷ 2a, y = c − b² ÷ 4a. Write the equation in the form ax² + bx + c = 0 and enter the three coefficients. The discriminant decides the kind of answer: positive gives two different real roots, zero gives one repeated root, and negative gives a pair of complex roots of the form p ± qi. The roots are computed in a numerically stable way, so equations with very different coefficient sizes keep their accuracy.

What does the worked example show?

With a (coefficient of x²) 2, b (coefficient of x) -4, c (constant term) -6, the solutions is x = 3 or x = -1. Discriminant (b² − 4ac): 64; Root 1 (real part): 3; Root 2 (real part): -1; Imaginary part: 0; Vertex x (axis of symmetry): 1; Vertex y (turning point): -8.

What assumptions and limits apply?

This is an estimate based on the inputs and assumptions shown on this page, not professional advice. Check anything with financial, health or safety consequences independently.

Is my data private?

Yes. Calculations run in your browser and your numbers are not sent to a server. A share link contains the inputs you choose to share, so check it before sending it to anyone.

What does the discriminant tell me?

D = b² − 4ac. If D is positive the parabola crosses the x-axis twice (two real roots); if D is zero it touches the axis once (a repeated root); if D is negative it never reaches the axis and the roots are complex.

How do I solve 2x² − 4x − 6 = 0?

Here a = 2, b = −4 and c = −6, so D = 16 + 48 = 64 and √D = 8. The roots are (4 ± 8) ÷ 4, which gives x = 3 or x = −1.

Why must a not be zero?

Without the x² term the equation becomes bx + c = 0, a straight line with at most one solution, x = −c ÷ b. The quadratic formula would divide by zero.

FOR WEBSITE OWNERS

Embed this calculator on your site

Free to use. Paste this where you want the calculator to appear. It resizes itself and links back to Calculator786.