A wide range of interferometric techniques recover phase information that is mathematically wrapped on the interval (-pi, pi). Obtaining the true unwrapped phase is a longstanding problem. We present an algorithm that solves the phase unwrapping problem, using a combination of Fourier techniques. The execution time for our algorithm is equivalent to the computation time required for performing eight fast Fourier transforms and is stable against noise and residues present in the wrapped phase. We have extended the algorithm to handle data of arbitrary size. We expect the state of the art of existing interferometric applications, including the possibility for real-time phase recovery, to benefit from our algorithm.