An embedded-atom potential has been constructed for the intermetallic compound B2-NiAl by fitting to both experimental properties and ab initio data. The ab initio data have been generated in the form of energy-volume relations for a number of alternative structures of NiAl and Ni3Al, as well as for Ni and Al. The potential accurately reproduces the basic lattice properties of B2-NiAl, planar faults, and point-defect characteristics. It also reproduces the energetics and stability of all other structures included in the fit. The potential is applied to calculate equilibrium point-defect concentrations in B2-NiAl as functions of temperature and composition near the stoichiometry. In contrast to previous calculations, the defect formation entropies arising from atomic vibrations are included in our calculation within the quasiharmonic approximation. Such entropies tend to increase the concentrations of thermal point defects in B2-NiAl at high temperatures, but the atomic disorder mechanism remains triple-defect type up to the melting point.