One of the common power quality (PQ) problems in transmission and distribution systems is the voltage sag that affects the sensitive loads. Losses and problems caused by the voltage sag in the power system can be reduced by correctly determining the relative location of the voltage sag. This paper proposes a novel algorithm to classify voltage sag relative location and fault type, which is the main root cause of voltage sag, based on the actual voltage and current data before and during the voltage sag. The performance of the algorithm is investigated by performing a numerical simulation utilizing MATLAB/Simulink. Moreover, the proposed algorithm is integrated into the power quality monitoring system (PQMS) of the real distribution system and tested. The results show that the performance of the proposed method is satisfactory.