Quadratic Formula Calculator

Enter the coefficients and see the exact roots of the quadratic.

The coefficient of x², not 0.

The coefficient of x.

The constant term.

Try

Result

You entered1x2+2x+5=01x^2 + 2x + 5 = 0

x=−1−2i,x=−1+2i\displaystyle x = -1 - 2i, x = -1 + 2i

Discriminant

−16\displaystyle -16

Nature of roots

Two complex roots\displaystyle \text{Two complex roots}

Vertex

(−1,4)\displaystyle \left(-1, 4\right)

Axis of symmetry

x=−1\displaystyle x = -1

Decimal roots

x=−1−2i,x=−1+2i\displaystyle x = -1 - 2i, x = -1 + 2i
Show the work
  1. Coefficients of the quadratic

    Compare the equation with ax2+bx+c=0ax^2 + bx + c = 0 to read off the coefficients: a=1a = 1, b=2b = 2 and c=5c = 5.

  2. Discriminant

    The discriminant DD is the part under the square root in the quadratic formula. Its sign decides whether the roots are real or complex, so it is worked out first.

    D=b2−4ac=22−4×1×5=4−20=−16\begin{aligned} D &= b^2 - 4ac \\ &= 2^2 - 4 \times 1 \times 5 \\ &= 4 - 20 \\ &= -16 \end{aligned}
  3. Quadratic formula

    Because D<0D < 0 the square root is not a real number, so the roots are complex. Put −b-b, DD and 2a2a into the formula.

    x=−b±b2−4ac2a=−2±−162\begin{aligned} x &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \\ &= \frac{-2 \pm \sqrt{-16}}{2} \end{aligned}
  4. Square root of a negative number

    There is no real number whose square is negative, so the root is written with the imaginary unit ii, where i2=−1i^2 = -1.

    Using −n=n i\sqrt{-n} = \sqrt{n}\,i

    −16=16 i=4i\begin{aligned} \sqrt{-16} &= \sqrt{16}\,i \\ &= 4i \end{aligned}
  5. Split the fraction

    Divide both parts of the numerator by 2a2a, so the real part and the part with the root are shown separately.

    x=−2±4i2=−1±2i\begin{aligned} x &= \frac{-2 \pm 4i}{2} \\ &= -1 \pm 2i \end{aligned}
  6. Result

    So the solutions are x=−1±2ix = -1 \pm 2i.

Worked examples