How to calculate magnitude and phase different of impedence
Euler is your friend. Euler's Formula: 


  \$ e^{j  \theta} = cos(\theta) + j \cdot sin(\theta) \$  


Euler helps you to calculate in an easy way with the complex impedance, by using the \$e\$ power. At the end of the calculation you can separate the complex power of \$e\$ into its real and imaginary parts. These agree with your resistance and reactive impedance resp.  


  \$ |Z| = \sqrt{real^2 + imaginary^2} \$  


and  


  \$ \theta = arctan\left( \dfrac{imaginary}{real} \right) \$