An exact and stable algebraic solution based on solving a quartic equation with respect to the cosine function of the reduced latitude is proposed to transform Cartesian into geodetic coordinates. The unique proper root of the equation appropriate to the transformation is chosen from all possible roots by rigorous analyses and the singular region of the transformation that in which there at least one component of the geodetic coordinates is indeterminate or non-single-valued characteristics are determined strictly. The new algorithm does not need any approximation and the instability problems incurred in other algebraic solutions are overcome. For practical applications, the algorithm performs comparably to that of [Vermeille, H., 2011. An analytical method to transform geocentric into geodetic coordinates. Journal of geodesy, 85 (2), 105–117.] and shows a certain superiority in the singular disc over Vermeille's algorithm.