Quadratic Formula Calculator

Solve any quadratic equation ax² + bx + c = 0 with the quadratic formula. Get exact roots as simplified radicals or complex numbers, plus the discriminant.

Loading calculator…

The quadratic formula

A quadratic equation has the form ax2+bx+c=0ax^2 + bx + c = 0, where aa, bb, and cc are numbers and a0a \neq 0. Its solutions — the values of xx that make it true — are given by the quadratic formula:

x=b±b24ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

The ±\pm sign is what produces the two roots: one using ++, one using -. Everything hinges on the quantity under the square root.

The discriminant decides everything

The expression under the radical, Δ=b24ac\Delta = b^2 - 4ac, is called the discriminant. Its sign alone tells you how many roots there are and what kind — before you finish solving:

DiscriminantRootsExample
Δ>0\Delta > 0Two distinct real rootsx28x+5=0x^2 - 8x + 5 = 0
Δ=0\Delta = 0One repeated (double) real rootx24x+4=0x^2 - 4x + 4 = 0
Δ<0\Delta < 0Two complex conjugate roots5x2+20x+32=05x^2 + 20x + 32 = 0
Tip: The discriminant is a shortcut: you can classify the roots of a quadratic just from b24acb^2 - 4ac, without computing the roots themselves.

Worked example — two real roots

Solve x28x+5=0x^2 - 8x + 5 = 0, so a=1a = 1, b=8b = -8, c=5c = 5.

  1. Discriminant: Δ=(8)24(1)(5)=6420=44\Delta = (-8)^2 - 4(1)(5) = 64 - 20 = 44. Since 44>044 > 0, there are two distinct real roots.
  2. Substitute: x=(8)±442(1)=8±442x = \dfrac{-(-8) \pm \sqrt{44}}{2(1)} = \dfrac{8 \pm \sqrt{44}}{2}.
  3. Simplify the radical: 44=4×11=211\sqrt{44} = \sqrt{4 \times 11} = 2\sqrt{11}, so x=8±2112=4±11x = \dfrac{8 \pm 2\sqrt{11}}{2} = 4 \pm \sqrt{11}.
  4. Roots: x1=4+117.31662x_1 = 4 + \sqrt{11} \approx 7.31662 and x2=4110.683375x_2 = 4 - \sqrt{11} \approx 0.683375.

The two roots are exact as radicals; the decimals are rounded approximations.

Worked example — complex roots

Solve 5x2+20x+32=05x^2 + 20x + 32 = 0, so a=5a = 5, b=20b = 20, c=32c = 32.

  1. Discriminant: Δ=2024(5)(32)=400640=240\Delta = 20^2 - 4(5)(32) = 400 - 640 = -240. Since 240<0-240 < 0, the roots are complex.
  2. Substitute: x=20±2402(5)=20±24010x = \dfrac{-20 \pm \sqrt{-240}}{2(5)} = \dfrac{-20 \pm \sqrt{-240}}{10}.
  3. Handle the negative root: 240=240i=415i\sqrt{-240} = \sqrt{240}\,i = 4\sqrt{15}\,i, since 240=16×15240 = 16 \times 15. So x=20±415i10x = \dfrac{-20 \pm 4\sqrt{15}\,i}{10}.
  4. Reduce: dividing through by 2, x=2±2155i2±1.54919ix = -2 \pm \dfrac{2\sqrt{15}}{5}i \approx -2 \pm 1.54919i.

The two roots are complex conjugates — the same real part with opposite imaginary parts.

Simplifying the radical

The reason the answers show radicals like 2112\sqrt{11} rather than long decimals is that a simplified radical is exact. To simplify 44\sqrt{44}: factor out the largest perfect square, 44=4×1144 = 4 \times 11, then pull out 4=2\sqrt{4} = 2, leaving 2112\sqrt{11}. The same step turns 240\sqrt{240} into 4154\sqrt{15}. See the Simplify Radicals calculator for that step on its own.

The connection to completing the square

The quadratic formula is not magic — it is what you get by completing the square on the general equation ax2+bx+c=0ax^2 + bx + c = 0. Rewriting the left side as a(xh)2+ka(x - h)^2 + k and solving for xx reproduces the formula exactly. If you want to see that intermediate vertex form, use the Completing the Square calculator; it is the same math, shown a different way.

Where quadratics show up

Quadratic equations model projectile motion (height over time), area and optimization problems, parabolic shapes in physics and engineering, and break-even points in finance. Any time a relationship squares one quantity, a quadratic — and this formula — is close behind.

Frequently asked questions

What is the quadratic formula?
The quadratic formula solves any equation of the form ax2+bx+c=0ax^2 + bx + c = 0 (with a0a \neq 0). The roots are x=b±b24ac2ax = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}. The ±\pm produces the two solutions, and the expression b24acb^2 - 4ac under the root is the discriminant.
What is the discriminant and why does it matter?
The discriminant is Δ=b24ac\Delta = b^2 - 4ac — the part under the square root. Its sign tells you the nature of the roots without solving: Δ>0\Delta > 0 gives two distinct real roots, Δ=0\Delta = 0 gives one repeated (double) root, and Δ<0\Delta < 0 gives two complex conjugate roots.
Why does this calculator show a radical like 4 + √11 instead of a decimal?
When the discriminant is not a perfect square, the roots are irrational — their decimals never end or repeat. The exact answer is a simplified radical, for example 4+114 + \sqrt{11}, and the decimal 7.316627.31662 is only an approximation. The radical form is exact.
What happens when a = 0?
If a=0a = 0 the x2x^2 term disappears and the equation is linear (bx+c=0bx + c = 0), not quadratic — the quadratic formula divides by 2a2a, so it is undefined. This calculator reports that case as "not quadratic"; enter a nonzero aa.
How do complex roots work?
When Δ<0\Delta < 0 the square root of a negative number is imaginary (i=1i = \sqrt{-1}), so the two roots are complex conjugates p±qip \pm qi. For example 5x2+20x+32=05x^2 + 20x + 32 = 0 has roots 2±2155i-2 \pm \frac{2\sqrt{15}}{5}i.
Is the quadratic formula the same as completing the square?
Yes — the quadratic formula is derived by completing the square on the general equation ax2+bx+c=0ax^2 + bx + c = 0. Completing the square rewrites it as a(xh)2+k=0a(x - h)^2 + k = 0; solving that for xx gives exactly the quadratic formula.

Related calculators