In allusion to the problem of Insufficient amount of calculation and data overflow when using fixed-point DSP caculate highly accurage related electric power quality parameters,we propose optimized algorithm for electrical parameter. According to the characteristic of the maxmium data lengh of fixed-point DSP is 32bit and fixed-point DSP is good at multiply-accumulate. We improve the way of implementation of electrical parameter on DSP and present the derivation process of Algorithm optimization and analyze the error before and after optimization.Finally by experimental verification,we can see that the algorithm can effectively prevent data overflow after optimization and drastically reduce the amount of calculation, avoid the secondary development caused by the replacement of DSP.