Calculation of the centroid of the images of individual fluorescent particles and molecules allows localization and tracking in light microscopes to a precision about an order of magnitude greater than the microscope resolution. The factors that limit the precision of these techniques are examined and a simple equation derived that describes the precision of localization over a wide range of conditions. In addition, a localization algorithm motivated from least-squares fitting theory is constructed and tested both on image stacks of 30-nm fluorescent beads and on computer-generated images (Monte Carlo simulations). Results from the algorithm show good agreement with the derived precision equation for both the simulations and actual images. The availability of a simple equation to describe localization precision helps investigators both in assessing the quality of an experimental apparatus and in directing attention to the factors that limit further improvement. The precision of localization scales as the inverse square root of the number of photons in the spot for the shot noise limited case and as the inverse of the number of photons for the background noise limited case. The optimal image magnification depends on the expected number of photons and background noise, but, for most cases of interest, the pixel size should be about equal to the standard deviation of the point spread function.