The accurate detection of duration, amplitude and phase jump of voltage sag is the primary problem for voltage sag compensation. A voltage sag detection based on complex wavelet transform and rms algorithm is present in this paper. The principle of wavelet singularity detection and its application in the starting and ending times for voltage sag detection are studied in detail.Using the fourth derivative of a complex Gaussian wavelet and RMS algorithm to detect the begin-end time ,phase jump and amplitude of voltage sag.The performance of the algorithm is validated and confirmed through simulation studies about voltage sag problem with distortion or not using the Matlab/Simulink analysis program. The experimental results show that the method can accurately detect the characteristics of the voltage sag.