Skip to content

Quadratic Formula Calculator with Discriminant

Solve ax² + bx + c = 0: discriminant, real or complex roots, vertex and factored form.

Your details

Must not be 0. Decimals and negative values are fine.

Results update as you type

Solutions

x₁ = −2, x₂ = 5

Discriminant Δ = b² − 4ac
49
Nature of the roots
2 distinct real roots
Factored form
(x + 2)(x − 5)
Vertex (h, k)
(1.5, −12.25)
Vertex form a(x − h)² + k
(x − 1.5)² − 12.25
Sum of roots −b/a
3
Product of roots c/a
-10

a > 0: the parabola opens upward and the vertex is its lowest point.

It crosses the y-axis at (0, −10).

Step-by-step solution
  1. Equation: x² − 3x − 10 = 0
  2. Discriminant: Δ = b² − 4ac = (−3)² − 4 × 1 × (−10) = 49
  3. Δ > 0, so there are two distinct real roots.
  4. Quadratic formula: x = (−b ± √Δ) / (2a) = (3 ± √49) / 2
  5. Roots: x₁ = −2, x₂ = 5
  6. Vertex: h = −b / (2a) = 1.5, k = −Δ / (4a) = −12.25

A quadratic equation has the form ax2+bx+c=0ax^2 + bx + c = 0 with a≠0a \neq 0. This quadratic formula calculator solves it for you: enter the three coefficients and it returns the discriminant, the roots (real or complex), their exact form with fractions and square roots, the vertex of the parabola, the factored form and the vertex form, with every step written out.

It is built for students checking homework, teachers preparing worked solutions and anyone who meets a parabola in physics, finance or engineering. Coefficients can be negative or decimal: the calculator converts them to exact integers internally, so a discriminant that should be zero really comes out as zero instead of a tiny rounding error.

Behind the scenes it also uses the numerically stable version of the formula, which keeps small roots accurate even when bb is huge compared with aa and cc — a classic trap for naive implementations.

How to use this calculator

  1. Rewrite your equation as ax2+bx+c=0ax^2 + bx + c = 0 (move every term to one side).
  2. Enter a, b and c. A missing term has coefficient 0: for x2−9=0x^2 - 9 = 0, enter b=0b = 0.
  3. Read the solutions at the top, then the discriminant and the nature of the roots.
  4. Use the exact form when your teacher expects fractions or square roots, and the factored or vertex form to sketch the parabola.
  5. Open the steps to follow the calculation line by line.

The formula

The solutions of ax2+bx+c=0ax^2 + bx + c = 0 come from the quadratic formula:

x=−b±Δ2awithΔ=b2−4acx = \frac{-b \pm \sqrt{\Delta}}{2a} \qquad \text{with} \qquad \Delta = b^2 - 4ac

The number Δ\Delta is the discriminant. Its sign decides everything: two real roots if Δ>0\Delta > 0, one double root x=−b2ax = -\frac{b}{2a} if Δ=0\Delta = 0, and two complex conjugate roots x=−b2a±−Δ2a ix = -\frac{b}{2a} \pm \frac{\sqrt{-\Delta}}{2a}\,i if Δ<0\Delta < 0.

The vertex is (−b2a, −Δ4a)\left(-\frac{b}{2a},\ -\frac{\Delta}{4a}\right), which gives the vertex form a(x−h)2+ka(x - h)^2 + k. By Vieta's formulas the roots always satisfy x1+x2=−bax_1 + x_2 = -\frac{b}{a} and x1x2=cax_1 x_2 = \frac{c}{a}.

For irrational roots the calculator uses the stable form q=−12(b+sgn⁡(b)Δ)q = -\tfrac{1}{2}\left(b + \operatorname{sgn}(b)\sqrt{\Delta}\right), x1=q/ax_1 = q/a, x2=c/qx_2 = c/q, which avoids subtracting two nearly equal numbers.

Worked example

Two real roots. Solve 2x2+3x−5=02x^2 + 3x - 5 = 0. The discriminant is Δ=32−4×2×(−5)=9+40=49\Delta = 3^2 - 4 \times 2 \times (-5) = 9 + 40 = 49, a perfect square, so the roots are rational:

x=−3±74⇒x1=−2.5,  x2=1x = \frac{-3 \pm 7}{4} \quad\Rightarrow\quad x_1 = -2.5,\; x_2 = 1

The factored form is (2x+5)(x−1)(2x + 5)(x - 1) and the vertex is (−0.75,−6.125)(-0.75, -6.125).

Complex roots. For x2+2x+5=0x^2 + 2x + 5 = 0, Δ=4−20=−16\Delta = 4 - 20 = -16. There is no real solution; the roots are x=−1±2ix = -1 \pm 2i.

Irrational roots. For x2−2x−1=0x^2 - 2x - 1 = 0, Δ=8=4×2\Delta = 8 = 4 \times 2, so x=1±2x = 1 \pm \sqrt{2}, about −0.4142135624-0.4142135624 and 2.4142135622.414213562.

What the discriminant tells you

You can learn a lot from Δ=b2−4ac\Delta = b^2 - 4ac before solving anything:

Discriminant Roots Graph of y=ax2+bx+cy = ax^2 + bx + c
Δ>0\Delta > 0, perfect square Two distinct rational roots Crosses the x-axis twice
Δ>0\Delta > 0, not a square Two distinct irrational roots Crosses the x-axis twice
Δ=0\Delta = 0 One double root Touches the x-axis at the vertex
Δ<0\Delta < 0 Two complex conjugate roots Never meets the x-axis

When all coefficients are integers, a perfect-square discriminant means the polynomial factors neatly over the integers — a quick test before trying to factor by hand.

Where quadratic equations appear

  • Physics: the height of a thrown ball, h(t)=h0+v0t−12gt2h(t) = h_0 + v_0 t - \tfrac{1}{2} g t^2, is quadratic in time; solving h(t)=0h(t) = 0 gives the landing time.
  • Geometry: finding the side of a rectangle from its area and perimeter leads to a quadratic.
  • Business: revenue that equals price times a demand that falls with price is a downward parabola; its vertex is the price that maximises revenue.
  • Finance: a two-period internal rate of return is the root of a quadratic in (1+r)(1 + r).

For lines rather than curves, see the slope calculator.

Frequently asked questions

What is the quadratic formula?

It is the general solution of ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) / (2a). It works for every quadratic equation, including those that cannot be factored by hand.

How do I calculate the discriminant?

Square b, then subtract four times a times c: Δ = b² − 4ac. For x² − 3x − 10 = 0, Δ = 9 + 40 = 49. A positive value gives two real roots, zero gives one double root and a negative value gives complex roots.

What if the discriminant is negative?

The equation has no real solution and its parabola never crosses the x-axis. In the complex numbers it has two conjugate roots p ± qi, where p = −b/(2a) and q = √(−Δ)/(2|a|); the calculator shows them.

Why must a be different from zero?

With a = 0 the x² term disappears and the equation becomes linear, bx + c = 0, whose only solution is x = −c/b. The quadratic formula would divide by zero.

Can I enter decimals or fractions?

Decimals are accepted (up to 10 decimal places). For a fraction such as 1/3, multiply the whole equation by the denominator first: x²/3 + x − 2 = 0 becomes x² + 3x − 6 = 0, which has the same roots.

Sources

Last updated:

More Math calculators

People also use