How does my calculator calculate the roots for a cubic polynomial? For example, many calculators come equipped with the quadratic formula, and so you can give them $A,B,C$ coefficients, and they will show you out the solution using the formula 
$$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$
My calculator however finds $x$ when we have $x^3$ too, and this time it asks for $A,B,C,D$.
I was wondering how exactly it did this? Is there a cubic power "formula"? My calculator even calculates irrational roots so I'm not sure how exactly it can do this without a formula.

"Cardano's method" solves the "reduced" cubic $x^3+ bx= c$ where b and c are real numbers.  The basic idea is:
For any numbers u and v, $(u+ v)^3= u^3+ 3u^2v+ 3uv^2+ v^3$ and $3(u+ v)= 3u+ 3v$ so that $(u+ v)^3- 3uv(u+ v)= u^3+ v^3$.
So, given any two numbers, u and v, taking b= -3uv and $c= u^3- v^3$ we can construct the cubic equation $x^3+ bx= c$ that has solution $x= u+ v$.  Now, what about the other way?  If we know b and c, can we solve $u^3- v^3= c$ and $-3uv= c$ for u and v and so find x?
Yes, of course!  From $-3uv= b$ we have $v= -\frac{b}{3u}$ so that $u^3- v^3= c$ becomes $u^3-\frac{b^3}{3^3u^3}= c$ and, multiplying by $u^3$, $u^6- \left(\frac{b}{3}\right)^3= cu^3$ which we can write as $(u^3)^2- cu^3- \left(\frac{b}{3}\right)^3= 0$, a quadratic equation in $u^3$. 
Using the quadratic formula $u= \frac{c\pm\sqrt{c^2+ 4\frac{b^3}{3^3}}}{2}= \frac{c}{2}\pm\sqrt{\left(\frac{c}{2}\right)^2+ \left(\frac{b}{3}\right)^3}$
Then $v= -\frac{b}{3u}$ gives v so we can find x= u+ v.
