In this paper,the least square fitting method with the cubic B-spline basis hmctioas is derived to reduce the influence of statistical fluctuations in the gamma ray spectra.The derived procedure is simple and automatic.The results show that this method is better than the convolution method with a sufficient reduction of statistical fluctuation.