Math

Quadratic Formula Calculator

Solve any quadratic equation from its three coefficients and see the discriminant, both roots and the vertex.

Calculation inputs

Coefficient a must not be zero. Negative values are allowed.

Results

No result yet

Complete the fields and select Calculate to show results here.

About this calculator

This calculator solves any quadratic equation written as ax² + bx + c = 0, returning the discriminant and both roots, whether they are real or complex. Students checking algebra homework and anyone modeling a curved relationship will find it handy.

How the calculation works

  • x = (−b ± √(b² − 4ac)) ÷ 2a
  • Discriminant D = b² − 4ac
  • D > 0: two real roots · D = 0: one root · D < 0: complex pair

Notes and assumptions

Results are rounded to six decimal places for display.

How it works in plain English

A quadratic equation has a squared term, a plain x term and a constant. Its graph is a U-shaped curve called a parabola, and the roots are the x values where that curve crosses the horizontal axis. The quadratic formula finds those values directly from the three coefficients a, b and c.

The first step is the discriminant, which is b squared minus four times a times c. Its sign tells you what kind of answers to expect. A positive discriminant means the curve crosses the axis twice, giving two different real roots. A discriminant of zero means the curve just touches the axis at one point, so both roots are the same. A negative discriminant means the curve never reaches the axis, and the roots are a pair of complex numbers written with the imaginary unit i.

The tool then applies the full formula, taking the square root of the discriminant and adding or subtracting it from negative b before dividing by two times a. It also reports the vertex, the axis of symmetry, which way the parabola opens, and the sum and product of the roots as a quick self-check. Coefficient a cannot be zero, because without the squared term the equation is no longer quadratic.

The formula

  • x = (−b ± √(b² − 4ac)) ÷ (2a)
  • Discriminant D = b² − 4ac
  • Vertex x = −b ÷ (2a)

Worked example

Solve x² − 3x − 10 = 0. Here a is 1, b is −3 and c is −10.

Start with the discriminant: (−3)² is 9, and 4 × 1 × (−10) is −40, so D = 9 − (−40) = 49. Because 49 is positive, there are two real roots, and its square root is 7.

Now apply the formula. Negative b is 3, and 2a is 2. The first root is (3 + 7) ÷ 2 = 5, and the second is (3 − 7) ÷ 2 = −2. You can check: the roots add to 3, which equals −b ÷ a, and multiply to −10, which equals c ÷ a. The vertex sits at x = 1.5, where the curve reaches its lowest value of −12.25, and since a is positive the parabola opens upward.

Frequently asked questions

What does the discriminant tell me?

The discriminant, b² − 4ac, reveals how many real solutions exist before you finish solving. Positive means two different real roots, zero means a single repeated root, and negative means no real roots but a pair of complex ones. It is a quick way to predict the shape of the answer.

What are complex roots?

When the discriminant is negative, its square root is not a real number. Mathematicians use the imaginary unit i, defined as the square root of −1, to write these answers. Complex roots always come in matched pairs, such as 2 + 3i and 2 − 3i, and they mean the parabola never touches the x-axis.

Why can't a be zero?

The coefficient a multiplies the squared term. If it is zero, that term disappears and the equation becomes linear, bx + c = 0, which has at most one solution and a straight-line graph. The quadratic formula would also require dividing by zero, so the calculator asks for a nonzero value instead.

How do I rearrange my equation into standard form?

Move every term to one side so the other side equals zero, then combine like terms. For example, 2x² = 5x + 3 becomes 2x² − 5x − 3 = 0, giving a = 2, b = −5 and c = −3. Keep careful track of signs, since a sign error is the most common source of wrong answers.

Is factoring better than the formula?

Factoring is faster when the roots are tidy whole numbers, but many quadratics do not factor neatly. The quadratic formula works every time, including for decimals, irrational roots and complex roots. Many students factor when it is obvious and fall back on the formula otherwise, using this tool to confirm results.

Related tools