Skip to main content
HSCalculadora

Quadratic Formula Calculator

Solve ax² + bx + c = 0 for both roots.

Results update as you type.

First root (x₁)
—
Second root (x₂)—
Discriminant—
Nature of roots—

How it works

The quadratic formula is the universal method for solving any quadratic equation, an equation of the form ax² + bx + c = 0 where a is not zero. While some quadratics factor neatly by hand, many do not, and the quadratic formula works every time regardless of how messy the coefficients are. This quadratic formula calculator takes the three coefficients a, b, and c and returns both roots, the discriminant, and a description of what kind of solutions the equation has. The heart of the method is the discriminant, the value b² − 4ac sitting under the square root. When it is positive the parabola crosses the x-axis at two points, giving two real roots; when it is exactly zero the parabola just touches the axis, giving one repeated root; and when it is negative the parabola never reaches the axis, so the solutions are complex numbers rather than real ones. For the equation x² − 5x + 6 = 0, the coefficients are 1, −5, and 6, the discriminant is 1, and the two roots are 3 and 2, which you can verify by factoring into (x − 3)(x − 2). Students solving algebra problems, engineers finding where a curve meets a line, and physicists computing projectile times all reach for the quadratic formula when factoring is not obvious. Requiring a to be non-zero matters, because if a were zero the equation would be linear rather than quadratic and the formula would divide by zero.

Formula

x = (−b ± √(b² − 4ac)) ÷ 2a

The quadratic formula solves any equation of the form ax² + bx + c = 0 by completing the square on the general case, which isolates x in terms of the three coefficients. The quantity under the square root, b² − 4ac, is called the discriminant, and its sign decides everything: a positive discriminant gives two distinct real roots, a discriminant of zero gives one repeated root, and a negative discriminant means the roots are complex, with no real solution. The plus-or-minus sign generates both roots at once.

Source:Standard algebra

We review all our tools from time to time to ensure accuracy.

Worked example

Coefficient a:1Coefficient b:-5Coefficient c:6
Discriminant = (−5)² − 4×1×6 = 1; x = (5 ± 1) ÷ 2 = 3 or 2.

How to use this calculator

  1. 1

    Enter your values

    Enter coefficient a, coefficient b and coefficient c.

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    First root (x₁) updates instantly as you type — no button to press.

Frequently asked questions

What is the discriminant?

The discriminant is the expression b² − 4ac found under the square root in the quadratic formula. Its value reveals the nature of the roots before you finish solving. A positive discriminant means two distinct real roots, a discriminant of zero means one repeated real root, and a negative discriminant means the two roots are complex conjugates with no real value. Checking the discriminant first tells you what kind of answer to expect.

Why must the coefficient a not be zero?

If a equals zero, the x² term disappears and the equation becomes bx + c = 0, which is linear rather than quadratic. The quadratic formula would then divide by 2a, which is division by zero and undefined. A genuine quadratic always has a non-zero leading coefficient. This calculator returns no result when a is zero, since a linear equation is solved simply by x equals negative c divided by b instead.

What does it mean when there are no real roots?

When the discriminant is negative, the square root of a negative number is not a real value, so the equation has no real solutions. Graphically, the parabola never crosses the x-axis. The roots still exist as complex numbers involving the imaginary unit i, which appear in fields like electrical engineering and signal processing. For real-number problems, a negative discriminant simply signals that no real x satisfies the equation.

Can I use the quadratic formula instead of factoring?

Yes, the quadratic formula solves every quadratic equation, whether or not it factors nicely. Factoring is faster when the roots are simple integers you can spot, but many equations have irrational or awkward roots that resist factoring entirely. The formula never fails and gives exact results, so it is the reliable fallback. Many people use the discriminant to check whether clean factoring is even possible before attempting it.

How do I check my answers?

Substitute each root back into the original equation ax² + bx + c and confirm the result is zero. You can also use the fact that, for ax² + bx + c = 0, the two roots add up to negative b over a and multiply to c over a. For x² − 5x + 6, the roots 3 and 2 sum to 5 and multiply to 6, matching the coefficients, which confirms the solution is correct.