We present a numerical calculation with iterative algorithm method for accurately measuring laser linewidth. In this new method, the self-heterodyne spectrum of long delay fiber is calculated as the initial value, and the short delay self-heterodyne spectrum is demodulated with iterative algorithm to realize the accurate measurement of laser linewidth. The method can eliminate the influence of 1/f noise on the measurement spectrum broadening, so it provides a powerful way for accurate measurement of narrow linewidth.