This paper presents an extension to Nicolson, Ross and Weir (NRW) algorithm to retrieve the complex permittivity and permeability from both the reflection and transmission coefficients. This new numerical retrieval approach solves the phase ambiguity problem associated with the NRW algorithm. A free-space quasi-optical 2-port measurement setup is employed to obtain the scattering parameters of different samples in the W-band frequency range. The results of different samples with various thicknesses are presented. Advantages and limitations of the method are also discussed.