Quadratic Formula Calculator

Find the exact real or complex roots of any quadratic equation by entering coefficients a, b, and c.

Last updated:

ax² + bx + c = 0 (fractions supported)

You can enter fractions like 1/4, -3/2, 5/8
Fractions and decimals are both accepted
Example: 1/4x² + 3x - 1/2 = 0

Solution:

Was this calculator helpful?

★ ★ ★ ★ ★
Embed this calculator

Calculation Examples

Calculation Case Result
x squared minus 5x plus 6 = 0 Discriminant 1, so x = 3 and x = 2
x squared plus 2x plus 1 = 0 x = -1 (double root, discriminant = 0)
x squared plus 4 = 0 Discriminant -16, complex roots: x = 2i and x = -2i
x squared minus 2x minus 1 = 0 Discriminant 8, x = 1 + sqrt(2), about 2.414, and x = 1 - sqrt(2), about -0.414
Mihail Doncenco
Mihail Doncenco Site Creator & Calculator Expert

Founder and developer of CalcMate. Builds and maintains every calculator on this site, focusing on formula accuracy and clear, practical results.

How to Use the Quadratic Formula Calculator

Write your equation in standard form first: \(ax^2 + bx + c = 0\). Then enter the three coefficients \(a\), \(b\), and \(c\), keeping their signs. The value of \(a\) cannot be zero, since that would reduce the equation to a linear one.

Click Calculate and the tool evaluates the discriminant \(\Delta = b^2 - 4ac\), then applies the quadratic formula. If \(\Delta > 0\), you get two distinct real roots. If \(\Delta = 0\), there is one repeated root. If \(\Delta < 0\), the roots are complex conjugates. The result panel shows both roots, the discriminant, and each step of the calculation, so you can check the logic against your own work.

How the Quadratic Formula Works

The quadratic formula comes from completing the square on \(ax^2 + bx + c = 0\). Divide by \(a\), move the constant to the right side, and add \(\left(\frac{b}{2a}\right)^2\) to both sides. Solving for \(x\) gives: \[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\]

The expression under the radical, \(b^2 - 4ac\), is the discriminant. The calculator evaluates it first because it fixes the character of the solution before any other arithmetic. A positive discriminant means the parabola crosses the x-axis twice, zero means it just touches the axis, and a negative value means it never crosses the real number line, so the roots are complex.

You can check any result with the Vieta relations: the roots add up to \(-\frac{b}{a}\) and multiply to \(\frac{c}{a}\). Take \(x^2 - 5x + 6 = 0\). Here \(\Delta = 25 - 24 = 1\), so \(x = \frac{5 \pm 1}{2}\), which gives 3 and 2. Their sum is 5 and their product is 6, matching \(-\frac{-5}{1}\) and \(\frac{6}{1}\).

Quadratic formula diagram showing a parabola with two real roots where it crosses the x-axis

Useful Tips 💡

  • Always rewrite your equation in standard form before reading off a, b, and c, because signs matter as much as numbers.
  • Double-check the sign of b: if b is -3, then minus b equals +3, and a slip here changes both the discriminant and the roots.

📋Steps to Calculate

  1. Enter coefficient a, the leading term in front of x squared.

  2. Enter coefficients b and c from your equation.

  3. Click Calculate to see both roots, the discriminant, and the step-by-step solution.

Mistakes to Avoid ⚠️

  1. Forgetting the plus-or-minus sign and computing only one root instead of two.
  2. Computing the discriminant as b squared minus 4c without multiplying by a, the most common arithmetic error.
  3. Dividing only one term of the numerator by 2a instead of the entire expression.
  4. Leaving the radical unsimplified, so the answer is correct but not in its simplest form.

Practical Applications📊

  1. Solve projectile problems in physics: a ball thrown upward at 20 m/s from a height of 1.5 m lands after about 4.16 seconds.

  2. Find break-even points where a profit function modeled as a quadratic crosses zero.

  3. Locate intersection points of curves in geometry, engineering design, and computer graphics.

Questions and Answers

Can the calculator handle complex and imaginary roots?

Yes, a negative discriminant returns the roots in standard complex form \(p + qi\) and \(p - qi\) instead of an error. Here \(p = -\frac{b}{2a}\) and \(q = \frac{\sqrt{|\Delta|}}{2|a|}\). For \(x^2 + 4 = 0\), \(\Delta = -16\), so \(p = 0\), \(q = 2\), and the roots are \(\pm 2i\). Complex roots matter in AC circuit analysis, control systems, and quantum mechanics, where they describe oscillation and decay.

How do you solve a quadratic equation using the formula?

Write the equation as \(ax^2 + bx + c = 0\), then substitute \(a\), \(b\), and \(c\) into \(x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\). Compute the discriminant first, because its sign tells you whether to expect two real roots, one repeated root, or complex roots. For \(2x^2 + 3x - 5 = 0\), the discriminant is \(9 + 40 = 49\), so \(x = \frac{-3 \pm 7}{4}\), which gives \(x = 1\) and \(x = -2.5\). The calculator does this in one click and shows each step.

Is the quadratic formula better than factoring or completing the square?

The quadratic formula is the only one of the three methods that works for every quadratic equation, including those with irrational or complex roots. Factoring is faster when the roots are integers: \(x^2 - 5x + 6\) becomes \((x - 2)(x - 3)\) in seconds. But \(x^2 + x - 1\) has no integer factorization, and the formula gives \(x \approx 0.618\) and \(x \approx -1.618\) directly. Completing the square is the right tool when you need vertex form \(y = a(x - h)^2 + k\) with \(h = -\frac{b}{2a}\).

What does the discriminant tell you about the roots?

The discriminant \(\Delta = b^2 - 4ac\) tells you the type of roots before you compute them. When \(\Delta > 0\), there are two distinct real roots and the parabola crosses the x-axis at two points. When \(\Delta = 0\), there is exactly one real root, and the vertex of the parabola sits on the x-axis. When \(\Delta < 0\), the roots are complex conjugates of the form \(p \pm qi\) and the parabola has no real x-intercepts. If \(a\), \(b\), and \(c\) are integers and \(\Delta\) is a perfect square, the roots are rational numbers.

What formula does the calculator use and how accurate is it?

The calculator applies \[x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\] in double-precision floating-point arithmetic, which carries about 15 to 16 significant digits. When \(b^2\) is much larger than \(4ac\), the textbook form subtracts two nearly equal numbers and loses digits (catastrophic cancellation). The stable variant avoids this: compute \(x_1 = \frac{-b - \operatorname{sgn}(b)\sqrt{\Delta}}{2a}\), with \(\operatorname{sgn}(b) = 1\) for \(b \ge 0\), then get the second root from the Vieta product as \(x_2 = \frac{c}{a x_1}\). Numerical Recipes by Press et al. recommends this approach.

What is a quadratic formula calculator and what does it solve?

A quadratic formula calculator finds all roots of any equation \(ax^2 + bx + c = 0\) with \(a \neq 0\), whether they are real, repeated, or complex. Enter the three coefficients and the tool returns both roots, the discriminant, and a step-by-step breakdown. For example, \(x^2 - 5x + 6 = 0\) gives \(x = 3\) and \(x = 2\). It suits everything from school algebra to engineering problems with parabolic models.
Disclaimer: This calculator is designed to provide helpful estimates for informational purposes. While we strive for accuracy, financial (or medical) results can vary based on local laws and individual circumstances. We recommend consulting with a professional advisor for critical decisions.