An energy decomposition analysis method is implemented for the analysis of both covalent bonds and intermolecular interactions on the basis of single-determinant Hartree-Fock ͑HF͒ ͑restricted closed shell HF, restricted open shell HF, and unrestricted open shell HF͒ wavefunctions and their density functional theory analogs. For HF methods, the total interaction energy from a supermolecule calculation is decomposed into electrostatic, exchange, repulsion, and polarization terms. Dispersion energy is obtained from second-order Møller-Plesset perturbation theory and coupled-cluster methods such as CCSD and CCSD͑T͒. Similar to the HF methods, Kohn-Sham density functional interaction energy is decomposed into electrostatic, exchange, repulsion, polarization, and dispersion terms. Tests on various systems show that this algorithm is simple and robust. Insights are provided by the energy decomposition analysis into H 2 , methane C-H, and ethane C-C covalent bond formation, CH 3 CH 3 internal rotation barrier, water, ammonia, ammonium, and hydrogen fluoride hydrogen bonding, van der Waals interaction, DNA base pair formation, BH 3 NH 3 and BH 3 CO coordinate bond formation, Cu-ligand interactions, as well as LiF, LiCl, NaF, and NaCl ionic interactions.