Free online calculator

Quadratic Formula Calculator

Enter coefficients for ax² + bx + c = 0 to inspect the discriminant, real or complex roots, and vertex. With a = 0 the equation becomes linear rather than quadratic.

ax² + bx + c = 0

Discriminant1
Root typeTwo real roots
x₁2
x₂1
Vertex(1.5, -0.25)

The quadratic formula

  • For ax² + bx + c = 0: x = (−b ± √(b² − 4ac)) ÷ 2a.
  • Discriminant b² − 4ac > 0: two real roots; = 0: one double root; < 0: two complex roots.
  • Vertex x = −b ÷ 2a.
  • a cannot be 0 (then it is a linear equation).

How to use the Quadratic Formula Calculator

  1. Enter the coefficients a, b and c from ax² + bx + c = 0.
  2. The discriminant is calculated as b² − 4ac.
  3. A positive discriminant produces two distinct real roots.
  4. A zero discriminant produces one repeated real root.
  5. A negative discriminant produces a complex-conjugate pair. The calculator also finds the vertex coordinates.

Checking roots without solving again

For ax² + bx + c = 0, the two roots always add up to −b/a and multiply to c/a (Vieta's formulas). That gives a quick check: for 2x² + 3x − 2 = 0 the roots 0.5 and −2 add to −1.5 = −3/2 and multiply to −1 = −2/2.

Special cases are faster by hand. If c = 0, factor out x: 3x² − 6x = 0 gives x = 0 or x = 2. If b = 0, solve x² = −c/a directly. When the discriminant b² − 4ac is negative, the roots are a complex pair a ± bi with the same sum and product rules.

Root types and numeric limits

Positive discriminant gives two real roots; zero gives a repeated root; negative gives a complex conjugate pair. Results use floating-point arithmetic and can lose precision for extreme or nearly cancelling coefficients. When a and b are both zero, there is no unique solution.

Examples

x² − 3x + 2 = 0

With a = 1, b = −3 and c = 2, the discriminant is 1 and the roots are x = 1 and x = 2.

x² + 2x + 1 = 0

The discriminant is zero, so the equation has one repeated real root at x = −1.

x² + 1 = 0

The discriminant is −4, so there are no real roots. The complex roots are i and −i.

Ball thrown upward

Height h = −4.9t² + 20t + 1.5 metres. Setting h = 0 and taking the positive root gives t ≈ 4.16 seconds until the ball lands. The negative root has no physical meaning here.

Rectangle with a known area

A rectangle is 3 cm longer than it is wide and has an area of 40 cm². x(x + 3) = 40 gives x² + 3x − 40 = 0, with roots 5 and −8. The width is 5 cm and the length 8 cm.

Check the result in context

Substitution check: x² − 3x + 2 = 0 has discriminant 1 and roots 1 and 2. At either root the expression is 0; vertex is (1.5, −0.25).

Solved examples

EquationDiscriminantRoots
x² − 5x + 6 = 013 and 2
x² + 2x + 1 = 00−1 (double root)
2x² − 4x − 6 = 0643 and −1
x² − 2 = 081.4142 and −1.4142
x² + 1 = 0−4±i
x² + 4x + 13 = 0−36−2 ± 3i

More solved equations with Vieta's check

EquationDiscriminantRootsSum (−b/a)Product (c/a)
2x² + 3x − 2 = 0250.5 and −2−3/2−1
x² − 4x + 4 = 002 (double root)44
3x² − 6x = 0362 and 020
x² + x + 1 = 0−3−0.5 ± 0.8660i−11

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0 with a not equal to zero, the roots are found from negative b plus or minus the square root of b² − 4ac, all divided by 2a.

What is the discriminant?

The discriminant is b² − 4ac. Its sign determines whether a quadratic has two real roots, one repeated real root or two complex roots.

What happens if a equals zero?

The equation is no longer quadratic. When b is nonzero, it becomes a linear equation and can be solved as x = −c/b.

Can this calculator show complex roots?

Yes. When the discriminant is negative, the calculator displays the real and imaginary parts of both complex roots.

How is the vertex of a quadratic found?

The vertex x-coordinate is −b divided by 2a. Substituting that x-value into ax² + bx + c gives the vertex y-coordinate.

How can I check quadratic roots quickly?

Add them and multiply them. The sum should equal −b/a and the product c/a. If either check fails, recheck the signs of a, b and c.

What if b is zero?

The equation becomes ax² + c = 0, so x² = −c/a. If −c/a is positive there are two roots ±√(−c/a); if it's negative the roots are imaginary.

Does a negative discriminant mean no solution?

It means no real roots, but there are two complex roots when a is nonzero. For x² + 1 = 0 they are +i and −i.

Related tools

More math tools