High-entropy and multiprincipal element alloys present exciting opportunities and challenges for computational modeling of their structure and phase stability. Recent interest has catalyzed rapid development of techniques and equally rapid growth of new results. This review surveys the essential concepts of thermodynamics and total energy calculation, and the bridge between them provided by statistical mechanics. Specifically, we review the electronic density functional theory of alloy total energy as applied to supercells and special quasirandom structures. We contrast these with the coherent potential approximation and semi-empirical approximations. Statistical mechanical approaches include cluster expansions, hybrid Monte Carlo/molecular dynamics simulations, and extraction of entropy from correlation functions. We also compare first-principles approaches with Calculation of Phase Diagrams (CALPHAD) and highlight the need to augment experimental databases with first-principles derived data. Numerous example applications are given highlighting recent progress utilizing the concepts and methods that are introduced.