CalculateItNow home

Quadratic Equation Calculator

Solve ax² + bx + c = 0 with the quadratic formula — real or complex roots, discriminant, vertex, axis of symmetry, factored form and a graph of the parabola.

Quadratic Equation Calculator: with the default inputs, solutions is x = 1 or x = 2.

Try an example
Solutions
x = 1 or x = 2
Type of roots
Two distinct real roots
Discriminant (b² − 4ac)
1
x₁
1
x₂
2
Factored form
(x − 1)(x − 2)
Vertex
(1.5, −0.25)
Axis of symmetry
x = 1.5
Assumptions
  • Roots are computed with the numerically stable form of the formula to avoid cancellation error.
  • Factored form with whole coefficients is shown when both roots are rational with denominators up to 1,000.
y = ax² + bx + c (roots are where it crosses y = 0)
-0246-1-0.1250.751.6252.53.3754x
y
Math verified by automated testsUpdated 2026-09-082 sources cited

How this is worked out

The formula

x = (−b ± √(b² − 4ac)) ÷ 2a
Discriminant D = b² − 4ac:  D > 0 two real roots, D = 0 one repeated root, D < 0 two complex roots
Vertex: x = −b ÷ 2a,  y = c − b² ÷ 4a
Sum of roots = −b/a,  product of roots = c/a

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

a (coefficient of x²)
Can't be 0 — that would make the equation linear.defaults to 1
b (coefficient of x)
A number.defaults to -3
c (constant)
A number.defaults to 2

What you get back

Solutionsmain answer
Type of roots
Discriminant (b² − 4ac)
x₁
Blank when the roots are complex.
x₂
Factored form
Vertex
Axis of symmetry

What this assumes

  • Roots are computed with the numerically stable form of the formula to avoid cancellation error.
  • Factored form with whole coefficients is shown when both roots are rational with denominators up to 1,000.

About this calculator

A quadratic equation is any equation that can be written as ax² + bx + c = 0 with a ≠ 0. Its graph is a parabola, and solving the equation means finding where that parabola crosses the x-axis. The quadratic formula does this for every quadratic, no factoring luck required, and this calculator shows each stage of it.

How to use it

Enter a, b and c. Move everything to one side first: 2x² = 5x − 3 becomes 2x² − 5x + 3 = 0, so a = 2, b = −5, c = 3. The results give the roots, the discriminant, the factored form when one exists, the vertex and the axis of symmetry, plus a graph so you can see why the roots are where they are.

Where the formula comes from

Completing the square on ax² + bx + c = 0 gives (x + b/2a)² = (b² − 4ac)/4a². Taking the square root of both sides and solving for x produces the formula. The piece under the root, b² − 4ac, is the discriminant, and it tells the whole story before you finish:

  • D > 0: two different real roots — the parabola crosses the axis twice.
  • D = 0: one repeated root — the vertex sits exactly on the axis.
  • D < 0: no real roots — the parabola floats entirely above or below the axis. The roots are complex conjugates like 1 ± 2i, which this calculator reports rather than saying "no solution".

Vertex and symmetry

The parabola is symmetric about the vertical line x = −b/2a, which is always the midpoint of the two roots. The vertex is the highest or lowest point (lowest when a > 0). For anything you're maximizing or minimizing — profit, height of a thrown ball — the vertex is the answer.

Factored form

When the roots are rational the calculator rebuilds the factored form with whole-number coefficients, e.g. 2x² + 5x + 3 = (2x + 3)(x + 1). If the roots are irrational it shows a(x − r₁)(x − r₂) with decimals; if they're complex there's no real factorization.

Common mistakes

  • Sign errors on b: for x² − 3x + 2, b is −3, so −b is +3.
  • Dividing only part of the numerator by 2a. The whole −b ± √D is divided.
  • Forgetting the ± and reporting only one root.
  • Entering a = 0. That's a linear equation; the calculator tells you the linear solution instead.

Frequently asked questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ 2a. It gives both solutions of ax² + bx + c = 0 for any coefficients with a ≠ 0.

What does the discriminant tell me?

b² − 4ac decides how many real solutions there are: positive means two, zero means one repeated root, negative means none (two complex roots).

What if a is zero?

Then there is no x² term and the equation is linear: bx + c = 0, so x = −c/b. The calculator shows that answer in its error message.

How do I find the vertex of a parabola?

The x-coordinate is −b ÷ 2a; plug it back in for y (or use y = c − b² ÷ 4a). For x² − 3x + 2 the vertex is (1.5, −0.25).

Can a quadratic have complex solutions?

Yes, whenever the discriminant is negative. The roots come as a conjugate pair p ± qi, and the calculator writes them that way.

Put this calculator on your own site

A working quadratic, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

Quadratic Equation Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a quadratic.

All math calculators·Browse everything