We tabulate the atomic mass excesses and binding energies, ground-state shell-plus-pairing corrections, ground-state microscopic corrections, and nuclear ground-state deformations of 9318 nuclei ranging from 16O to A=339. The calculations are based on the finite-range droplet macroscopic and the folded-Yukawa single-particle microscopic nuclear-structure models, which are completely specified. Relative to our FRDM(1992) mass table in Möller et al. (1995), the results are obtained in the same model, but with considerably improved treatment of deformation and fewer of the approximations that were necessary earlier, due to limitations in computer power. The more accurate execution of the model and the more extensive and more accurate experimental mass data base now available allow us to determine one additional macroscopic-model parameter, the density-symmetry coefficient L, which was not varied in the previous calculation, but set to zero. Because we now realize that the FRDM is inaccurate for some highly deformed shapes occurring in fission, because some effects are derived in terms of perturbations around a sphere, we only adjust its macroscopic parameters to ground-state masses.The values of ten constants are determined directly from an optimization to fit ground-state masses of 2149 nuclei ranging from 16O to 106265Sg and 108264Hs. The error of the mass model is 0.5595 MeV for the entire region of nuclei included in the adjustment, but is only 0.3549 MeV for the region N≥65.We also provide masses in the FRLDM, which in the more accurate treatments now has an error of 0.6618 MeV, with 0.5181 MeV for nuclei with N≥65, both somewhat larger than in the FRDM. But in contrast to the FRDM, it is suitable for studies of fission and has been extensively so applied elsewhere, with FRLDM(2002) constants. The FRLDM(2012) fits 31 fission-barrier heights from 70Se to 252Cf with a root-mean-square deviation of 1.052 MeV.