In this paper, a spectral model optimization based method for the analysis of harmonics and interharmonics produced by electric arc furnace (EAF) installations is presented. Detecting the changes occurring in the frequency spectrum of the EAF voltages fast and accurately has crucial importance to eliminate the undesired effects of harmonics and interharmonics using advanced technology compensation systems such as active power filters, synchronous static compensators, energy storage systems, etc. The aim of the research work presented here is to reduce the spectral leakage effects experienced by Fourier analysis based methods by estimating the spectral model parameters using nonlinear least squares. The Fourier spectrum of the signal is used as a priori information; however, the proposed model does not suffer from the spectral leakage problems encountered by the Fourier analysis based methods in case of fundamental frequency variation, which frequently occurs in the existence of EAF plants in an electrical system. Moreover, the proposed model permits frequency detection at a much higher resolution than the Fourier analysis based methods. The proposed method has been tested on both synthetic and field data and it has been shown that it is able to detect frequency components and the corresponding amplitudes and phases of harmonics and interharmonics with high accuracy for EAF plants.