Home › Math › Quadratic Equation Solver

Quadratic Equation Solver

Enter the coefficients a, b and c of ax² + bx + c = 0. The solver returns both roots, including complex ones, plus the discriminant and the parabola's vertex.

Roots (solutions)

—

Discriminant (b² − 4ac)
—
Vertex
—
Axis of symmetry
—

Solve it, then see it

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. Its solutions, or roots, are the x-values where the parabola y = ax² + bx + c crosses the x-axis. This solver gives the roots, the discriminant that predicts them, and the vertex, and it draws the curve so you can check the answer by eye.

For x² − 3x + 2 = 0 the roots are x₁ = 2, x₂ = 1. The discriminant is 1 (two real roots), and the vertex sits at (1.5, -0.25).

y = 1x² + -3x + 2-20246810-1.5-0.30.92.13.34.5xy = 0
The parabola for your coefficients, centred on the vertex. Points where the curve crosses the dashed line y = 0 are the real roots.

The formula and what each letter does

x = (−b ± √(b² − 4ac)) ÷ 2a
Discriminant D = b² − 4ac
Vertex: x = −b ÷ 2a, y = c − b² ÷ 4a
  • a sets the width and direction: positive opens upwards, negative downwards, larger values make it narrower.
  • b slides the vertex sideways (together with a).
  • c is where the curve meets the y-axis.

What the discriminant predicts

Three equations, three kinds of answer
EquationDiscriminantRoots
x² − 3x + 2 = 01 (two real roots)x₁ = 2, x₂ = 1
x² − 4x + 4 = 00 (one real root)x = 2 (double root)
x² + 2x + 5 = 0-16 (two complex roots)x = -1 ± 2i
x² − x − 1 = 05 (two real roots)x₁ = 1.618034, x₂ = -0.618034

A positive D means two real roots and two crossings. Zero means the vertex just touches the axis: one repeated root. Negative means the parabola floats clear of the axis and the roots are complex, written p ± qi, where i = √−1. Try the presets to see each case drawn.

Check your answer two ways

  • Sum and product. For roots x₁ and x₂, x₁ + x₂ = −b/a and x₁ × x₂ = c/a. For x² − 3x + 2: 2 + 1 = 3 and 2 × 1 = 2. ✓
  • Substitute. Put each root back into the equation; the left side should come out at 0, give or take rounding.

Common slips

  • Forgetting the sign of b. In x² − 3x + 2, b is −3, so −b is +3.
  • Dividing only part of the top by 2a. The whole of −b ± √D sits over 2a.
  • Not rearranging first. 2x² = 5x − 3 must become 2x² − 5x + 3 = 0 before you read off a, b and c.
  • Setting a to 0. Then it is a straight line, bx + c = 0, with one root; the calculator flags this.

Where quadratics show up

Projectile height over time, area problems ("a garden is 3 m longer than it is wide and covers 40 m²"), profit with a price that lowers demand, and lens and circuit equations. The golden ratio is the positive root of x² − x − 1 = 0, which links this page to the Fibonacci calculator.

Roots are shown to six decimal places. Very large or very small coefficients can lose precision in floating-point arithmetic. For side lengths and right angles, see the triangle calculator; for shapes in three dimensions, the volume calculator.

Quadratic equation questions

What is the quadratic formula?

x = (−b ± √(b² − 4ac)) ÷ 2a. It solves any equation of the form ax² + bx + c = 0 with a ≠ 0.

What does a negative discriminant mean?

There are no real roots. The two roots are complex conjugates, and the parabola never touches the x-axis.

How do I find the vertex?

Its x-value is −b ÷ 2a. Substitute that into the equation for the y-value. For x² − 3x + 2 it is (1.5, −0.25).

Can a quadratic have only one root?

Yes, when the discriminant is exactly 0. The root is repeated, and the vertex sits on the x-axis.

Related calculators