Generalized phase-shifting interferometry (GPSI) is one of the most effective techniques in imaging of a phase object, in which phase retrieval is an essential and important procedure. In this paper, a simple and rapid algorithm for retrieval of the unknown phase shifts in three-frame GPSI is proposed. Using this algorithm, the value of phase shift can be calculated by a determinate formula consisting of three different Euclidean matrix norms of the intensity difference between two phase shifted interferograms, and then the phase can be retrieved easily. The algorithm has the advantages of freeing from the background elimination and less computation, since it only needs three phase-shifted interferograms without no extra measurements, the iterative procedure or the integral transformation. The reliability and accuracy of this algorithm were demonstrated by simulation and experimental results.