Quadratic Formula Calculator

Solve any quadratic equation from its three coefficients.

Solve ax² + bx + c = 0
Enter coefficients a, b, and c to calculate the discriminant and roots.

About the quadratic formula

A quadratic equation has the standard form ax squared plus bx plus c equals zero, where a, b, and c are numbers and a cannot be zero. The quadratic formula finds every value of x that makes the equation true. It states that x equals negative b plus or minus the square root of b squared minus four times a times c, all divided by two times a. This calculator substitutes the entered coefficients into that formula and reports both the discriminant and the resulting roots. The expression b squared minus 4ac is called the discriminant. Its sign reveals the nature of the solutions before the full formula is evaluated. A positive discriminant produces two distinct real roots. A zero discriminant produces one repeated real root because the plus and minus branches coincide. A negative discriminant produces two complex conjugate roots, which have the same real part and opposite imaginary parts. Showing the discriminant alongside the answers makes it easier to understand why a particular type of result appears. Quadratic equations occur whenever a variable is squared but no higher power is present. They model projectile motion, rectangular areas, revenue curves, parabolic reflectors, and many optimization problems. The roots are the x-intercepts of the graph when real roots exist. The coefficient a controls whether the parabola opens upward or downward, while b and c influence its horizontal position and vertical intercept. Even when a quadratic factors cleanly, the formula provides a systematic method that works without guessing factors. Enter coefficients with their signs exactly as they appear after arranging the equation in standard form. For example, x squared minus 5x plus 6 equals zero uses a equal to 1, b equal to -5, and c equal to 6. Missing terms have coefficient zero. If a is zero, the equation is linear rather than quadratic and the quadratic formula would divide by zero, so the calculator rejects that input. Decimal coefficients are supported, and displayed roots are rounded while the internal calculation retains normal JavaScript floating-point precision.

Quadratic formula examples

EquationRootsDiscriminant
x² - 5x + 6 = 0x = 3 and x = 2D = 1, so there are two real roots
x² + 2x + 1 = 0x = -1D = 0, so the root is repeated
x² + 1 = 0x = i and x = -iD = -4, so the roots are complex

How to use the quadratic formula

  1. Rewrite the equation in the form ax squared plus bx plus c equals zero.
  2. Enter coefficient a, including its sign, and ensure it is not zero.
  3. Enter coefficient b and constant c, using zero for any missing term.
  4. Select Solve quadratic equation and review the discriminant and roots.

Frequently asked questions

What is the quadratic formula?

It is x equals negative b plus or minus the square root of b squared minus 4ac, divided by 2a. It solves every quadratic equation written in standard form.

What does the discriminant tell me?

Its sign determines whether the equation has two real roots, one repeated real root, or two complex roots. Its exact value also controls the distance between the roots.

Why can coefficient a not be zero?

If a is zero, the squared term disappears and the equation becomes linear. The quadratic formula would also require division by 2a, which would then be division by zero.

How do I enter a missing term?

Use zero for the coefficient of that term. For x squared plus 9 equals zero, enter a as 1, b as 0, and c as 9.

Can the calculator show complex roots?

Yes, a negative discriminant produces a conjugate pair written with i. The real parts match and the imaginary parts have opposite signs.