How do you calculate i^i
or x^i (where x is any number)
my calculator says i^i = 0.2...
but what are the calculations behind it?

How do you calculate i^i
or x^i (where x is any number)
my calculator says i^i = 0.2...
but what are the calculations behind it?
The problem is that complex logarithms are multivalued functions and thus this exponent does not have one answer (which is actually a blessing and not a curse but that is another story).
To answer you question, you start off with the euler equation e<sup> i x + 2 pi i n </sup> = cos(x) + i sin(x) for n an integer and find that i = e<sup>i pi /2 (1 + 4 n) </sup>. Your calculator chooses the principle branch of this expression (i.e. n = 0) and to simplfy things i will do the same. So i<sup>i</sup> = (e<sup>i pi/2</sup>)<sup>i</sup> = e<sup>  pi / 2 </sup> which is the answer you got
why is e^(i x + 2 pi i n) = cos(x) + i sin(x) ?
Look at the Taylor series for e^x, cos(x) and sin(x).
« All about i  Chapter 7: Techniques of Integration » 