An interatomic potential for hafnium diboride. The potential is of the Tersoff form, and is obtained by fitting to a first-principles database of basic properties of elemental Hf, B, and the HfB2 compound. The potential has been tested against a variety of properties of the compound, with the conclusion that it is stable and provides a reasonable representation of the desired properties of hafnium diboride.