Calculating Magnetic Dipole