Single particle tracking and single-molecule localization based super-resolution techniques rely on the precise and accurate localization of single fluorescent molecules. For two dimensional imaging, relatively simple models of a microscope point spread function (PSF), such as the two dimensional Gaussian, are adequate for most common imaging approaches. However, three dimensional localization is hampered by the fact that the image of a molecule near the focal plane contains little information about its axial position. In recent years, several three dimensional (3D) imaging techniques have been demonstrated that improve the localization of single fluorescent molecules along the axial direction, such as astigmatic imaging[1], a double helix point spread function (DH-PSF)[2], and dual focal plane methods[3]. Although these methods implement very different optical setups, they use either a simple Gaussian models, theoretical PSFs that do not account imaging system aberrations, or large, unwieldy, experimentally acquired 3D PSFs that can be prone to artifacts. Here we introduce a localization algorithm based on phase retrieved pupil functions. Pupil functions can contain information about specific aberrations present in the imaging system and can be used to calculate realistic 3D PSFs from a small set of Zernike polynomial coefficients that describe the pupil magnitude and phase. This compact representation of the 3D PSF allows the PSF to be efficiently calculated as needed in an iterative update method implemented on GPU hardware. We demonstrate the use of phase retrieved pupil functions for 3D localization in both the astigmatic and dual focal plane setups.Reference[1] Bo Huang, Science, 2008[2] Pavani, App.Phy.Sci, 2009[3] Manuel F Juette, NMETH, 2008