The vector-fitting algorithm has been used as the main macromodeling tool for approximating frequency domain responses of complex interconnects and electrical packages , In this paper, a new methodology is proposed to fit transfer functions of frequency response data obtained from numerical electromagnetic simulation or measured frequency-domain or time-domain response data. This new method, z-domain vector-fitting (ZDVF), is a formulation of vector-fitting method in the z domain; it has an advantage of faster convergence and better numerical stability compared to the sdomain vector-fitting method(VF). The fast convergence of the method reduces the overall macromodel generation time. The accuracy, numerical stability and convergence speed of VF and ZDVF are compared. Examples are provided to demonstrate the advantage of the ZDVF.