Localization microscopy relies on computationally efficient Gaussian approximations of the point spread function for the calculation of fluorophore positions. Theoretical predictions show that under specific experimental conditions, localization accuracy is significantly improved when the localization is performed using a more realistic model. Here, we show how this can be achieved by considering three-dimensional (3-D) point spread function models for the wide field microscope. We introduce a least-squares point spread function fitting framework that utilizes the Gibson and Lanni model and propose a computationally efficient way for evaluating its derivative functions. We demonstrate the usefulness of the proposed approach with algorithms for particle localization and defocus estimation, both implemented as plugins for ImageJ.