A new phase retrieval method for imaging through random media is proposed and demonstrated. Although methods to recover the Fourier amplitude through random distortions are well established, recovery of the Fourier phase has been a more difficult problem and is still a very active and important research area. Here, it is shown that by simply ensemble averaging shift-corrected images, the Fourier phase of an object obscured by random distortions can be accurately retrieved up to the diffraction limit. The method is simple, fast, does not have any optimization parameters, and does not require prior knowledge or assumptions about the sample. The feasibility and robustness of the method are demonstrated by realizing all computational diffraction-limited imaging through atmospheric turbulence as well as imaging through multiple scattering media.