A comprehensive ab initio analysis of the ultra high temperature ceramics ZrB2 and HfB2 is presented. Density functional theory (DFT) computations were performed for the electronic, mechanical, thermal, and point defect properties of these materials. Lattice constants and elastic constants were determined. Computations of the electronic density of states, band structure, electron localization function, etc. show the diverse bonding types that exist in these materials. They also suggest the connection between the electronic structure and the superior mechanical properties. Lattice dynamical effects were considered, including phonon dispersions, vibrational densities of states, and specific heat curves. Point defect (vacancies and antisites) structures and energetics are also presented.