Skip to content
CalcTide logo
Education & Math

Quadratic Formula Calculator

For x^2 - 3x + 2 = 0, the roots are x = 2 and x = 1. This quadratic formula calculator solves any equation in the form ax^2 + bx + c = 0. Enter the three coefficients a, b, and c to get both roots, the discriminant, and whether the answers are real or complex. The value of a must be nonzero, otherwise the equation is linear rather than quadratic.

Education & MathBy

Quick answer

A quadratic equation has the form ax^2 + bx + c = 0, where a is not zero.

What this tells you

  • A quadratic equation has the form ax^2 + bx + c = 0, where a is not zero.
  • The quadratic formula finds both roots using the coefficients a, b, and c.
  • The discriminant b^2 - 4ac tells you whether the roots are real or complex.
  • Numeric roots are rounded to 4 decimal places, and complex roots are shown as a + bi.

How to Use

  1. 1Enter the coefficient a, the number in front of x squared, and keep it nonzero.
  2. 2Enter the coefficient b, the number in front of x.
  3. 3Enter the constant term c.
  4. 4Click Calculate to see both roots, the discriminant, and the nature of the solutions.

How It Works

Formula

x = (-b +/- sqrt(b^2 - 4ac)) / 2a

The quadratic formula gives both roots of ax^2 + bx + c = 0. The part under the square root, b^2 - 4ac, is the discriminant. When it is positive there are two real roots, when it is zero there is one repeated real root, and when it is negative the two roots are complex conjugates.

Calculation note: values are processed in the order shown above, using the current input units.

Worked Examples

Two distinct real roots

A1
B-3
C2
Resultx = 2 and x = 1

The discriminant is (-3)^2 - 4(1)(2) = 1, which is positive, so there are two real roots. The formula gives (3 + 1) / 2 = 2 and (3 - 1) / 2 = 1.

One repeated root

A1
B-2
C1
Resultx = 1 (repeated)

The discriminant is (-2)^2 - 4(1)(1) = 0, so the square root term vanishes and both roots collapse to -(-2) / 2 = 1.

Complex roots

A1
B0
C1
Resultx = 0 + 1i and x = 0 - 1i

The discriminant is 0 - 4(1)(1) = -4, which is negative, so the roots are complex. The real part is 0 and the imaginary part is sqrt(4) / 2 = 1, giving 0 + 1i and 0 - 1i.

Discriminant and the Nature of the Roots

How the sign of b^2 - 4ac decides what kind of roots you get.

DiscriminantRoots
Greater than 0Two distinct real roots
Equal to 0One repeated real root
Less than 0Two complex conjugate roots

Common mistakes

  • Getting the sign of b wrong. The formula uses -b, so a negative b becomes positive, and for x^2 - 3x + 2 the -b term is +3, not -3.
  • Dividing only part of the expression by 2a. The whole numerator -b +/- sqrt(b^2 - 4ac) is divided by 2a, not just the square root term.
  • Ignoring complex roots when the discriminant is negative. A negative discriminant still has two roots, but they are complex numbers of the form a + bi rather than real numbers.

Frequently Asked Questions

The quadratic formula is x = (-b +/- sqrt(b^2 - 4ac)) / 2a, and it solves any equation written as ax^2 + bx + c = 0. You plug in the three coefficients a, b, and c, then evaluate the two values created by the plus and minus signs.
Write the equation as ax^2 + bx + c = 0, then substitute a, b, and c into the quadratic formula. For x^2 - 3x + 2 = 0 the coefficients are a = 1, b = -3, and c = 2, which gives the roots x = 2 and x = 1.
The discriminant is the part of the quadratic formula under the square root, b^2 - 4ac. It tells you the nature of the roots, since a positive value gives two real roots, zero gives one repeated root, and a negative value gives two complex roots.
A negative discriminant means the equation has two complex roots instead of real ones. The roots are complex conjugates of the form a + bi, where the real part is -b / 2a and the imaginary part is sqrt(-discriminant) / 2a.
No, the coefficient a cannot be zero, because that removes the x squared term and leaves the linear equation bx + c = 0. A quadratic equation requires a nonzero a, so this calculator returns no result when a is zero.
The roots of x^2 - 5x + 6 = 0 are x = 3 and x = 2. The discriminant is (-5)^2 - 4(1)(6) = 1, so the formula gives (5 + 1) / 2 = 3 and (5 - 1) / 2 = 2.
It estimates quadratic formula calculator outputs using the visible inputs and formula assumptions on this page.

Explore More in Education & Math