Skip to main content
Mathlark

Quadratic Formula Calculator

Enter a, b, and c from ax² + bx + c = 0 to find its roots, real or complex, with the working shown.

Your numbers

The number in front of x². It can't be 0.

The number in front of x. Use 0 if there's no x term.

The number on its own. Use 0 if there isn't one.

Results

Roots (values of x)

1 and 2

x² − 3x + 2 = 0 has two real roots. Its graph, a parabola, crosses the x-axis at both.

Discriminant (b² − 4ac)
1
Vertex x (axis of symmetry)
1.5
Vertex y
-0.25

Runs in your browser. Your numbers are never stored or sent.

Show the work

How it works

A quadratic equation has an x² term, and can always be written as ax² + bx + c = 0. Its solutions, called roots, are the values of x that make the left side equal 0. The quadratic formula finds them from the three numbers a, b, and c, so you don’t need to factor anything.

First move every term to one side so the other side is 0, then read off a, b, and c. For 2x² + 9x = 5, that’s 2x² + 9x − 5 = 0, so a = 2, b = 9, and c = −5. A missing term counts as 0: x² − 4 = 0 has b = 0.

The calculator also gives the discriminant, which tells you what kind of roots to expect, and the vertex, the turning point of the equation’s graph.

The formula

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

  • a is the number in front of x². It can’t be 0, or the equation isn’t quadratic.
  • b is the number in front of x.
  • c is the number on its own.
  • ± means there are two answers: one adding the square root, one taking it away.

The part under the square root, b² − 4ac, is the discriminant:

  • Above 0: two different real roots.
  • Exactly 0: one repeated root, x = −b ÷ 2a.
  • Below 0: no real roots. The square root of a negative number is imaginary, so the roots are a pair of complex numbers, written p ± qi, where i is the square root of −1.

The graph of y = ax² + bx + c is a parabola, and the roots are where it crosses the x-axis. Its vertex is at x = −b ÷ 2a, and y = −(b² − 4ac) ÷ 4a.

When one root is far smaller than the other, the formula takes away two nearly equal numbers and a computer loses most of that root’s digits. The calculator avoids this by finding the root that’s larger in size first, and the other from the fact that the two roots multiply to c ÷ a. The answer is the same, just more accurate.

Worked example

Want this with your own numbers? See Show the work above.

Solve x² − 3x + 2 = 0. Here a = 1, b = −3, and c = 2.

  1. Find the discriminant: (−3)² − 4 × 1 × 2 = 9 − 8 = 1. It’s above 0, so there are two real roots.
  2. Take its square root: √1 = 1.
  3. Put the numbers into the formula: x = (3 ± 1) ÷ 2.
  4. Work out both roots: (3 − 1) ÷ 2 = 1 and (3 + 1) ÷ 2 = 2.

Check by putting them back in: 1² − 3 × 1 + 2 = 0, and 2² − 3 × 2 + 2 = 0. The vertex is at x = 3 ÷ 2 = 1.5 and y = −1 ÷ 4 = −0.25.

FAQ

What does “no real roots” mean?

The discriminant is negative, so the formula would need the square root of a negative number, which no real number is. The graph never touches the x-axis. Using i, the square root of −1, gives two complex roots instead. For x² + 4 = 0, they’re 2i and −2i, shown as ± 2i.

Why are complex roots always a pair?

They come from the same ± in the formula: one root adds the imaginary part and the other takes it away. So when a, b, and c are real numbers, the roots are p + qi and p − qi, the same except for the sign of the imaginary part. These are called complex conjugates.

What if a is 0?

Then there’s no x² term, and the equation is a linear one, bx + c = 0 (its graph is a straight line), not a quadratic. Its one solution is x = −c ÷ b (as long as b isn’t 0). The quadratic formula would divide by 0, so the calculator asks for an a other than 0.

How can I check my roots?

Put each one back into ax² + bx + c and see that it comes out as 0, or very close to it once rounding is allowed for. A quicker check uses two facts about any quadratic: the roots add up to −b ÷ a and multiply to c ÷ a. For x² − 3x + 2 = 0, 1 + 2 = 3 and 1 × 2 = 2.

Should I factor or use the quadratic formula?

Factoring is quicker when the roots are whole numbers or simple fractions you can spot, like x² − 3x + 2 = (x − 1)(x − 2). The quadratic formula always works, including for roots like −3 ± √5 that don’t factor neatly, and for complex roots.

What is the vertex of a parabola?

It’s the turning point of the graph: the lowest point when a is positive (the parabola opens upward) and the highest when a is negative. It’s at x = −b ÷ 2a. When there are two real roots, that’s halfway between them: the formula’s −b ÷ 2a part is the vertex, and the ± part is how far each root is from it.

Sources

Cite this page

APA (7th edition)

Mathlark. (2026, October 2). Quadratic formula calculator. https://mathlark.com/math/quadratic-formula-calculator/

MLA (9th edition)

"Quadratic Formula Calculator." Mathlark, 2 Oct. 2026, mathlark.com/math/quadratic-formula-calculator/.

Spot a mistake?