In this paper, a new method based on synthetic resampling, which is proposed to analyze harmonics and interharmonics of the currents and voltages generated by nonlinear loads in the power system, is described. The proposed method aims to reduce the leakege effects encountered by the Fourier Transform based methods. Once the true fundamental frequency is determined, the signal is resampled synthetically using interpolation to fit exact integer number of periods into one analysis window and then Fourier Transform is applied so that, DFT samples corresponding to the fundamental frequency component and its harmonics encounter no leakage effect. Since the leakage effect spreading around the fundamental and harmonic frequencies are eliminated, interharmonic components are also obtained more accurately. The proposed method has been tested on both simulated and field data and harmonics and interharmonics have been computed based on methods recommended in the IEC 61000-4-7 Standard. The proposed method has been shown to produce 55 times more accurate results for harmonics and 1.5 times more accurate results for interharmonics than the results of the standard Fourier Transform based method on the average.