The formula for a quadratic (ax^2 + bx + c = 0) is the following.

x1 = (-b + SquareRoot(b^2 - 4ac) / 2a

x2 = (-b + SquareRoot(b^2 - 4ac) / 2a

The formulae for third and fourth order polynomials are so complicated that nobody uses them except students who are taking certain mathematics courses. Even before hand calculators and computers, it was easier to use some successive approximation method.

Over 100 years ago, it was proven that there could be no formula for fifth & higher order polynomials.

Note that even order polynomials might not have any real roots, while odd order polynomials always have at least one real root.

A good successive approximation method is Newton-Raphson, which works as follows (Fourth order polynomial used as example).

Polynomial(x) = ax^4 + bx^3 + cx^2 + dx + e
Derivative(x) = 4ax^3 + 3bx^4 +2cx + d

NextGuess = LastGuess - Polynomial(LastGuess) / Derivative(LastGuess)

Start with a guess. Use the above to compute next guess. Use next guess to compute a better guess. Keep it up until two successive guesses are nearly equal.

If you study the formula for above derivative a bit, you will see the rule for determining the derivative of any polynomial.

If you do complex arithmetic, you can use the above to find complex as well as real roots. If you do complex arithmetic, you can use the above to find complex as well as real roots. Complex roots always come in pairs.

If (a + ib) is a root, then (a - ib) is also a root.